Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
.. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png :target: https://www.patreon.com/chfw
.. image:: https://api.travis-ci.org/moremoban/moban.svg?branch=master :target: http://travis-ci.org/moremoban/moban
.. image:: https://dev.azure.com/moremoban/moban/_apis/build/status/moremoban.moban :target: https://dev.azure.com/moremoban/moban/_build?definitionId=1&_a=summary
.. image:: https://codecov.io/gh/moremoban/moban/branch/master/graph/badge.svg :target: https://codecov.io/gh/moremoban/moban
.. image:: https://badge.fury.io/py/moban.svg :target: https://pypi.org/project/moban
.. image:: https://pepy.tech/badge/moban :target: https://pepy.tech/project/moban
.. image:: https://readthedocs.org/projects/moban/badge/?version=latest :target: http://moban.readthedocs.org/en/latest/
.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg :target: https://gitter.im/chfw_moban/Lobby
:Author: C.W. and its contributors (See contributors.rst) :Issues: http://github.com/moremoban/moban/issues :License: MIT
In version 0.8.0, moban.plugins.jinja2.tests.files
is moved to moban-ansible
package. moban.plugins.jinja2.filters.github
is moved to moban-jinja2-github
package Please install them for backward compatibility.
.. code-block:: bash
$ export HELLO="world"
$ moban "{{HELLO}}"
world
Or
.. code-block:: bash
$ export HELLO="world"
$ echo "{{HELLO}}" | moban
Or simply
.. code-block:: bash
$ HELLO="world" moban "{{HELLO}}"
A bit formal example:
.. code-block:: bash
$ moban -c data.yml -t my.template
world
Given data.yml as:
.. code-block:: bash
hello: world
and my.template as:
.. code-block:: bash
{{hello}}
Please note that data.yml will take precedence over environment variables.
Suppose there exists shared/base.jj2
, and two templates child1.jj2
and
child2.jj2
derives from it. You can do:
.. code-block:: bash
$ moban -t child1.jj2 -td shared -o child1
$ moban -t child2.jj2 -td shared -o child2
Effectively each data file you give to moban, it overrides environment variables.
Still you can have different layers of data. For example, you can have
shared/company_info.yml
, use project1.yml
for project 1 and
project2.yml
for project 2. In each of the derived data file, simply mention:
.. code-block:: bash
overrides: company_info.yml ...
Here is the command line to use your data:
.. code-block:: bash
$ moban -cd shared -c project1.yaml -t README.jj2
moban allows the injection of user preferred jinja2 extensions:
.. code-block:: bash
$ moban -e jj2=jinja2_time.TimeExtension ...
Sure, you can use the same '-e' syntax:
.. code-block:: bash
$ moban -e jinja2=filter:module.path.filter_function
jinja2=test:module.path.test_function
jinja2=global:identifier=module.path.variable
In this case, you would have to include the external library in your own requirements.txt
Here is an example:
.. code-block:: bash
$ moban -e jinja2=filter:moban.externals.file_system.url_join
jinja2=test:moban.externals.file_system.exists
jinja2=global:description=moban.constants.PROGRAM_DESCRIPTION
-t "{{ 'a'|url_join('b')}} {{'b' is exists}}"
moban allows the freedom of craftsmanship. Please refer to the docs for more details. Here is an example:
.. code-block:: python
import sys import base64
from moban.plugins.jinja2.extensions import JinjaFilter
@JinjaFilter() def base64encode(string): if sys.version_info[0] > 2: content = base64.b64encode(string.encode("utf-8")) content = content.decode("utf-8") else: content = base64.b64encode(string) return content
And you can use it within your jinja2 template, mytest.jj2
:
.. code-block:: python
{{ 'abc' | base64encode }}
Assume that the custom example was saved in custom-jj2-plugin
.. code-block:: bash
$ moban -pd custom-jj2-plugin -t mytest.jj2 ...
Moban will then load your custom jinja2 functions
with moban-slim <https://github.com/moremoban/moban-slim>
_ installed,
Given a data.json file with the following content
.. code-block::
{
"person": {
"firstname": "Smith",
"lastname": "Jones",
},
}
.. code-block:: bash
$ moban --template-type slim -c data.json "{{person.firstname}} {{person.lastname}}" Smith Jones
With moban-handlebars <https://github.com/moremoban/moban-handlebars>
_
installed,
Given a data.json file with the following content
.. code-block::
{
"person": {
"firstname": "Yehuda",
"lastname": "Katz",
},
}
.. code-block:: bash
$ moban --template-type handlebars -c data.json "{{person.firstname}} {{person.lastname}}" Yehuda Katz
For handlebars.js
users, yes, the example was copied from handlebarjs.com. The
aim is to show off what we can do.
Let's continue with a bit more fancy feature:
.. code-block:: bash
$ moban --template-type handlebars -c data.json "{{#with person}}{{firstname}} {{lastname}} {{/with}}"
Moban's way of pybar3 usage <https://github.com/wbond/pybars3#usage>
_:
Let's save the following file a script.py
under helper_and_partial
folder:
.. code-block:: python
from moban_handlebars.api import Helper, register_partial
register_partial('header', '
@Helper('list') def _list(this, options, items): result = [u'
And given data.json
reads as the following:
.. code-block::
{ "people":[ {"name": "Bill", "age": 100}, {"name": "Bob", "age": 90}, {"name": "Mark", "age": 25} ] }
Let's invoke handlebar template:
.. code-block:: bash
$ moban --template-type hbs -pd helper_and_partial -c data.json "{{>header}}{{#list people}}{{name}} {{age}}{{/list}}" Handlebars-ing {{>header}... to moban.output Handlebarsed 1 file. $ cat moban.output
With moban-velocity <https://github.com/moremoban/moban-velocity>
_
installed,
Given the following data.json:
.. code-block::
{"people": [ {"name": "Bill", "age": 100}, {"name": "Bob", "age": 90}, {"name": "Mark", "age": 25} ] }
And given the following velocity.template:
.. code-block::
Old people: #foreach ($person in $people) #if($person.age > 70) $person.name #end #end
Third person is $people[2].name
moban can do the template:
.. code-block:: bash
$ moban --template-type velocity -c data.json -t velocity.template Old people:
Bill
Bob
Third person is Mark
Yes and please check for more details <https://github.com/moremoban/moban/tree/dev/tests/regression_tests/level-7-b-template-engine-plugin>
_.
Given the following template type function, and saved in custom-plugin dir:
.. code-block:: python
from moban.core.content_processor import ContentProcessor
@ContentProcessor("de-duplicate", "De-duplicating", "De-duplicated") def de_duplicate(content: str, options: dict) -> str: lines = content.split(b'\n') new_lines = [] for line in lines: if line not in new_lines: new_lines.append(line) return b'\n'.join(new_lines)
You can start using it like this:
.. code-block:: bash
$ moban --template-type de-duplicate -pd custom-plugin -t duplicated_content.txt
moban-anyconfig <https://github.com/moremoban/moban-anyconfig>
_ should be installed first.
Given the following toml file, sample.toml:
.. code-block::
title = "TOML Example" [owner] name = "Tom Preston-Werner"
You can do:
.. code-block:: bash
$ moban -c sample.toml "{{owner.name}} made {{title}}" Tom Preston-Werner made TOML Example
Not limited to toml, you can supply moban with the following data formats:
.. csv-table:: Always supported formats, quoting from python-anyconfig :header: "Format", "Type", "Requirement" :widths: 15, 10, 40
JSON, json, json
(standard lib) or simplejson
Ini-like, ini, configparser
(standard lib)
Pickle, pickle, pickle
(standard lib)
XML, xml, ElementTree
(standard lib)
Java properties, properties, None (native implementation with standard lib)
B-sh, shellvars, None (native implementation with standard lib)
For any of the following data formats, you elect to install by yourself.
.. csv-table:: Supported formats by pluggable backend modules :header: "Format", "Type", "Required backend" :widths: 15, 10, 40
Amazon Ion, ion, anyconfig-ion-backend
BSON, bson, anyconfig-bson-backend
CBOR, cbor, anyconfig-cbor-backend
or anyconfig-cbor2-backend
ConifgObj, configobj, anyconfig-configobj-backend
MessagePack, msgpack, anyconfig-msgpack-backend
Or you could choose to install all:
.. code-block:: bash
$ pip install moban-anyconfig[all-backends]
Why not to use python-anyconfig itself, but yet another package?
moban gives you a promise of any location which python-anyconfig
does not support.
Why do it mean 'any location'?
Thanks to pyfilesystem 2 <https://github.com/PyFilesystem/pyfilesystem2>
,
moban is able to read data back from git repo <https://github.com/moremoban/gitfs2>
, pypi <https://github.com/moremoban/pypifs>
_ package, http(s) <https://github.com/moremoban/httpfs>
, zip,
tar, ftp, s3 <https://github.com/PyFilesystem/s3fs>
or you name it <https://www.pyfilesystem.org/page/index-of-filesystems/>
_.
httpfs <https://github.com/moremoban/httpfs>
_ should be installed first.
With httpfs, moban
_ can access any files over http(s) as its
template or data file:
.. code-block:: bash
$ moban -t 'https://raw.githubusercontent.com/moremoban/pypi-mobans/dev/templates/_version.py.jj2'\
-c 'https://raw.githubusercontent.com/moremoban/pypi-mobans/dev/config/data.yml'\
-o _version.py
.. _moban: https://github.com/moremoban/moban
In an edge case, if github repo's public url is given, this github repo shall not have sub repos. This library will fail to translate sub-repo as url. No magic.
gitfs2 <https://github.com/moremoban/gitfs2>
_ is optional since v0.7.0 but was
installed by default since v0.6.1
You can do the following with moban:
.. code-block:: bash
$ moban -t 'git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2' \
-c 'git://github.com/moremoban/pypi-mobans.git!/config/data.yml' \
-o _version.py
Info: Found repo in /Users/jaska/Library/Caches/gitfs2/repos/pypi-mobans
Templating git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2 to _version.py
Templated 1 file.
$ cat _version.py
__version__ = "0.1.1rc3"
__author__ = "C.W."
pypifs <https://github.com/moremoban/pypifs>
_ is optional since v0.7.0 but
was installed by default since v0.6.1
You can do the following with moban:
.. code-block:: bash
$ moban -t 'pypi://pypi-mobans-pkg/resources/templates/_version.py.jj2' \
-c 'pypi://pypi-mobans-pkg/resources/config/data.yml' \
-o _version.py
Collecting pypi-mobans-pkg
....
Installing collected packages: pypi-mobans-pkg
Successfully installed pypi-mobans-pkg-0.0.7
Templating pypi://pypi-mobans-pkg/resources/templates/_version.py.jj2 to _version.py
Templated 1 file.
$ cat _version.py
__version__ = "0.1.1rc3"
__author__ = "C.W."
Please install fs-s3fs <https://github.com/PyFilesystem/s3fs>
_::
$ pip install fs-s3fs
Then you can access your files in s3 bucket:
.. code-block:: bash
$ moban -c s3://${client_id}:${client_secrect}@moremoban/s3data.yml \
-o 'zip://my.zip!/moban.output' {{hello}}
$ unzip my.zip
$ cat moban.output
world
Where the configuration sits in a s3 bucket, the output is a file in a zip. The content of s3data.yaml is:
.. code-block:
hello: world
Here is a list of other usages:
#. Django Mobans <https://github.com/django-mobans>
, templates for django, docker etc.
#. Math Sheets <https://github.com/chfw/math-sheets>
, generate custom math sheets in pdf
.. image:: https://github.com/moremoban/moban/raw/dev/docs/images/moban-in-pyexcel-demo.gif
moban enabled continuous templating in pyexcel <https://github.com/pyexcel/pyexcel>
_ and
coala <https://github.com//coala/coala>
_ project to keep
documentation consistent across the documentations of individual libraries in the same
organisation. Here is the primary use case of moban, as of now:
.. image:: https://github.com/moremoban/yehua/raw/dev/docs/source/_static/yehua-story.png :width: 600px
All use cases are documented <http://moban.readthedocs.org/en/latest/#tutorial>
_
If you like moban, please support me on github,
patreon <https://www.patreon.com/bePatron?u=5537627>
_
or bounty source <https://salt.bountysource.com/teams/chfw-pyexcel>
_ to maintain
the project and develop it further.
With your financial support, I will be able to invest a little bit more time in coding, documentation and writing interesting extensions.
Any template, any data in any location
moban started with bringing the high performance template engine (JINJA2) for web into static text generation.
moban can use other python template engine: mako, handlebars, velocity, haml, slim and tornado, can read other data format: json and yaml, and can access both template file and configuration file in any location: zip, git, pypi package, s3, etc.
jinja2-fsloader <https://github.com/althonos/jinja2-fsloader>
_ is the key component to enable PyFilesystem2 support in moban
v0.6x. Please show your stars there too!
You can install it via pip:
.. code-block:: bash
$ pip install moban
or clone it and install it:
.. code-block:: bash
$ git clone http://github.com/moremoban/moban.git
$ cd moban
$ python setup.py install
.. code-block:: bash
usage: moban [-h] [-c CONFIGURATION] [-t TEMPLATE] [-o OUTPUT]
[-td [TEMPLATE_DIR [TEMPLATE_DIR ...]]]
[-pd [PLUGIN_DIR [PLUGIN_DIR ...]]] [-cd CONFIGURATION_DIR]
[-m MOBANFILE] [-g GROUP] [--template-type TEMPLATE_TYPE]
[-d DEFINE [DEFINE ...]] [-e EXTENSION [EXTENSION ...]] [-f]
[--exit-code] [-V] [-v]
[template]
Static text generator using any template, any data and any location.
positional arguments:
template string templates
optional arguments:
-h, --help show this help message and exit
-c CONFIGURATION, --configuration CONFIGURATION
the data file
-t TEMPLATE, --template TEMPLATE
the template file
-o OUTPUT, --output OUTPUT
the output file
Advanced options:
For better control
-td [TEMPLATE_DIR [TEMPLATE_DIR ...]], --template_dir [TEMPLATE_DIR [TEMPLATE_DIR ...]]
add more directories for template file lookup
-cd CONFIGURATION_DIR, --configuration_dir CONFIGURATION_DIR
the directory for configuration file lookup
-pd [PLUGIN_DIR [PLUGIN_DIR ...]], --plugin_dir [PLUGIN_DIR [PLUGIN_DIR ...]]
add more directories for plugin lookup
-m MOBANFILE, --mobanfile MOBANFILE
custom moban file
-g GROUP, --group GROUP
a subset of targets
--template-type TEMPLATE_TYPE
the template type, default is jinja2
-d DEFINE [DEFINE ...], --define DEFINE [DEFINE ...]
to supply additional or override predefined variables,
format: VAR=VALUEs
-e EXTENSION [EXTENSION ...], --extension EXTENSION [EXTENSION ...]
to to TEMPLATE_TYPE=EXTENSION_NAME
-f force moban to template all files despite of
.moban.hashes
Developer options:
For debugging and development
--exit-code by default, exist code 0 means no error, 1 means error
occured. It tells moban to change 1 for changes, 2 for
error occured
-V, --version show program's version number and exit
-v show verbose, try -v, -vv, -vvv
In alphabetical order:
Andrew Scheller <https://api.github.com/users/lurch>
_Ayan Banerjee <https://api.github.com/users/ayan-b>
_Charlie Liu <https://api.github.com/users/CLiu13>
_John Vandenberg <https://api.github.com/users/jayvdb>
_Joshua Chung <https://api.github.com/users/seeeturtle>
_PRAJWAL M <https://api.github.com/users/PrajwalM2212>
_salotz <https://api.github.com/users/salotz>
_SerekKiri <https://api.github.com/users/SerekKiri>
_Fixed
#. Use any functions, any data structure of any python packages as jinja2 filters, tests, globals
Fixed
#. #399 <https://github.com/moremoban/moban/issues/399>
_: content processor
should be called only once
#. content processor shall pass on options to content processors
Removed
#. moban.plugins.jinja2.tests.files is moved to moban-ansible package #. moban.plugins.jinja2.filters.github is moved to moban-jinja2-github package
Fixed
#. #396 <https://github.com/moremoban/moban/issues/396>
_: custom jinja2
plugins(filters, tests and globals) are not visible if a template is passed
as a string.
Updated
#. #393 <https://github.com/moremoban/moban/issues/393>
_: Rendered content
output to stdout once
Updated
#. #390 <https://github.com/moremoban/moban/issues/390>
_: single render action
will print to stdout by default
Added
#. #313 <https://github.com/moremoban/moban/issues/313>
_: Non-textual source
files should default to copy
Added
#. -pd
for command line to include custom plugin directories
Fixed
#. strip did not work in 0.7.6
Added
#. #38 <https://github.com/moremoban/moban/issues/38>
_: finally be able strip
the rendered content
Added
#. #167 <https://github.com/moremoban/moban/issues/167>
_: reverse what moban
have done: delete
Fixed
#. #378 <https://github.com/moremoban/moban/issues/378>
_: suppress stdout
message from deprecated pip install. but please do not use and migrate
deprecatedrequires
syntax.
Added
#. Added continuous check in travis for setup.py descriptions. No impact to moban user.
Added
#. Support for templates and configuration files over HTTP(S) protocol with httpfs! Yepee!
Fixed
#. #365 <https://github.com/moremoban/moban/issues/365>
_: regression was
introduced by v0.6.5. If you uses mobanfile as data configuration file, you
are very likely to have this show stopper. Please upgrade to this version.
Removed
#. #360 <https://github.com/moremoban/moban/issues/360>
: make gitfs2 and
pypifs optional.
#. #303 <https://github.com/moremoban/moban/issues/303>
: python 2.7 support
is dropped.
Updated
#. #360 <https://github.com/moremoban/moban/issues/360>
_: show friendlier
error when unknown protocol exception was raised.
Updated
#. since version 0.5.0, when rendering a single file or string, moban would report 'Templated 1 of 0 files', which should have been 'Templated 1 file.'
Removed
#. python 3.4 support is gone because colorama requires Python '>=2.7, !=3.0., !=3.1., !=3.2., !=3.3., !=3.4.*'
Updated
#. no verbose for error, -v for warning, -vv for warning+info, -vvv for
warning+info+debug
#. #351 <https://github.com/moremoban/moban/issues/351>
_, show template plugin
name, i.e. 'copying' for copy instead of 'templating'
Removed
#. Message: 'Warning: Attempting to use environment vars as data...' became warning log #. Message: 'Warning: Both data.yml and /.../.moban.cd/data.yml does not exist' became warning log #. with -v, you would see them in such a situation
Added
#. support moban file inheritance. one base moban file and child repos can inherit and override
Added
#. #335 <https://github.com/moremoban/moban/issues/335>
_: support intermediate
targets in moban file
Updated
#. Command options have been grouped. --template_type became --template-type
#. Increment gitfs2 to version 0.0.2. gitfs#4 <https://github.com/moremoban/gitfs/issues/4>
_
Added
#. #260 <https://github.com/moremoban/moban/issues/260>
_: jinja-cli parity:
support command line pipe stream.
Added
#. #322 <https://github.com/moremoban/moban/issues/322>
: Implicit targets
with template extensions default to copy
#. #257 <https://github.com/moremoban/moban/issues/257>
: '-e' to load
extensions for template engines, i.e. jinja2
#. #333 <https://github.com/moremoban/moban/issues/333>
_: command line
template fails with version 0.6.1
Fixed
#. #328 <https://github.com/moremoban/moban/issues/328>
_: update backward
compatibility
Added
#. #205 <https://github.com/moremoban/moban/issues/205>
: support
pyFilesystem2 <https://pyfilesystem2.readthedocs.io/>
#. #185 <https://github.com/moremoban/moban/issues/185>
: -v will enable moban
application logging for development. And -V is for version.
#. #325 <https://github.com/moremoban/moban/issues/325>
: -vv show debug trace
#. #126 <https://github.com/moremoban/moban/issues/126>
: Allow mobanfile to
include data from arbitrary config files
#. #256 <https://github.com/moremoban/moban/issues/256>
: jinja2-cli parity:
'-d hello=world' to define custom variable on cli
Updated
#. #275 <https://github.com/moremoban/moban/issues/275>
_: fix moban 0.4.5 test
failures on openSUSE Tumbleweed
Updated
#. #277 <https://github.com/moremoban/moban/issues/277>
: Restored dependency
git-url-parse, replacing incompatible giturlparse which was used during moban
0.4.x
#. #281 <https://github.com/moremoban/moban/issues/281>
: Fixed unicode
support on Python 2.7
#. #274 <https://github.com/moremoban/moban/issues/274>
: Updated ruamel.yaml
dependency pins to restore support for Python 3.4, and prevent installation
of versions that can not be installed on Python 3.7
#. #285 <https://github.com/moremoban/moban/issues/285>
: Fixed CI testing of
minimum requirements
#. #271 <https://github.com/moremoban/moban/issues/271>
: Fixed repository
caching bug preventing branch switching
#. #292 <https://github.com/moremoban/moban/issues/292>
: Reformatted YAML
files according to yamllint rules
#. #291 <https://github.com/moremoban/moban/issues/291>
: Fixed filename typos
in README
#. #280 <https://github.com/moremoban/moban/issues/280>
: Added CI to ensure
repository is in sync with upstream
#. #280 <https://github.com/moremoban/moban/issues/280>
_: sync setup.py from
pypi-mobans
Updated
#. #271 <https://github.com/moremoban/moban/issues/271>
_: support git branch
change in later run.
Updated
#. #265 <https://github.com/moremoban/moban/issues/265>
_: Use simple read binary
to read instead of encoding
Removed
#. #253 <https://github.com/moremoban/moban/issues/253>
_: symbolic link in
regression pack causes python setup.py to do recursive include
Added
#. #209 <https://github.com/moremoban/moban/issues/209>
_: Alert moban user
when git
is not available and is used.
Updated
#. #261 <https://github.com/moremoban/moban/issues/261>
_: since moban group
template files per template type, this fill use first come first register to
order moban group
Added
#. #234 <https://github.com/moremoban/moban/issues/234>
: Define template
parameters on the fly inside targets
section
#. #62 <https://github.com/moremoban/moban/issues/62>
: select a group target
to run
Updated
#. #180 <https://github.com/moremoban/moban/issues/180>
: No longer two
statistics will be shown in v0.4.x. legacy copy targets are injected into a
normal targets. cli target is made a clear priority.
#. #244 <https://github.com/moremoban/moban/issues/244>
: version 0.4.2 is
first version which would work perfectly on windows since 17 Nov 2018. Note
that: file permissions are not used on windows. Why the date? because
samefile is not avaiable on windows, causing unit tests to fail hence it lead
to my conclusion that moban version between 17 Nov 2018 and March 2019 wont
work well on Windows.
Added
#. #235 <https://github.com/moremoban/moban/issues/235>
: user defined
template types so that custom file extensions, template configurations can be
controlled by moban user
#. #232 <https://github.com/moremoban/moban/issues/232>
: the package
dependencies have been fine tuning to lower versions, most of them are dated
back to 2017.
Added
#. #165 <https://github.com/moremoban/moban/issues/165>
_: Copy as plugins
Updated
#. #219 <https://github.com/moremoban/moban/issues/219>
: git clone depth set
to 2
#. #186 <https://github.com/moremoban/moban/issues/186>
: lowest dependecy on
ruamel.yaml is 0.15.5, Jun 2017
Added
#. #174 <https://github.com/moremoban/moban/issues/174>
: Store git cache in
XDG_CACHE_DIR
#. #107 <https://github.com/moremoban/moban/issues/107>
: Add -v to show
current moban version
#. #164 <https://github.com/moremoban/moban/issues/164>
_: support additional
data formats
Updated
#. #178 <https://github.com/moremoban/moban/issues/178>
: UnboundLocalError:
local variable 'target' referenced before assignment
#. #169 <https://github.com/moremoban/moban/issues/169>
: uses GitPython
instead of barebone git commands
Updated
#. #90 <https://github.com/moremoban/moban/issues/90>
: allow adding extra
jinja2 extensions. jinja2.ext.do
, jinja2.ext.loopcontrols
are included by
default. what's more, any other template enigne are eligible for extension
additions.
#. #158 <https://github.com/moremoban/moban/issues/158>
: Empty file
base_engine.py is finally removed
Updated
#. #141 <https://github.com/moremoban/moban/issues/141>
: disable file
permissions copy feature and not to check file permission changes on windows.
#. #154 <https://github.com/moremoban/moban/issues/154>
: introduce first ever
positional argument for string base template.
#. #157 <https://github.com/moremoban/moban/issues/157>
_: the exit code
behavior changed. for backward compactibility please use --exit-code.
Otherwise, moban will not tell if there is any changes.
Updated
#. #146 <https://github.com/moremoban/moban/issues/146>
: added a low-setup
usage mode via environment variables to moban
#. #148 <https://github.com/moremoban/moban/issues/148>
: include test related
files in the package for package validation when distributing via linux
system, i.e. OpenSuse
Updated
#. #143 <https://github.com/moremoban/moban/issues/143>
: moban shall report
permission error and continue the rest of the copying task.
#. #122 <https://github.com/moremoban/moban/issues/122>
: Since 0.3.6, moban
is tested on windows and macos too, using azure build pipelines. It is
already tested extensively on travis-ci on linux os.
Updated
#. #37 <https://github.com/moremoban/moban/issues/37>
_: moban will report line
number where the value is empty and the name of mobanfile. Switch from pyyaml
to ruamel.yaml.
Updated
#. #137 <https://github.com/moremoban/moban/issues/137>
_: missing
contributors.rst file
Added
#. global variables to store the target and template file names in the jinja2 engine #. moban-handlebars is tested to work well with this version and above
Updated
#. Template engine interface has been clarified and documented
Added
#. alternative and expanded syntax for requires, so as to accomendate github submodule recursive
Added
#. configuration dirs may be located by requires
, i.e. configuration files may
be in a python package or git repository.
Added
#. #97 <https://github.com/moremoban/moban/issues/97>
_: requires will clone a
repo if given. Note: only github, gitlab, bitbucket for now
Added
#. #89 <https://github.com/moremoban/moban/issues/89>
_: Install pypi-hosted
mobans through requires syntax
Updated
#. #96 <https://github.com/moremoban/moban/issues/96>
_: Fix for
FileNotFoundError for plugins
#. various documentation updates
Removed
#. #88 <https://github.com/moremoban/moban/issues/88>
_: removed python 2.6
support
#. removed python 3.3 support
Added
#. #32 <https://github.com/moremoban/moban/issues/32>
: option 1 copy a
directory without its subdirectories.
#. #30 <https://github.com/moremoban/moban/issues/30>
: command line template
option is ignore when a moban file is present
Added
#. #76 <https://github.com/moremoban/moban/issues/76>
: running moban as a
module from python command
#. #32 <https://github.com/moremoban/moban/issues/32>
: copy a directory
recusively
#. #33 <https://github.com/moremoban/moban/issues/33>
_: template all files in
a directory
Added
#. #31 <https://github.com/moremoban/moban/issues/31>
_: create directory if
missing during copying
Updated
#. #28 <https://github.com/moremoban/moban/issues/28>
_: if a template has been
copied once before, it is skipped in the next moban call
Updated
#. templates using the same template engine will be templated as a group #. update lml dependency to 0.0.3
Added
#. #18 <https://github.com/moremoban/moban/issues/18>
: file exists test
#. #23 <https://github.com/moremoban/moban/issues/23>
: custom jinja plugins
#. #26 <https://github.com/moremoban/moban/issues/26>
: repr filter
#. #47 <https://github.com/moremoban/moban/issues/47>
: allow the expansion of
template engine
#. #58 <https://github.com/moremoban/moban/issues/58>
_: allow template type
per template
Updated
#. #34 <https://github.com/moremoban/moban/issues/34>
_: fix plural message if
single file is processed
Updated
#. #21 <https://github.com/moremoban/moban/issues/21>
: targets become
optional
#. #19 <https://github.com/moremoban/moban/issues/19>
: transfer symlink's
target file's file permission under unix/linux systems
#. #16 <https://github.com/moremoban/moban/issues/16>
_: introduce copy key
word in mobanfile
Updated
#. handle unicode on python 2
Added
#. #13 <https://github.com/moremoban/moban/issues/13>
_: strip off new lines in
the templated file
Added
#. the ability to present a long text as multi-line paragraph with a custom
upper limit
#. speical filter expand github references: pull request and issues
#. #15 <https://github.com/moremoban/moban/issues/15>
_: fix templating syntax
to enable python 2.6
Added
#. #14 <https://github.com/moremoban/moban/issues/14>
_, provide shell exit
code
Added
#. #11 <https://github.com/moremoban/moban/issues/11>
, recognize .moban.yaml
as well as .moban.yml.
#. #9 <https://github.com/moremoban/moban/issues/9>
, preserve file
permissions of the source template.
#. -m
option is added to allow you to specify a custom moban file. kinda
related to issue 11.
Updated
#. use explicit version name: moban_file_spec_version
so that version
can be
used by users. #10 <https://github.com/moremoban/moban/issues/10>
_ Please
note: moban_file_spec_version is reserved for future file spec upgrade. For
now, all files are assumed to be '1.0'. When there comes a new version i.e.
2.0, new moban file based on 2.0 will have to include
'moban_file_spec_version: 2.0'
Added
#. #8 <https://github.com/moremoban/moban/issues/8>
_, verify the existence of
custom template and configuration directories. default .moban.td, .moban.cd
are ignored if they do not exist.
Updated
#. Colorize error messages and processing messages. crayons become a dependency.
Added
#. Bring the visibility of environment variable into jinja2 templating process:
#7 <https://github.com/moremoban/moban/issues/7>
_
Added
#. added '-f' flag to force moban to template all files despite of .moban.hashes
Updated
#. moban will not template target file in the situation where the changes occured in target file than in the source: the template file + the data configuration after moban has been applied. This new release will remove the change during mobanization process.
Added
#. Create a default hash store when processing a moban file. It will save unnecessary file write to the disc if the rendered content is not changed. #. Added summary reports
Updated
#. Bug fix #5 <https://github.com/moremoban/moban/issues/5>
_, should detect
duplicated targets in .moban.yml
file.
Updated
#. Bug fix #4 <https://github.com/moremoban/moban/issues/4>
_, keep trailing
new lines
Updated
#. Bug fix #1 <https://github.com/moremoban/moban/issues/1>
_, failed to save
utf-8 characters
Added
#. Initial release
FAQs
General purpose static text generator
We found that moban demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.