https://github.com/lagerfeuer/gitignore
Python 3 gitignore fetcher based on gitignore.io
https://github.com/lagerfeuer/gitignore
git gitignore gitignore-generator gitignore-templates python python3
Last synced: 2 months ago
JSON representation
Python 3 gitignore fetcher based on gitignore.io
- Host: GitHub
- URL: https://github.com/lagerfeuer/gitignore
- Owner: lagerfeuer
- License: mit
- Created: 2018-10-19T14:58:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-12T23:19:35.000Z (over 2 years ago)
- Last Synced: 2024-03-14T23:06:55.252Z (over 2 years ago)
- Topics: git, gitignore, gitignore-generator, gitignore-templates, python, python3
- Language: Python
- Size: 11.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitignore
Python 3 gitignore fetcher based on [gitignore.io](http://gitignore.io)
## Install
```
# pip3 install giig
```
## Usage
```
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
```
### Print list
Print list of all possible options for gitignore.io
```
giig -l
```
### Search
Search for specific term (e.g. python)
```
giig -s python
```
### Print to stdout
```
giig python
```
### Write .gitignore file
```
giig -f -- python
```
#### Use custom file
```
giig -f custom-file.txt python
```
### Use as library
```python
import giig
# 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 terms
giig.get_ignore(options)
```
## Todo
* [x] make giig print to stdout without `-f`
* [ ] add cache (don't need to query gitignore.io everytime)