gitignore.io的cli
giig的Python项目详细描述
gitignore
安装
# pip3 install giig
用法
usage: giig [-h] [--list] [--search SEARCH] [--file [FILE]] [lang [lang ...]]
Download .gitignore files from gitignore.io
positional arguments:
lang language, IDE or OS to include in the .gitignore file
optional arguments:
-h, --help show this help message and exit
--list, -l list all language, IDE or OS options
--search SEARCH, -s SEARCH
search list of options and print matches
--file [FILE], -f [FILE]
specify which file to write to
打印列表
打印gitignore.io所有可能选项的列表
giig -l
搜索
搜索特定术语(例如python)
giig -s python
打印到标准输出
giig python
write.gitignore文件
giig -f -- python
使用自定义文件
giig -f custom-file.txt python
用作库
importgiig# get list of languages, IDEs, etc.giig.get_list()# get list of languages, IDEs, etc.giig.search(term)# get gitignore for one/several languages, IDEs, etc.# where options is a list of termsgiig.get_ignore(options)
待办事项
- [X]将giig打印到stdout而不使用
-f
- []添加缓存(不需要每次都查询gitignore.io)
giig -f custom-file.txt python
-f