Skip to main content

Search Cookiecutters on GitHub.

Project description

PyPI Package PyPI Python Versions PyPI Package License See Build Status on Travis CI

Search Cookiecutter templates on GitHub with Python 3.5.

A Cibopath can take a bite from anything and get a psychic sensation of what has happened to that object. The only thing it does not work on is beets.

Wikipedia: Chew Comic Book Series

Usage

Usage: cibopath [OPTIONS] COMMAND [ARGS]...

  Cibopath - Search Cookiecutters on GitHub.

Options:
  -v, --verbose           Print debug information
  -c, --config-file PATH  Config file to hold settings
  -V, --version           Show the version and exit.
  --help                  Show this message and exit.

Commands:
  config
  info
  search
  update

User Config

First you need to create a GitHub access token for Cibopath, so it can authenticate with the GitHub API v3. GitHub’s rate limiting won’t allow more than 60 unauthenticated requests per hour. So yeah, you definitely want to have a token set up as there are more than 60 featured Cookiecutter templates.

The Cibopath access token does NOT require any scopes. Please stick to the defaults when creating the token (Read-only access to public repositories).

Now use the CLI to store your credentials in your home directory (default ~/.cibopathrc).

$ cibopath config github.username <your-username>
$ cibopath config github.token <your-access-token>

Feel free to view the contents of the config file via:

$ cibopath -v config --list

Fetch Template Information

With GitHub authentication in place, you now want to fetch information about available Cookiecutter templates. Cibopath dumps the data as a JSON file to disk. You can specify the target location either via user config or CLI.

Save the dump-file location to settings:

$ cibopath config templates.file ~/.cibopath/templates.json
$ cibopath -v update

Or specify it on the CLI:

$ cibopath -v update --dump-file ~/.cibopath/templates.json

Please note that, albeit not required, the -v or --verbose flags are very useful if you want to see what Cibopath is doing under the hood.

Search Keywords in Templates

Once you’ve gathered information about Cookiecutter templates, you can use Cibopath to search for keywords in the templates’ README files.

Let’s say you would like to know which ones support django and docker.

$ cibopath search django docker

If you didn’t save the templates.file earlier, you need to explicitly pass it to the CLI:

$ cibopath search django docker --load-file ~/.cibopath/templates.json

Cibopath will show you a list of matching templates in alphabetical order along with their corresponding GitHub repository URL. If you feel like one of these templates meets your requirements for a new project, go ahead and pass the URL to Cookiecutter to get started.

cookiecutter-django................. https://github.com/pydanny/cookiecutter-django
django-docker-bootstrap............. https://github.com/legios89/django-docker-bootstrap

Display Template Information

Cibopath also provides you with additional information about a given template:

$ cibopath info cookiecutter-pytest-plugin

Info includes Name, Author, Repository as well as the Context, which will be used by Cookiecutter to generate the project.

Name: cookiecutter-pytest-plugin
Author: pytest-dev
Repository: https://github.com/pytest-dev/cookiecutter-pytest-plugin
Context: {
    "docs_tool": [
        "mkdocs",
        "sphinx",
        "none"
    ],
    "email": "raphael@hackebrot.de",
    "full_name": "Raphael Pierzina",
    "github_username": "hackebrot",
    "license": [
        "MIT",
        "BSD-3",
        "GNU GPL v3.0",
        "Apache Software License 2.0"
    ],
    "module_name": "{{ cookiecutter.plugin_name|lower|replace('-', '_') }}",
    "plugin_name": "foobar",
    "pytest_version": "2.8.1",
    "short_description": "A simple plugin to use with Pytest",
    "version": "0.1.0",
    "year": "2015"
}

License

Distributed under the terms of the BSD 3-Clause License, Cibopath is free and open source software

Code of Conduct

Everyone interacting in the Cibopath project’s codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PyPA Code of Conduct.

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

cibopath-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

cibopath-0.1.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file cibopath-0.1.0.tar.gz.

File metadata

  • Download URL: cibopath-0.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cibopath-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c51c23563950da3da6670fc10c42eba5b9af9d86206b29f254a1ba2a0648eb5f
MD5 ba8b69762c222d9482b69dd6941e0cbf
BLAKE2b-256 81379b70b4de5ccf2a30c42d234c11ddcf4e89647bd8e8e3934d6da24ccfe72a

See more details on using hashes here.

File details

Details for the file cibopath-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cibopath-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b715399e67b81b2c7fcf55096a7d1f3b8306822b7f004a10f5bde1c83b901cbb
MD5 46d81dcef906ef7a179c100e16c3f53b
BLAKE2b-256 5e4eb9c85f37adf6cb43c4ee6a0812c09dc4673e53ea38a89c08ff28749faa10

See more details on using hashes here.

Supported by

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