Skip to content

Commit

Permalink
real manpage coming; refs insomnia-lab#234
Browse files Browse the repository at this point in the history
well, almost
  • Loading branch information
boyska committed Dec 16, 2015
1 parent 96053ff commit 0a28c4a
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 3 deletions.
4 changes: 3 additions & 1 deletion doc/source/clickdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ def format_param(param):


class UsageDirective(SingleArgDirective):
optional_arguments = 1

def run(self):
command = get_command(self.get_arg())
ctx = command.make_context( command.name, [])
ctx = command.make_context( command.name, self.arguments[1:])

doc = ViewList()
doc.append(command.get_usage(ctx), '')
Expand Down
8 changes: 8 additions & 0 deletions doc/source/commands.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Command-line tools
=====================

.. toctree::
:maxdepth: 1

/commands/libreant
/commands/libreant-db
21 changes: 21 additions & 0 deletions doc/source/commands/libreant-db.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Libreant-db
===========

This program manages the volume database of libreant. It does not handle users db.

Synopsis
--------

.. click:usage :: cli.libreant_db:libreant_db
libreant-db

Options
-------

.. click:all_options :: cli.libreant_db:libreant_db
Examples
--------

Environment variables
----------------------
24 changes: 24 additions & 0 deletions doc/source/commands/libreant.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Libreant
=========

This command will run the libreant HTTPserver.

Synopsis
--------

.. click:usage :: cli.libreant:libreant
Summary
--------


Options
-------

.. click:all_options :: cli.libreant:libreant
Examples
--------

Environment variables
----------------------
6 changes: 4 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,10 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'libreant', 'libreant Documentation',
['insomnialab'], 1)
('commands/libreant-db', 'libreant-db', 'manage libreant db',
['insomnialab'], 8),
('commands/libreant', 'libreant', '(e)Book archive focused on small grassroot archives',
['insomnialab'], 8),
]

# If true, show URL addresses after external links.
Expand Down
1 change: 1 addition & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Contents:
documentation
developer
api/modules
commands



Expand Down

0 comments on commit 0a28c4a

Please sign in to comment.