-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Lower dependencies (#232) * ✨ port minimum requirement test via pypi-mobans from pyexcel. #187 * 🐛 fix travis ci file * 🐛 update unit tests * :wheel_chair: lower the dependencies * 💄 pump up the version number * Minor code refactoring (#236) * 🔨 code refactoring * 💄 reformat code * 📚 fix doc build * 🐛 fix docs build * Initial prototype for 202 template types (#239) * 🔨 code refactoring * 💄 reformat code * 🔥 remove MobanEngine's reference to the engine class * 🔨 refactoring the code and un-bury engine instance * ✨ initial prototype, not tested. #235 * 📚 fix doc build * 🐛 fix docs build * 🔨 refactoring. user define template takes precedence * 🔬 test user define engine * ✨ associate user defined file extensions with user defined template engine name, i.e. custom_jinja for jinja2, custom_handlebars for handlebars, #235 * ✨ take template types from moban file. related to #233 * 🔨 address the feedback * 🐛 fix typos and add line feed * 💄 beautify the code * 📚 provide documentation on template_types under configuration. fix #237 (#240) * 📚 update change log.#232, #235 * 💄 address review feedback
- Loading branch information
Showing
33 changed files
with
260 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% include "conf.py.jj2" %} | ||
|
||
master_doc = "index" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
docs/level-18-user-defined-template-types/.moban.cd/data.base.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
nihao: shijie | ||
hello: shijie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
configuration: | ||
template_types: | ||
my_own_type: | ||
base_type: jinja2 | ||
file_extensions: | ||
- file_type_of_my_choice | ||
options: | ||
extensions: | ||
- jinja2_time.TimeExtension | ||
targets: | ||
- a.output: a.template.file_type_of_my_choice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Level 18: User defined template types | ||
================================================================================ | ||
|
||
Since moban version 4.1, custom template types can be defined to deviate from | ||
default configurations of the template engines. In addition, the configuration | ||
possibilities are: | ||
|
||
#. associate your own file extensions | ||
#. choose your own template engine extensions | ||
#. | ||
|
||
|
||
Evaluation | ||
-------------------------------------------------------------------------------- | ||
|
||
Please go to `docs/level-4-single-command` directory. | ||
|
||
|
||
Here is the `.moban.yml`, which inserts `template_types` on top of the moban | ||
file found in level 4:: | ||
|
||
configuration: | ||
template_types: | ||
my_own_type: | ||
base_type: jinja2 | ||
file_extensions: | ||
- file_type_of_my_choice | ||
options: | ||
extensions: | ||
- jinja2_time.TimeExtension | ||
targets: | ||
- a.output: a.template.file_type_of_my_choice | ||
|
||
|
||
where `template_types` is a dictionary of different custom types |
2 changes: 2 additions & 0 deletions
2
docs/level-18-user-defined-template-types/a.template.file_type_of_my_choice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% now 'utc' %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
overrides: data.base.yaml | ||
hello: world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
nihao: shijie | ||
hello: shijie | ||
hello: shijie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
overrides: data.base.yaml | ||
hello: world | ||
hello: world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ruamel.yaml==0.15.5 | ||
jinja2==2.7.1 | ||
lml==0.0.9 | ||
appdirs==1.2.0 | ||
crayons== 0.1.0 | ||
GitPython==2.0.0 | ||
giturlparse==0.9.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
__version__ = "0.4.0" | ||
__version__ = "0.4.1" | ||
__author__ = "C. W." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.