Package: generoo
GenerooWhen we start new projects, we often go through a similar set of steps to bootstrap it. As a developer, we want to
spend time developing. That's where generoo comes in. Generoo allows developers to write a project template once and
then generate new projects from that template in seconds. Project templating without any additional coding gives time
back to developers so they can focus on writing core business logic.For an in-depth look at Generoo and it's use, see thedocumentation.InstallationPIPInstall the package from pip:pip install generooRun from the module:python -m generoo <goal> <scope> <name>SourceClone the project. Navigate to the directory on your machine.Note: Generoo must be run in Python 3.6 and above.You can run from the python interpreter by using the following command:python generoo.py <goal> <scope> <name>How does it work?Generoo is simple. Create a template usingMustache's syntax for string replacement.The template could be a file calledexamples/hello-world/hello_world.pythat looks like:print('Hello, {{who}}')Then, a template configuration file in JSON or YAML defines prompts for the user when they run Generoo. Here's an example
file calledexamples/hello-world/template-config.json:{"prompts":[{"name":"who","text":"Enter who you want to say hello to"}]}The text is what the user will see when the prompt is shown and the name is the template value that will be replaced.Runningpython3 generoo.py generate project hello-world --template examples/hello-world/hello_world.py --template-config examples/hello-world/template-config.jsonwill prompt the user:$ Say hello to:When user enters:World, then the template is filled out and written tohello-world/hello_world.pyand looks like:print('Hello, World')For more information about how the templating system works, see theGeneroo documentation.UsageUsing generoo is simple. The CLI or python script takes 3 positional arguments:generoo <goal> <scope> <name> [options...]goal- what you want generoo to do. Example:generatescope- what you want generoo to create. Example:projectname- what you want to name what generoo is creating. This will be used as the root directory name. Example:examplePositional Arguments (in the order they appear):GoalsArgumentDescriptionAliasesgenerateFill in templates for an archetype or custom user project.gen,gScopesArgumentDescriptionAliasesprojectGenerates a new project with the given name.project,proj,pro,pOptionsOptionDescription-n,--no-configWill run generoo without a pre-existing configuration.-a,--auto-configWill run generoo using the pre-existing configuration and only prompt for values not present in the configuration.-c,--template-configPoints to a location on the system that contains a custom template config.-t,--templatePoints to a directory on the system that contains templates for a corresponding template config.-r,--run-configurationPoints to a file on the system that contains a run configuration for a corresponding template config.Built-In TemplatesIf no--templateor--template-configarguments are given, then Generoo will generate from its built-in templates.
Check out thearchetypesdirectory to see the templates yourself. Or, better yet, try generating one.ContributingHave a template that you'd like to share? Submit a PR with the template and we'll see about getting it
into the built-in templates for this project.Want some new functionality? Open an issue or a PR with the changes you'd like to see.