|
|
@ -51,6 +51,7 @@ def argument_parser(args): |
|
|
|
parser = argparse.ArgumentParser( |
|
|
|
prog="songbook", |
|
|
|
description="A song book compiler", |
|
|
|
formatter_class=argparse.RawTextHelpFormatter, |
|
|
|
) |
|
|
|
|
|
|
|
parser.add_argument( |
|
|
@ -65,9 +66,8 @@ def argument_parser(args): |
|
|
|
parser.add_argument( |
|
|
|
'--datadir', '-d', nargs='+', type=str, action='append', |
|
|
|
help=textwrap.dedent("""\ |
|
|
|
Data location. Expected (not necessarily required) |
|
|
|
subdirectories are 'songs', 'img', 'latex', 'templates'. |
|
|
|
""") |
|
|
|
Data location. Expected (not necessarily required) subdirectories are 'songs', 'img', 'latex', 'templates'. |
|
|
|
"""), |
|
|
|
) |
|
|
|
|
|
|
|
parser.add_argument( |
|
|
@ -90,20 +90,15 @@ def argument_parser(args): |
|
|
|
'--steps', '-s', nargs=1, type=str, |
|
|
|
action=ParseStepsAction, |
|
|
|
help=textwrap.dedent("""\ |
|
|
|
Steps to run. Default is "{steps}". |
|
|
|
Available steps are: |
|
|
|
"tex" produce .tex file from templates; |
|
|
|
"pdf" compile .tex file; |
|
|
|
"sbx" compile index files; |
|
|
|
"clean" remove temporary files; |
|
|
|
any string beginning with '#' (in this case, it will be run |
|
|
|
in a shell). Several steps (excepted the custom shell |
|
|
|
command) can be combinend in one --steps argument, as a |
|
|
|
comma separated string. |
|
|
|
|
|
|
|
Substring {{basename}} is replaced by the basename of the song |
|
|
|
book, and substrings {{aux}}, {{log}}, {{out}}, {{pdf}}, {{sxc}}, {{tex}} |
|
|
|
are replaced by "<BASENAME>.aux", "<BASENAME>.log", and so on. |
|
|
|
Steps to run. Default is "{steps}". Available steps are: |
|
|
|
- "tex" produce .tex file from templates; |
|
|
|
- "pdf" compile .tex file; |
|
|
|
- "sbx" compile index files; |
|
|
|
- "clean" remove temporary files; |
|
|
|
- any string beginning with '#' (in this case, it will be run in a shell). |
|
|
|
Several steps (excepted the custom shell command) can be combinend in one --steps argument, as a comma separated string. |
|
|
|
|
|
|
|
Substring {{basename}} is replaced by the basename of the song book, and substrings {{aux}}, {{log}}, {{out}}, {{pdf}}, {{sxc}}, {{tex}} are replaced by "<BASENAME>.aux", "<BASENAME>.log", and so on. |
|
|
|
""".format(steps=','.join(DEFAULT_STEPS))), |
|
|
|
default=None, |
|
|
|
) |
|
|
|