在github上搜索cookiecutters。

cibopath的Python项目详细描述


PyPI PackagePyPI Python VersionsPyPI Package LicenseSee Build Status on Travis CI

使用python 3.5在github上搜索Cookiecutter模板。

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: 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

用户配置

首先你需要create a GitHub access token为cibopath,这样它就可以 使用GitHub API v3进行身份验证。GitHub’s rate limiting不允许 每小时超过60个未经验证的请求。所以是的,你肯定想 设置一个令牌,因为有60个以上的特征Cookiecutter templates

cibopath访问令牌不需要not任何scopes。请坚持 创建标记时的默认值(对public的只读访问 存储库)。

现在使用cli将您的凭据存储在主目录中(默认 ~/.cibopathrc)。

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

可以通过以下方式查看配置文件的内容:

$ cibopath -v config --list

获取模板信息

使用github身份验证后,现在需要获取有关 可用的CookieCutter模板。cibopath将数据作为json文件转储到 磁盘。您可以通过用户配置或cli指定目标位置。

将转储文件位置保存到设置:

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

或者在cli上指定:

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

请注意,尽管不是必需的,-v--verbose标志是 如果你想看看Cibopath在引擎盖下做了什么,那就非常有用了。

在模板中搜索关键字

一旦您收集了有关CookieCutter模板的信息,就可以使用 cibopath在模板“readme文件中搜索关键字。

假设您想知道哪些支持djangodocker

$ cibopath search django docker

如果之前没有保存templates.file,则需要显式传递 发送给cli:

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

cibopath将按照字母顺序显示匹配模板的列表 以及相应的github存储库url。如果你喜欢这些 模板满足您对新项目的要求,请继续并传递url 到Cookiecutter开始。

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

显示模板信息

cibopath还为您提供有关给定模板的附加信息:

$ cibopath info cookiecutter-pytest-plugin

信息包括nameauthorrepository以及context, 它将被Cookiecutter用来生成项目。

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"
}

许可证

根据BSD 3-Clause License的条款分布,cibopath是免费的 以及开源软件

行为准则

在cibopath项目的代码库中进行交互的每个人,发布追踪器,聊天 房间和邮件列表应遵循PyPA Code of Conduct

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
junit有没有办法在Java中重新初始化静态类?   在浏览器中点击应用程序时java Play框架挂起   文件Java错误中的NullPointerException   使用Java中的SNMP查找网络中计算机的登录名   java包装服务器引导程序已弃用,有什么替代方案?   当客户在等待理发时,java信号量值是否存在问题?   java如何使用JavaMail仅下载特定类型的附件   如何在java中将十进制转换为十六进制   java Slick2D粒子系统不会生成粒子   java检测更改事件来自何处   将Java集合类型参数类设置为数组   java如何从eclipse导出为可运行JAR文件?   java EntityManager对象未注入Glassfish和Spring   swing从actionPerformed和actionListener Java返回字符串   java在给定另一个等价键对象的情况下获取映射项的当前键   无论输入如何,java网络都会产生相同的输出