Skip to main content

cctm

CCTM = cookie cutter template manager

project templates manager for cookiecutter

(python3 only)

quick examples

$ cctm init
$ cctm selfupdate
$ cctm install audreyr/cookiecutter-pypackage
$ cctm use audreyr/cookiecutter-pypackage

# alias
$ cctm management alias audreyr/cookiecutter-pypackage pypackage
$ cctm use pypackage

# extra_context configuration
$ cctm config --name=full_name --value=podhmo.podhmo
$ cctm use pypackage

setup

$ pip install cctm

cctm uses individual configuration file(cctm.json).

searching cctm.json

searching method is here.

first, from current working directory, searching “cctm.json” file, recuresively.

e.g. if cwd is ~/foo/bar/boo. searching below paths.

  1. ~/foo/bar/boo/cctm.json

  2. ~/foo/bar/cctm.json

  3. ~/foo/cctm.json

  4. ~/cctm.json

second, if cctm.json is not found on first process, then, using ~/.cctm/cctm.json (default path)

generating configuration file

generating configuration file via cctm init.

$ cctm init

# if generating configuration file as current working directory
$ cctm init --project=.

package information

listing package information via cctm list

$ cctm list | grep pypackage
kragniz/cookiecutter-pypackage-minimal(12) -- A minimal template for python packages
audreyr/cookiecutter-pypackage(555) -- Cookiecutter template for a Python package.
pypackage -> audreyr/cookiecutter-pypackage  # this is alias

show detail via cctm show

$ cctm show audreyr/cookiecutter-pypackage
{
  "updated_at": "2016-01-08T22:53:23Z",
  "url": "https://github.com/audreyr/cookiecutter-pypackage",
  "name": "audreyr/cookiecutter-pypackage",
  "description": "Cookiecutter template for a Python package.",
  "star": 555,
  "created_at": "2013-07-14T18:52:05Z"
}

using cookiecutter

installing cookiecutter template

installing the template via cctm install

$ cctm install chrisdev/wagtail-cookiecutter-foundation

# wagtail-cookiecutter-foundation is installed
$ cctm list --installed
audreyr/cookiecutter-pypackage
chrisdev/wagtail-cookiecutter-foundation

using cookiecutter template

using installed template via cctm use

$ cctm use chrisdev/wagtail-cookiecutter-foundation

if you are irritated by long-long-name, cctm management alias is helpful, maybe.

$ cctm management alias chrisdev/wagtail-cookiecutter-foundation mywagtail
$ cctm list --alias | grep wagtail
mywagtail -> chrisdev/wagtail-cookiecutter-foundation
$ cctm use mywagtail  # it's is also ok.

default configuration settings

if you want to set a default context, using cctm config

# show configuration
$ cctm config | jq .extra_context
{
  "name": "podhmo",
}
# edit configuration
$ cctm config --name=project_name --value=hello
# delete configuration
$ cctm config --name=project_name

extra_context attribute in config file is using as cookiecutter’s extra context, so.

$ cctm use mywagtail
project_name [Wagtail Project]:  # cancel

$ cctm config --name=project_name --value=hello
$ cctm use mywagtail
project_name [hello]:

your custom repositories

if you store url in repositories of configration file, cctm recognizes as package repositoriy.

default reposotiries are here.

"repositories": [
  "https://raw.githubusercontent.com/podhmo/cctm/master/data/cookiecutter.index.json"
]

package format example

{
  "name": "chrisdev/wagtail-cookiecutter-foundation",
  "url": "https://github.com/chrisdev/wagtail-cookiecutter-foundation",
  "description": "Cookiecutter template for Wagtail CMS using Zurb Foundation 5",
  "created_at": "2015-04-13T13:36:50Z",
  "updated_at": "2016-01-04T14:53:04Z",
  "star": 23
}

if you know, github url, be able to fetch information via cctm management fetch

$ cctm management fetch chrisdev/wagtail-cookiecutter-foundation
{
  "name": "chrisdev/wagtail-cookiecutter-foundation",
  "url": "https://github.com/chrisdev/wagtail-cookiecutter-foundation",
  "description": "Cookiecutter template for Wagtail CMS using Zurb Foundation 5",
  "created_at": "2015-04-13T13:36:50Z",
  "updated_at": "2016-01-04T14:53:04Z",
  "star": 23
}

# store data at local.json
$ cctm management fetch chrisdev/wagtail-cookiecutter-foundation --save --store=./local.json

please, don’t forget to call cctm selfupdate. this command synchnonizes at local data and repositoriies data.

$ cctm selfupdate

0.2

  • build bug fix.

Metadata

Release files for cctm 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cctm 0.2
File Size Uploaded
cctm-0.2.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cctm 0.2
File Interpreter ABI Platform
cctm-0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 25.1 kB

Release files / cctm-0.2.tar.gz

Download URL cctm-0.2.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5b805cac7e67e23dac3fb6ffb3843cd27980a243556354da2f3f856cbb26c950
BLAKE2b-256 checksum
How to use checksums
e37a7af902368274d111037f19c291ce486351956cab7cf3eede21aac83ff63b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cctm-0.2-py2.py3-none-any.whl

Download URL cctm-0.2-py2.py3-none-any.whl
Size 16.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8b56d22f5ae5a0733eacbf533f203be055f30e6f076e108e411b3aa67c24d49b
BLAKE2b-256 checksum
How to use checksums
ed5fa94da29364446fed9f44b33e485cbee2a5a404b843ecf5a5c191cca94a87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page