Skip to main content

A powerful command-line tool for managing .gitignore files with language-specific templates and size-based filtering.

Project description

Gitignore Maker

A powerful command-line tool for managing .gitignore files with language-specific templates and size-based filtering. This tool allows you to create and update .gitignore files based on your project's programming languages, while also filtering out large files and folders exceeding a user-defined size limit.

Introduction

Managing a clean and comprehensive .gitignore file is crucial for ensuring that unnecessary files are excluded from your Git repositories. This CLI tool simplifies that process by allowing you to:

  • Automatically generate .gitignore content based on your project's programming languages.
  • Filter files and folders by size, ensuring that large assets are ignored.
  • Exclude specific files and folders from being added to .gitignore.

With just a few commands, you can maintain an optimized and language-specific .gitignore file tailored to your project's needs.

Key Features

  • Language-Specific .gitignore Templates: Generate .gitignore content based on the programming languages used in your project.
  • Size-Based File Exclusion: Automatically add files and folders to .gitignore if they exceed a specified size limit.
  • Custom Folder and File Exclusion: Specify folders and files to ignore during size-based filtering.
  • Seamless Integration: The tool can be easily integrated into your project management workflow, automating the generation and update of .gitignore.

Installation

Install the libray:

pip install gitignore-maker

Usage

Run the CLI tool by specifying your desired options.

gitignore_maker [OPTIONS]

Options

Option Description
--languages Specify the programming languages to include in the .gitignore. Example: --languages Python Node.
--size-limit Set a size limit for files (in bytes). Files larger than this limit will be added to .gitignore. Default is 49 MB.
--ignore-folders Specify folders to exclude during file size checks. Example: --ignore-folders venv node_modules.
--ignore-files Specify files to exclude during file size checks. Example: --ignore-files large_file.txt.
--list-languages List all supported programming languages and exit.

Examples

  1. Generate a .gitignore for Python and Node.js:

    gitignore_maker --languages Python Node
    
  2. Add files larger than 10 MB to .gitignore:

    gitignore_maker --size-limit 10485760
    
  3. Ignore specific folders during size checks:

    gitignore_maker --ignore-folders venv build
    
  4. List all supported programming languages:

    gitignore_maker --list-languages
    

Example Workflow

Here i s a typical workflow using this tool:

  1. Generate a language-specific .gitignore file:

    gitignore_maker --languages Python Node
    

    This will create or update the .gitignore file with content for Python and Node.js.

  2. Filter large files: After generating the .gitignore, you may want to exclude files larger than 50 MB:

    gitignore_maker --size-limit 52428800
    

    This will scan the project directory and add all files larger than 50 MB to the .gitignore.

  3. Customize exclusion: To exclude certain folders like venv or build from being added to .gitignore, you can run:

    gitignore_maker --ignore-folders venv build
    

Supported Languages

This tool supports .gitignore templates for various programming languages, including but not limited to:

  • Python
  • Node.js
  • Java
  • Ruby
  • Go
  • PHP
  • C++
  • ...and more.

To see the full list of supported languages, use the --list-languages option:

gitignore_maker --list-languages

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

gitignore_maker-0.1.3.tar.gz (52.3 kB view details)

Uploaded Source

Built Distribution

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

gitignore_maker-0.1.3-py3-none-any.whl (80.2 kB view details)

Uploaded Python 3

File details

Details for the file gitignore_maker-0.1.3.tar.gz.

File metadata

  • Download URL: gitignore_maker-0.1.3.tar.gz
  • Upload date:
  • Size: 52.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for gitignore_maker-0.1.3.tar.gz
Algorithm Hash digest
SHA256 59d45a8a5b15e8a30df4a28cb9997890a1a3c8127827bba76fb1e0e9466cda41
MD5 ac31d82236f87fc7bd8182f648260a88
BLAKE2b-256 d11527f58b47c6d667b947a31bd919ba1101f41cae3b22ba839f715a44c6550d

See more details on using hashes here.

File details

Details for the file gitignore_maker-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for gitignore_maker-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d38df57c08ae3192c94d26311a966b4a2887488e2fbf983dc0dff34a7375589c
MD5 425a097e97d5b2a02028218534442759
BLAKE2b-256 1bd42072e5d5aab56f58acc23365fa19318ca8fc7622c551139bfcb3bbdedc0a

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