Skip to content
/ ignr.py Public
forked from Antrikshy/ignr.py

Python-based command line client to download .gitignore templates from gitignore.io

License

Notifications You must be signed in to change notification settings

xals/ignr.py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ignr.py

ignr.py (or simply ignr) is a Python-based command line utility to fetch .gitignore templates from gitignore.io. gitignore.io has official command line tools, but they rely on bash or zsh, and may not be compatible with all systems out there.

There's also a Go-based alternative, gogi, but not everyone uses Go.

ignr was created for Python users who prefer to install via PyPI and/or pip.

Usage

Install using

pip install ignr

List

ignr -l

Lists all available .gitignore templates on gitignore.io.

Search

ignr -s mac

Searches for supplied query in list of available templates from gitignore.io, similar to using grep.

Preview

ignr -p scala macOS

Prints a preview of the template without generating a .gitignore file. List multiple space-separated languages, frameworks, operating systems to get combined output.

Create

ignr -n node sass windows

Generates a new .gitignore file in the current directory. List multiple space-separated languages, frameworks, operating systems to get combined output.

If a .gitignore already exists in the directory, ignr will give you an option to back it up.

Troubleshooting

Since gitignore.io uses HTTPS, running this utility in certain macOS environments may result in an SSL "handshake failure" error, which is discussed in detail in this requests issue.

Unfortunately, there is no trivial fix.

In my experience, switching from the included Python in El Capitan to a standalone Python installed via brew solved the issue. All my existing packages seemed to remain intact.

Contribute

Feel free to make improvements. PRs are greatly appreciated. ignr is currently untested on Windows. If you can confirm that it works, please let me know. You can open a PR to edit this line out if you want. If not, fixes would be nice.

I can be reached @Antrikshy or via reddit.

About

Python-based command line client to download .gitignore templates from gitignore.io

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%