Skip to content

Commit

Permalink
Adds in documentation (#4)
Browse files Browse the repository at this point in the history
* Add documentation

* Add run time file

* Drop runtime

* Formatting changes
  • Loading branch information
Cyb3r-Jak3 authored Jun 4, 2022
1 parent 60fe7ed commit 6df622f
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 0 deletions.
26 changes: 26 additions & 0 deletions documentation/docs/dns-cleaner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# DNS Cleaner

The purpose of DNS cleaner is to offer a quick way to bulk remove DNS records that you don't want.

**Required API Permissions**: _DNS:Edit_


It operates in two steps, one to download the records and another to make any requested changes.

### 1. Download

To download you current records run `cloudflare-utils <auth> --zone-name <ZONE> dns-cleaner` where `<ZONE>` is your domain ie `example.com`.
This will create a file called `dns-records.yml` with contains your DNS records.
If you want a different file name then add `--dns-file` with the name of the file you want. It needs to end in either `.yml` or `.yaml`

### 2. Edit your records

Open the newly created file and any record that you do not want to keep change `keep:` to false.

### 3. Apply your changes

Once you have made all the changes you need re-run the command you used to download.

Notes:
* If you changed the name of the file then you need to point to the same file
* Once a DNS record is deleted, then it is gone. This program does not recreate records
8 changes: 8 additions & 0 deletions documentation/docs/features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# To Do

These are things that I consider useful and would like to add:

- [ ] Ability to override DNS file
- [ ] Flag to use `.env` file

If you have other features in mind then feel free to request them
7 changes: 7 additions & 0 deletions documentation/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Cloudflare Utils

The purpose of this project is to have an easy-to-use program that offer extra abilities to managing your domain on Cloudflare.

Read more about getting started [here](./started.md)

If you have any suggestions for features then please make a request on [GitHub](https://github.com/Cyb3r-Jak3/cloudflare-utils/issues)
29 changes: 29 additions & 0 deletions documentation/docs/started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Getting Started

## Download

Cloudflare-utils is build for Windows, Mac and Linux and the latest release is available to download from [GitHub](https://github.com/Cyb3r-Jak3/cloudflare-utils/releases). Download the tar/zip file for your operating system and then extract the progra

To see all the options and commands run `cloudflare-utils --help`

## Authentication

### API Token

The recommended method to authenticate is with an [API Token](https://developers.cloudflare.com/api/tokens/create/). Each command will list the API permissions needed for it to run.

**To Use**

`cloudflare-utils --api-token <Token Here>`

You can also pass your API Token via an environment variable of `CLOUDFLARE_API_TOKEN`

### API Key

The legacy [API Key](https://developers.cloudflare.com/api/keys/) method is also supported

**To Use**

`cloudflare-utils --api-email <Email Here> --api-key <API Key Here>`

You can pass your API email and key with environment variables of `CLOUDFLARE_API_EMAIL` and `CLOUDFLARE_API_KEY`
50 changes: 50 additions & 0 deletions documentation/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
site_name: Cloudflare Utilities
site_url: https://cloudflare-utils.cyberjake.xyz
repo_url: https://github.com/Cyb3r-Jak3/cloudflare-utils
repo_name: Cyb3r-Jak3/cloudflare-utils

theme:
name: material
language: en
palette:
- media: "(prefers-color-scheme: light)" # Light mode
scheme: default
toggle:
icon: material/lightbulb-outline
name: Switch to light mode
- media: "(prefers-color-scheme: dark)" # Dark mode
scheme: slate
primary: light blue
accent: indigo
toggle:
icon: material/lightbulb
name: Switch to dark mode

features:
- search.suggest
- search.highlight
- search.share

plugins:
- search
- minify:
minify_html: true

nav:
- Home: index.md
- started.md
- dns-cleaner.md
- features.md

markdown_extensions:
- admonition
- codehilite
- meta
- toc:
permalink: true
- pymdownx.tabbed:
alternate_style: true
# - pymdownx.superfences
- pymdownx.tasklist:
custom_checkbox: true
# - footnotes
2 changes: 2 additions & 0 deletions documentation/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mkdocs==1.3.0
mkdocs-material==8.3.0
1 change: 1 addition & 0 deletions documentation/runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.7

0 comments on commit 6df622f

Please sign in to comment.