forked from t4ngo/dragonfly
-
-
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.
Add docs on dragonfly's text input engine and command-line interface
This commit also adds sphinx-argparse as a documentation requirement and adjusts a few files to make it generate nice documentation from dragonfly/__main__.py.
- Loading branch information
Showing
7 changed files
with
70 additions
and
11 deletions.
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
.. _RefCLI: | ||
|
||
Command-line Interface (CLI) | ||
============================================================================ | ||
|
||
.. argparse:: | ||
:module: dragonfly.__main__ | ||
:func: make_arg_parser | ||
|
||
|
||
Usage Examples | ||
---------------------------------------------------------------------------- | ||
Below are some examples using the *test* sub-command. All of them should | ||
work in Bash. | ||
|
||
.. code:: shell | ||
|
||
# Load a command module and mimic two commands separately. | ||
echo "command one\n command two" | python -m dragonfly test module.py | ||
|
||
# Same test without the pipe. | ||
python -m dragonfly test module.py | ||
command one | ||
command two | ||
|
||
# Same test with quieter output. | ||
echo "command one\n command two" | python -m dragonfly test -q module.py | ||
|
||
# Test loading two modules with the sphinx engine and exit without | ||
# checking input. | ||
python -m dragonfly test -e sphinx --no-input module1.py module2.py |
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
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
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 |
---|---|---|
|
@@ -7,5 +7,6 @@ Contents: | |
.. toctree:: | ||
config | ||
ccr | ||
cli | ||
language | ||
windows |
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,4 @@ | ||
mock | ||
pyperclip>=1.7.0 | ||
six | ||
sphinx-argparse |
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
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