Skip to main content

Add your description here

Project description

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.

The .gitignore file in this repository was generated using ignr, if you want to look at a sample!

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.

Note: Version 2.0 completely drops Python 2 support in favor of Python 3, released late-2019.

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.

I can be reached @Antrikshy or via reddit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gnor-0.0.1.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gnor-0.0.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file gnor-0.0.1.tar.gz.

File metadata

  • Download URL: gnor-0.0.1.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for gnor-0.0.1.tar.gz
Algorithm Hash digest
SHA256 075cba431715650f7400f29e46aea1b0b4a617e455d9bfb16a4cfa9541e827b4
MD5 22b8bcc66c702e53dbe2d49e8c30135f
BLAKE2b-256 ef2c4ec803e85d69a01782c67f6d639a06ed3bb6f368ff6a6282e29f63dae08b

See more details on using hashes here.

File details

Details for the file gnor-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gnor-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for gnor-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e09626a6935c2bc54163a089bbed491ac92e8d70985f10a8e2033d73fa1c2eb4
MD5 de6043b12a03456357c508cb9edb8f1b
BLAKE2b-256 26a77d048a2632d99e12e5fc43dd4b21b04affe4994866bbb7a12e43de9c7c11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page