Commit cf720047 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Added usage documentation for command line interface.

parent 60e3f492
Pipeline #668 failed with stages
in 1 minute and 14 seconds
......@@ -82,15 +82,8 @@ def run_local_coreg(args):
CRL.correct_shifts()
if __name__ == '__main__':
import argparse
from socket import gethostname
from datetime import datetime as dt
from getpass import getuser
from arosics.io import wfa
wfa('/misc/hy5/scheffler/tmp/crlf', '%s\t%s\t%s\t%s\n' % (dt.now(), getuser(), gethostname(), ' '.join(sys.argv)))
def get_arosics_argparser():
"""Return argument parser for arosics_cli.py program."""
parser = argparse.ArgumentParser(
prog='arosics_cli.py',
......@@ -359,9 +352,19 @@ if __name__ == '__main__':
parse_coreg_local.set_defaults(func=run_local_coreg)
return parser
parsed_args = parser.parse_args()
if __name__ == '__main__':
import argparse
from socket import gethostname
from datetime import datetime as dt
from getpass import getuser
from arosics.io import wfa
wfa('/misc/hy5/scheffler/tmp/crlf', '%s\t%s\t%s\t%s\n' % (dt.now(), getuser(), gethostname(), ' '.join(sys.argv)))
parsed_args = get_arosics_argparser().parse_args()
print('======================================================================\n'
'# AROSICS v%s #'%__version__+'\n'
......
......@@ -40,7 +40,7 @@ import arosics
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.todo', 'sphinxarg.ext']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
......
......@@ -5,3 +5,17 @@ Usage
To use arosics in a project::
import arosics
Command line utilities
**********************
arosics_cli.py
-----------
At the command line, arosics provides the **arosics_cli.py** command:
.. argparse::
:filename: ./../bin/arosics_cli.py
:func: get_arosics_argparser
:prog: arosics_cli.py
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment