Skip to content

Commit c2f342a

Browse files
committed
Proper usage information in docs
1 parent 94e6462 commit c2f342a

1 file changed

Lines changed: 62 additions & 33 deletions

File tree

docs/usage.rst

Lines changed: 62 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,65 @@ The usage is as simple as::
55

66
$ doc2dash -A <docdir>
77

8-
``doc2dash`` will create a new directory called ``<docdir>.docset`` in ``~/Library/Application Support/doc2dash/DocSets`` containing a dash-compatible docset with a SQLite_ index.
9-
When finished, the docset is automatically added to dash.
10-
11-
Full usage: ::
12-
13-
Usage: doc2dash [OPTIONS] SOURCE
14-
15-
Convert docs from SOURCE to Dash.app's docset format.
16-
17-
Options:
18-
-f, --force force overwriting if destination already exists
19-
-n, --name NAME name docset explicitly
20-
-q, --quiet limit output to errors and warnings
21-
-v, --verbose be verbose
22-
-d, --destination PATH destination directory for docset, ignored if -A
23-
is specified [default: .]
24-
-a, --add-to-dash automatically add resulting docset to Dash.app
25-
-A, --add-to-global create docset in doc2dash's default global
26-
directory [~/Library/Application Support/
27-
doc2dash/DocSets] and add it to Dash.app
28-
-i, --icon FILENAME add PNG icon to docset
29-
-I, --index-page FILENAME set the file that is shown when the docset is
30-
clicked within Dash.app
31-
--version Show the version and exit.
32-
--help Show this message and exit.
33-
34-
35-
Hints
36-
-----
37-
For Sphinx, you get the best results using the intersphinx_ parser that is used automatically if a version 2 ``objects.inv`` file is present.
38-
This approach obviates parsing problems completely by using that machine readable file using Sphinx’s own APIs.
39-
40-
.. _SQLite: http://www.sqlite.org/
8+
``doc2dash`` will create a new directory called ``<docdir>.docset`` in ``~/Library/Application Support/doc2dash/DocSets`` containing a Dash.app-compatible docset.
9+
When finished, the docset is automatically added to Dash.app.
10+
11+
12+
Options and Arguments
13+
---------------------
14+
15+
The full usage is::
16+
17+
$ doc2dash [OPTIONS] SOURCE
18+
19+
The ``SOURCE`` is a directory containing the documentation you would like to convert.
20+
Valid ``OPTIONS`` are the following:
21+
22+
.. option:: -n, --name
23+
24+
Name the docset explicitly instead of letting doc2dash guess the correct name from the directory name of the source.
25+
26+
.. option:: -d PATH, --destination PATH
27+
28+
Put the resulting docset into ``PATH``.
29+
Default is the current directory.
30+
Ignored if ``--add-to-global`` is specified.
31+
32+
.. option:: -f, --force
33+
34+
Overwrite docset if it already exists.
35+
Otherwise, ``doc2dash`` would exit with an error.
36+
37+
.. option:: -i FILENAME, --icon FILENAME
38+
39+
Add PNG icon ``FILENAME`` to docset that is used within Dash.app to represent the docset.
40+
41+
.. option:: -I FILENAME, --index-page FILENAME
42+
43+
Set the file that is shown when the docset is clicked within Dash.app.
44+
45+
.. option:: -a, --add-to-dash
46+
47+
Automatically add the resulting docset to Dash.app.
48+
Works only on OS X and when Dash.app is installed.
49+
50+
.. option:: -A, --add-to-global
51+
52+
Create docset in doc2dash's default global directory [``~/Library/Application Support/ doc2dash/DocSets``] and add it to Dash.app
53+
Works only on OS X and when Dash.app is installed.
54+
55+
.. option:: -q, --quiet
56+
57+
Limit output to errors and warnings.
58+
59+
.. option:: -v, --verbose
60+
61+
Be verbose.
62+
63+
.. option:: --version
64+
65+
Show the version and exit.
66+
67+
.. option:: --help
68+
69+
Show a brief usage summary and exit.

0 commit comments

Comments
 (0)