dhellmann / CommandLineApp (http://doughellmann.com/projects/CommandLineApp/)

The CommandLineApp class makes creating command line applications in Python as simple as defining callbacks to handle options when they appear in 'sys.argv'.

Changed (Δ272 bytes):

raw changeset »

.hgignore (2 lines added, 0 lines removed)

MANIFEST.in (2 lines added, 1 lines removed)

docs/Makefile

docsource/PyMagArticle/index.rst (2 lines added, 2 lines removed)

pavement.py (10 lines added, 1 lines removed)

Up to file-list .hgignore:

@@ -7,3 +7,5 @@ CommandLineApp.egg-info
7
7
docs/build
8
8
.DS_Store
9
9
*/.DS_Store
10
docsbuild
11
docs

Up to file-list MANIFEST.in:

1
1
include setup.py
2
2
include ChangeLog
3
3
include test_commandlineapp.py
4
recursive-include docs/build/html *.html *.txt *.css *.js *.png
4
recursive-include docs *.html *.txt *.css *.js *.png
5
recursive-include docsource *.rst *.txt *.py

Up to file-list docsource/PyMagArticle/index.rst:

@@ -37,7 +37,7 @@ Listing 1
37
37
38
38
::
39
39
40
	$ python docs/source/PyMagArticle/Listing2.py --help
40
	$ python ./docsource/PyMagArticle/Listing2.py --help
41
41
	Concatenate comma separated value files.
42
42
	
43
43
	
@@ -225,7 +225,7 @@ Most of the work for **csvcat** is being
225
225
Listing 3
226
226
~~~~~~~~~
227
227
228
.. include:: ../../../commandlineapp.py
228
.. include:: ../../commandlineapp.py
229
229
    :literal:
230
230
231
231

Up to file-list pavement.py:

@@ -80,7 +80,7 @@ options(
80
80
    
81
81
    sphinx = Bunch(
82
82
        docroot='.',
83
        builddir='docs',
83
        builddir='docsbuild',
84
84
        sourcedir='docsource',
85
85
    ),
86
86
    
@@ -171,10 +171,19 @@ def sdist():
171
171
    pass
172
172
173
173
@task
174
def clean_docs(options):
175
    """Remove the old docs dir.
176
    """
177
178
@task
174
179
@needs(['cog', 'paver.doctools.html'])
175
180
def html(options):
176
181
    """Run sphinx to produce the documentation.
177
182
    """
183
    docs = path('docs')
184
    docs.rmtree()
185
    html = path(options.sphinx.docroot) / options.sphinx.builddir / 'html'
186
    html.copytree('docs')
178
187
    
179
188
180
189
# @task