Skip to main content

Bob renders directory structure templates

Project description

Mister Bob the Builder creates directory skeletons.

Documentation

http://mrbob.readthedocs.org/

TODO

  • [medium] refactor Python API

  • [medium] gittip

  • [medium] add +var+ folder in template_sample

  • [medium] Check how one would implement multi-namespace python package with current mr.bob api

  • [low] Ability to configure what to ignore when copying templates in bobconfig (as a hook?)

  • [low] better format print questions output (keep order of questions -> use order information like for asking questions)

  • [low] document we don’t need local commands once answers are remembered (just issue another template on top of current)

  • [low] ability to specify variables/defaults to questions from cli

  • [maybe] ability to simulate rendering (dry-run)

  • [maybe] ability to update/patch templates

Changelog

2.0 (2026-04-16)

  • Nothing changed yet.

2.0b1 (2026-04-16)

  • Remove usage of pkg_resources. [erral]

1.0.1 (2024-02-29)

  • Add support for Python 3.12 [pbauer]

1.0.0 (2022-09-24)

  • Support for Python 3.10, drop Python 2 support. [pbauer]

0.1.2 (2015-08-19)

  • Add pre_ask and post_ask hooks. [Godefroid Chapelle]

  • Upload tarball instead of zipfile to fix unicode errors during installation [Domen Kožar]

0.1.1 (2014-03-03)

  • Claim Python 3.4 support [Domen Kožar]

  • Fix encoding errors on Python 3 during installation [Domen Kožar]

  • Use Jinja2 < 2.7 only for python 3.2 [Domen Kožar]

0.1 (2014-03-02)

  • move exceptions to bobexceptions [Jean-Philippe Camguilhem]

  • Use jinja2 < 2.7, since 2.7+ doesn’t support Python 3.2 [Domen Kožar]

  • Filename variable name substitution regex failed to compile on windows [Domen Kožar]

  • Do not copy .DS_Store. [Godefroid Chapelle]

  • Configure patterns of files to ignore through ignored_files option of mr.bob section. [Godefroid Chapelle]

  • Configure patterns of directories to ignore through ignored_directories option of mr.bob section. [Fotis Gimian]

  • Added new post-question hook mrbob.hooks.to_integer [Fotis Gimian]

  • Added new post-question hook mrbob.hooks.to_decimal [Fotis Gimian]

  • Added new post-question hook mrbob.hooks.validate_choices [Fotis Gimian]

  • Added new post-question hook mrbob.hooks.validate_regex [Fotis Gimian]

  • Added new pre-question hook mrbob.hooks.set_current_datetime [Fotis Gimian]

  • Added new post-question hook mrbob.hooks.validate_datetime [Fotis Gimian]

0.1a9 (2013-04-26)

  • Regex to detect variable names when rendering file names was broken when directory path contains pluses. [Godefroid Chapelle]

0.1a8 (2013-03-11)

  • Depend on six>=1.2.0 [Domen Kožar]

  • Moved all exceptions to mrbob.exceptions module [Domen Kožar]

  • Fix loading of zip files [Domen Kožar]

  • #28: Remote loading of config files [Nejc Zupan]

  • #30: Keep newlines of rendered template [Domen Kožar]

0.1a7 (2013-01-23)

  • Don’t depend on argparse in python 2.7 and higher, since it’s already in stdlib [Domen Kožar]

  • #22: Prevent users from specifying target directory inside template dir [Domen Kožar]

0.1a6 (2013-01-02)

  • Use StrictUndefined with jinja2 renderer so that any missing key is reported as an error [Domen Kožar]

  • If a key in a namespace was missing while rendering, no error was raised [Domen Kožar]

  • Added hook mrbob.hooks.show_message [Domen Kožar]

  • mrbob.validators.boolean renamed to mrbob.hooks.to_boolean [Domen Kožar]

  • Renamed validators.py to hooks.py [Domen Kožar]

  • Removed validators and action settings from [questions] as it is superseded by hooks [Domen Kožar]

  • Added pre_ask_question and post_ask_question to [questions] section [Domen Kožar]

  • Added pre_render, post_render and post_render_msg options [Domen Kožar]

  • Added [defaults] section that will override template defaults. The only difference to [variables] is that variables provide default answers [Domen Kožar]

  • Moved renderer parameter to [template] section [Domen Kožar]

  • Added [template] section that is parsed only from .mrbob.ini inside a template directory. [Domen Kožar]

  • Correctly evaluate boolean of quiet and verbose settings [Domen Kožar]

  • Added non_interactive setting that will not prompt for any input and fail if any of required questions are not answered [Domen Kožar]

  • Added remember_answers setting that will create .mrbob.ini file inside rendered directory with all the answers written to [variables] section [Domen Kožar]

  • Include changelog in documentation [Domen Kožar]

  • Question does no longer raise error if unknown parameter is passed from a config file. Instead those parameters are saved to question.extra that can be later inspected and validated. This is first step to have advanced question types such as question with a set of predefined answers [Domen Kožar]

  • Rewrite all py.test stuff to nosetests, so we have unified testing now. This also fixes flake8 segfaults on pypy [Domen Kožar]

0.1a5 (2012-12-12)

  • #26: Variables were not correctly parsed from config files [Domen Kožar]

0.1a4 (2012-12-11)

  • Fix MANIFEST.in so that template examples are also included with distribution [Domen Kožar]

  • Add -q/–quiet option to suppress output which isn’t strictly necessary [Sasha Hart]

  • Suppress the interactive-mode welcome banner if there are no questions to ask [Sasha Hart]

  • Don’t raise KeyError: ‘questions_order’ if [questions] is missing in an ini [Sasha Hart]

0.1a3 (2012-11-30)

  • #13: Read user config from ~/.mrbob (as stated in docs and inline comments). [Andreas Kaiser]

0.1a2 (2012-11-29)

  • #12: Fix unicode errors when using non-ASCII in questions or defaults [Domen Kožar]

  • Ask questions in same order they were defined in template configuration file [Domen Kožar]

0.1a1 (2012-10-19)

  • Initial release. [Domen Kožar, Tom Lazar]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mr_bob-2.0.tar.gz (65.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mr_bob-2.0-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file mr_bob-2.0.tar.gz.

File metadata

  • Download URL: mr_bob-2.0.tar.gz
  • Upload date:
  • Size: 65.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for mr_bob-2.0.tar.gz
Algorithm Hash digest
SHA256 840eae9bc22da5748ecd4a204524ddce3d71539bd23768b802d8442c4844e0fd
MD5 b26c18e9b2f1774d7128ea05d77d1c7a
BLAKE2b-256 fca31b7dea7946714ccad666da17f816437c05d0b34433c3bc79c47c64e32272

See more details on using hashes here.

File details

Details for the file mr_bob-2.0-py3-none-any.whl.

File metadata

  • Download URL: mr_bob-2.0-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for mr_bob-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98b128623ff59cbde82ce013ca1da10b2921f3b3f64b899d170d4460ee7032b9
MD5 4924de3c5daabc54cdf4b03b778d48b2
BLAKE2b-256 059643bed498b1505de86f39a0d8d1fc52023ddbbcf2417ca43d239f7c0ee0ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page