diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2019-09-29 18:11:43 +0200 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2019-09-29 18:11:43 +0200 |
commit | da130078b4a654d8d17a2e606be4447cfdad44eb (patch) | |
tree | 1c3e7217cfc1d22269d1d1b0370f39c6b53a37eb | |
parent | 25890ee36217c4c9b152cf3c38603725f65edfac (diff) |
Additional manpages
-rw-r--r-- | docs/man/lesana-edit.rst | 35 | ||||
-rw-r--r-- | docs/man/lesana-new.rst | 37 | ||||
-rw-r--r-- | docs/man/lesana-search.rst | 37 | ||||
-rw-r--r-- | docs/man/lesana-show.rst | 45 | ||||
-rw-r--r-- | lesana/command.py | 2 |
5 files changed, 155 insertions, 1 deletions
diff --git a/docs/man/lesana-edit.rst b/docs/man/lesana-edit.rst new file mode 100644 index 0000000..75bcaeb --- /dev/null +++ b/docs/man/lesana-edit.rst @@ -0,0 +1,35 @@ +=========== +lesana-edit +=========== + +------------------------------ +edits an existing lesana entry +------------------------------ + +:Author: valhalla@trueelena.org +:Manual section: 1 + +SYNOPSIS +======== + +lesana edit [--help] [--collection <collection>] [--no-git] <entry> + +DESCRIPTION +=========== + +Lesana edit will open an existing entry (specified by id or partial id) +in an editor, so that it can be changed. + +If the collection is configured to use git, after the editor has been +closed, it will add the file to the git staging area, unless +``--no-git`` is given. + +OPTIONS +======= + +-h, --help + Prints an help message and exits. +--collection COLLECTION, -c COLLECTION + The collection to work on. Default is ``.`` +--no-git + Don't add the new entry to git. diff --git a/docs/man/lesana-new.rst b/docs/man/lesana-new.rst new file mode 100644 index 0000000..4c7a10d --- /dev/null +++ b/docs/man/lesana-new.rst @@ -0,0 +1,37 @@ +========== +lesana-new +========== + +------------------------- +create a new lesana entry +------------------------- + +:Author: valhalla@trueelena.org +:Manual section: 1 + +SYNOPSIS +======== + +lesana new [--help] [--collection <collection>] [--no-git] + +DESCRIPTION +=========== + +Lesana new creates a new lesana entry. + +It will create an empty entry and open an editor so that it can be +filled. + +If the collection is configured to use git, after the editor has been +closed, it will add the file to the git staging area, unless +``--no-git`` is given. + +OPTIONS +======= + +-h, --help + Prints an help message and exits. +--collection COLLECTION, -c COLLECTION + The collection to work on. Default is ``.`` +--no-git + Don't add the new entry to git. diff --git a/docs/man/lesana-search.rst b/docs/man/lesana-search.rst new file mode 100644 index 0000000..9375541 --- /dev/null +++ b/docs/man/lesana-search.rst @@ -0,0 +1,37 @@ +============= +lesana-search +============= + +--------------------------------- +search inside a lesana collection +--------------------------------- + +:Author: valhalla@trueelena.org +:Manual section: 1 + +SYNOPSIS +======== + +lesana search [--help] [--collection COLLECTION] [--template TEMPLATE] \ +[--offset OFFSET] [--pagesize PAGESIZE] [--all] query [query ...] + +DESCRIPTION +=========== + + +OPTIONS +======= + +-h, --help + Prints an help message and exits. +--collection COLLECTION, -c COLLECTION + The collection to work on. Default is ``.`` +--template TEMPLATE, -t TEMPLATE + Template to use when displaying results +--offset OFFSET + . +--pagesize PAGESIZE + . +--all + Return all available results + diff --git a/docs/man/lesana-show.rst b/docs/man/lesana-show.rst new file mode 100644 index 0000000..516f9de --- /dev/null +++ b/docs/man/lesana-show.rst @@ -0,0 +1,45 @@ +=========== +lesana-show +=========== + +------------------- +show a lesana entry +------------------- + +:Author: valhalla@trueelena.org +:Manual section: 1 + +SYNOPSIS +======== + +lesana show [--help] [--collection COLLECTION] [--template TEMPLATE] <entry> + +DESCRIPTION +=========== + +``lesana show`` will print an entry (specified by id or partial id) to +stdout. + +A template can be specified with ``--template <template>`` to pretty +print entries. + +OPTIONS +======= + +-h, --help + Prints an help message and exits. +--collection COLLECTION, -c COLLECTION + The collection to work on. Default is ``.`` +--template TEMPLATE, -t TEMPLATE + Use the specified template to display results. + +TEMPLATES +========= + +The templates used by ``lesana show`` are jinja2 templates. + +The entry fields are available as variables, and the full entry is +available as the variable ``entry`` and can be used to give access to +fields with names that aren't valid jinja2 variables e.g. as +``entry.data[<field-name>]``. + diff --git a/lesana/command.py b/lesana/command.py index bc0de97..a5a7508 100644 --- a/lesana/command.py +++ b/lesana/command.py @@ -138,7 +138,7 @@ class Show(Command): help='The collection to work on (default .)' )), (['--template', '-t'], dict( - help='Template to use when displaying results', + help='Use the specified template to display results.', )), (['uid'], dict( help='uid of an entry to edit', |