一个无依赖的照明脚手架Python工具
项目描述
一个无依赖的脚手架Python工具
功能
- 轻松建立和创建脚手架 
- 无依赖 
- 独立文件,可使用 python -c "$(curl ...)" 直接执行 
用例
- 非常短的快速启动项目(除了Python之外无需安装任何东西) 
使用示例
您可以直接建立脚手架,而无需在您的系统上安装任何东西。
例如,如果您想建立 Python包脚手架 脚手架,请在 终端提示符中粘贴
$ python -c "$(curl -fsSL https://raw.github.com/harobed/echafaudage/master/echafaudage.py)" -s https://github.com/harobed/python_package_scaffolding/archive/master.zip /tmp/my_new_project
接下来 echafaudage 会提出一些问题
mail : contact@stephane-klein.info version : 0.1.0 package_name : my-project author : Stéphane Klein
现在您的项目在 /tmp/my_new_project/
$ ls /tmp/my_new_project/ bootstrap.py devel-requirements.txt my_project requirements.txt setup.py tests unittest.cfg
您还可以在系统上安装“echafaudage”
$ pip install echafaudage
并使用 echafaudage 如此
$ echafaudage -s https://github.com/harobed/python_package_scaffolding/archive/master.zip /tmp/my_new_project
您还可以在命令行中直接设置一些变量
$ echafaudage -s https://github.com/harobed/python_package_scaffolding/archive/master.zip /tmp/my_new_project --vars project_name=my-project,version=1.0
echafaudage使用方法
$ bin/echafaudage --help
Usage: echafaudage [options] -s <scaffolding> [<TARGET>]
Arguments:
    TARGET where scaffolding will be created, by default it is "." (current directory)
Options:
    -s, --scaffolding=<scaffolding> The scaffolding to use, can be a directory path,
                                    an archive or archive url.
    --vars=<variables>              Custom variables, e.g --vars hello=world,sky=blue
    -h --help                       Show this screen.
    -v, --verbose
    --version
Example:
    $ echafaudage -s /path/to/directory/
    or
    $ echafaudage -s my_scaffolding.tar.gz
    or
    $ echafaudage -s http://example.com/my_scaffolding.tar.gz
如何创建新的脚手架
首先,您可以查看 Python包脚手架 脚手架示例。
在这个仓库中
.
├── README.rst
├── bootstrap.py
├── devel-requirements.txt
├── requirements.txt
├── scaffolding.json               <= scaffolding configuration file
├── setup.py.tmpl                  <= template file
├── tests
│   └── test_basic.py
├── unittest.cfg
└── {{package_name_underscore}}    <= this folder is renamed with "package_name_underscore" variable value
    └── __init__.py.tmpl           <= template file
{{package_name_underscore}}/__init__.py.tmpl 内容
__version__ = '{{version}}'
scaffolding.json(json格式)配置变量列表
{
    "variables": {
        "package_name": null,
        "author": null,
        "mail": null,
        "package_name_underscore": {
            "lambda": "vars['package_name'].replace('-', '_')"
        },
        "version": {
            "default": "0.1.0"
        }
    },
    "ignores": [
        "README.rst"
    ]
}
- “variables”是一个包含变量列表的字典 
- “ignores”是一个包含要忽略的文件列表的列表 
参见
如果您想要更强大的脚手架工具,可以查看mr.bob。
有关Python骨架构建工具的更多信息,请参阅此维基页面: https://wiki.python.org/moin/SkeletonBuilderTools
项目详情
    
       关闭
    
      
        
    
    
  
echafaudage-0.1.0.tar.gz的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 6dc538e2a597200d49dd301bce5964f20e4a26e6bb155e798b3f7f43f508332e | |
| MD5 | 7b6c0a524e13e459ef997b305d553879 | |
| BLAKE2b-256 | fa046af0182eda68e181535b3c74a464699304226d8d01460c70448db73459c2 |