-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3da0d9e
commit be5c9f7
Showing
1 changed file
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,55 @@ | ||
# Using the Transdoc CLI | ||
|
||
Transdoc can be accessed using | ||
Transdoc can be accessed using a CLI with the `transdoc` command. | ||
|
||
```bash | ||
$ transdoc --version | ||
transdoc, version 1.0.0 | ||
``` | ||
|
||
## Rule file | ||
|
||
You can specify a Python file containing the Transdoc rules you wish to use | ||
while transforming your documentation using the `-r` flag. | ||
|
||
```bash | ||
$ transdoc -r path/to/rules.py | ||
... | ||
``` | ||
|
||
## Input files | ||
|
||
You can specify an input file or directory as the primary argument. | ||
|
||
```bash | ||
$ transdoc input.txt | ||
... | ||
``` | ||
|
||
If a file is given, its transformed output will be written to `stdout`. | ||
Otherwise, you must specify an output directory, or use the `--dryrun` flag. | ||
|
||
## Output files | ||
|
||
By using the `-o` flag, you can specify your intended output file/directory. | ||
|
||
```bash | ||
$ transdoc input.txt -o output.txt | ||
... | ||
``` | ||
|
||
## Other options | ||
|
||
* `--dryrun`: don't produce any output file(s). Just check for errors in the | ||
inputs. This still evaluates all rules, so any side effects of rule | ||
evaluation will still occur. | ||
* `--force`: always overwrite the output file/directory, regardless of whether | ||
it contains data. | ||
* `-v`, `-vv`, `-vvv`: control verbosity of logging. | ||
* `--help`: show help information | ||
* `--version`: show version information | ||
|
||
### Additional notes | ||
|
||
You can disable the pride flags in the `--help` output by using the `NO_PRIDE` | ||
environment variable. |