Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .moban.cd/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: moban
organisation: moremoban
releases:
- changes:
- action: Updated
details:
- "Command options have been grouped. --template_type became --template-type"
date: tbd
version: 0.6.4
- changes:
- action: Added
details:
Expand Down
4 changes: 2 additions & 2 deletions .moban.cd/moban.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ organisation: moremoban
author: C. W.
contact: wangc_2011@hotmail.com
license: MIT
version: 0.6.3
current_version: 0.6.3
version: 0.6.4
current_version: 0.6.4
release: 0.6.3
branch: master
master: index
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Change log
================================================================================

0.6.4 - tbd
--------------------------------------------------------------------------------

Updated
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#. Command options have been grouped. --template_type became --template-type

0.6.3 - 25.09.2019
--------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
copyright = '2017-2019 Onni Software Ltd.'
author = 'C. W.'
# The short X.Y version
version = '0.6.3'
version = '0.6.4'
# The full version, including alpha/beta/rc tags
release = '0.6.3'

Expand Down
2 changes: 1 addition & 1 deletion moban/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.6.3"
__version__ = "0.6.4"
__author__ = "C. W."
2 changes: 1 addition & 1 deletion moban/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Configurations
PROGRAM_NAME = "moban"
PROGRAM_DESCRIPTION = (
"Yet another jinja2 cli command for static " + "text generation"
"Static text generator using any template, any data and any location."
)
DEFAULT_YAML_SUFFIX = ".yml"
# .moban.yml, default moban configuration file
Expand Down
91 changes: 50 additions & 41 deletions moban/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,80 +89,89 @@ def create_parser():
prog=constants.PROGRAM_NAME, description=constants.PROGRAM_DESCRIPTION
)
parser.add_argument(
"-cd",
"--%s" % constants.LABEL_CONFIG_DIR,
help="the directory for configuration file lookup",
"-c", "--%s" % constants.LABEL_CONFIG, help="the data file"
)
parser.add_argument(
"-t", "--%s" % constants.LABEL_TEMPLATE, help="the template file"
)
parser.add_argument(
"-c", "--%s" % constants.LABEL_CONFIG, help="the dictionary file"
"-o", "--%s" % constants.LABEL_OUTPUT, help="the output file"
)
parser.add_argument(
constants.POSITIONAL_LABEL_TEMPLATE,
metavar="template",
type=str,
nargs="?",
help="string templates",
)
advanced = parser.add_argument_group(
"Advanced options", "For better control"
)
advanced.add_argument(
"-td",
"--%s" % constants.LABEL_TMPL_DIRS,
nargs="*",
help="the directories for template file lookup",
help="add more directories for template file lookup",
)
parser.add_argument(
"-t", "--%s" % constants.LABEL_TEMPLATE, help="the template file"
advanced.add_argument(
"-cd",
"--%s" % constants.LABEL_CONFIG_DIR,
help="the directory for configuration file lookup",
)
parser.add_argument(
"-o", "--%s" % constants.LABEL_OUTPUT, help="the output file"
advanced.add_argument(
"-m", "--%s" % constants.LABEL_MOBANFILE, help="custom moban file"
)
parser.add_argument(
"--%s" % constants.LABEL_TEMPLATE_TYPE,
advanced.add_argument(
"-g", "--%s" % constants.LABEL_GROUP, help="a subset of targets"
)
advanced.add_argument(
"--%s" % constants.LABEL_TEMPLATE_TYPE.replace("_", "-"),
help="the template type, default is jinja2",
)
parser.add_argument(
advanced.add_argument(
"-d",
"--%s" % constants.LABEL_DEFINE,
nargs="+",
help=(
"to supply additional or override predefined variables,"
+ " format: VAR=VALUEs"
),
)
advanced.add_argument(
"-e",
"--%s" % constants.LABEL_EXTENSION,
nargs="+",
help="to to TEMPLATE_TYPE=EXTENSION_NAME",
)
advanced.add_argument(
"-f",
action="store_true",
dest=constants.LABEL_FORCE,
default=False,
help="force moban to template all files despite of .moban.hashes",
)
parser.add_argument(
developer = parser.add_argument_group(
"Developer options", "For debugging and development"
)
developer.add_argument(
"--%s" % constants.LABEL_EXIT_CODE,
action="store_true",
dest=constants.LABEL_EXIT_CODE,
default=False,
help="tell moban to change exit code",
)
parser.add_argument(
"-m", "--%s" % constants.LABEL_MOBANFILE, help="custom moban file"
)
parser.add_argument(
"-g", "--%s" % constants.LABEL_GROUP, help="a subset of targets"
)
parser.add_argument(
constants.POSITIONAL_LABEL_TEMPLATE,
metavar="template",
type=str,
nargs="?",
help="string templates",
)
parser.add_argument(
developer.add_argument(
"-V",
"--%s" % constants.LABEL_VERSION,
action="version",
version="%(prog)s {v}".format(v=__version__),
)
parser.add_argument(
developer.add_argument(
"-v",
action="count",
dest=constants.LABEL_VERBOSE,
default=0,
help="show verbose",
)
parser.add_argument(
"-d",
"--%s" % constants.LABEL_DEFINE,
nargs="+",
help="to take a list of VAR=VALUEs",
)
parser.add_argument(
"-e",
"--%s" % constants.LABEL_EXTENSION,
nargs="+",
help="to add an extension to TEMPLATE_TYPE=EXTENSION_NAME",
help="show verbose, try -v, -vv",
)
return parser

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

NAME = "moban"
AUTHOR = "C. W."
VERSION = "0.6.3"
VERSION = "0.6.4"
EMAIL = "wangc_2011@hotmail.com"
LICENSE = "MIT"
ENTRY_POINTS = {
Expand Down