From e80e4d436248d7129e3c9d58dfa61c28565a3e92 Mon Sep 17 00:00:00 2001 From: Scott Bahling Date: Sat, 23 Mar 2013 15:02:28 +0100 Subject: Change --srcdir to --docdir Avoid confusion with the src/ path that contain the document sources --- panfry/cli.py | 14 +++++++------- panfry/main.py | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/panfry/cli.py b/panfry/cli.py index 6045e31..3ec6151 100755 --- a/panfry/cli.py +++ b/panfry/cli.py @@ -50,7 +50,7 @@ Args: flags: [-q, --quiet] action: store_true default: False - help: 'Turn off all (debug, warn, info) messages.' + help: 'Turn off all (debug, warn, info) messages' logfile: flags: [-L, --logfile] @@ -62,10 +62,10 @@ Args: default: './pub' help: 'Directory to place generated documents' - src_path: - flags: [-s, --srcdir] + doc_path: + flags: [-s, --docdir] default: '.' - help: 'Directory where document source is located' + help: 'Directory where document content is located' templates_path: flags: [-T, --templates] @@ -76,8 +76,8 @@ Args: flags: [-C, --css] default: 'css/style.css' help: | - css file for html pages. - Includes full path relative to html directory. + css file for html pages + Includes full path relative to html directory simple_toc: flags: [--simple-toc] @@ -109,7 +109,7 @@ Subparsers: gen: help: generate document from source args: - - src_path + - doc_path - pub_path - templates_path - simple_toc diff --git a/panfry/main.py b/panfry/main.py index 0b88c0a..100ca74 100755 --- a/panfry/main.py +++ b/panfry/main.py @@ -10,14 +10,14 @@ from panfry.document import Document def get_env(): env = panfry.cli.init_argparser().parse_args() - if not os.path.isdir(env.src_path): - print("%s directory not found. Aborting..." % env.src_path) + if not os.path.isdir(env.doc_path): + print("%s directory not found. Aborting..." % env.doc_path) exit(1) env.pub_path = os.path.abspath(env.pub_path) if not env.templates_path: - env.templates_path = os.path.join(env.src_path, 'templates') + env.templates_path = os.path.join(env.doc_path, 'templates') if not os.path.isdir(env.templates_path): print("No templates path found. Aborting...") @@ -28,7 +28,7 @@ def get_env(): def main(): env = get_env() - document = Document(env.src_path) + document = Document(env.doc_path) document.set_templater(Templater(env.templates_path)) if env.simple_toc: document.set_simple_toc -- cgit v1.2.3