Getting started with github-docs-cookiecutter

  1. Requirements include python3, Nutri-Matic (docs & hooks), rust (rustup), and git-cliff (changelogs).
    • Python3 Packages
      1. cookiecutter is required to utilize templates from github.
      2. Nutri-Matic is required to be sourced in python environment for template cookiecutter hooks to work.

I find that it easiest to clone the nutri-matic repository. Use the included makefile to install all python dependencies with make python-install from within the cloned directory. Then, source the created file, .venv/bin/activate, or point the below script variable, PYTHON_VENV, to desired python virtual environment.

Examples

Bash script can be copied and pasted into a shell file. Then, used to begin generating new projects.

Template Options:

#!/bin/bash

PYTHON_VENV="~/Documents/git_repo/nutri-matic/.venv/bin/activate"

PROJECT_NAME="example project name"
TEMPLATE="cookiecutter-cookiecutter"
LICENSE="AGPL-3.0-or-later"
BRANCH="main"
DESCRIPTION="Example cookiecutter template project."

rm -rf $PROJECT_NAME/
source $PYTHON_VENV
cookiecutter git@github.com:jcook3701/$TEMPLATE.git \
    --checkout $BRANCH \
    --no-input \
    project_name=$PROJECT_NAME \
    description=$DESCRIPTION \
    license=$LICENSE
deactivate