Skip to main content

A tool for gathering and documenting project files.

Project description

gcont

gcont is a command-line tool designed to help developers gather important code files and generate a documentation context in Markdown format. It can automatically detect the project type, include/exclude specific files, and support Git integration to document only changed files.

Features

  • Automatic Project Detection: Automatically detects the type of project (e.g., Django, Flask, React) and applies relevant file gathering rules.
  • Customizable: Supports include and exclude patterns via command-line arguments or a configuration file (config.gcont.yml).
  • Git Integration: Optionally gathers only the files that have changed since the last Git commit.
  • Markdown Output: Generates a context.md file that includes the gathered files, organized and syntax-highlighted for easy reference.

Installation

You can install gcont via pip:

pip install gcont

Usage

Basic Usage

To run gcont with default settings:

gcont --root /path/to/your/project

Or if you are already in the directory, you can just run

gcount

Custom Include/Exclude Patterns

You can specify additional include or exclude patterns:

gcont --include '*.html' '*.css' --exclude '*.log' '*.tmp'

Using a Configuration File (Optional)

Create a config.gcont.yml in your project root directory to avoid passing options every time:

project: react
root: .
include:
  - '*.html'
  - '*.css'
exclude:
  - '*.test.js'
  - '*.test.jsx'
  - 'node_modules/*'
git_diff: false
verbose: true

Then simply run:

gcont

Git Integration

To gather only files that have changed since the last Git commit:

gcont --git-diff

Development

Running Tests

To run the tests for this project:

pytest

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for review.

License

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

Contact

If you have any questions or feedback, please feel free to reach out.

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

gcont-0.1.4.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

gcont-0.1.4-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file gcont-0.1.4.tar.gz.

File metadata

  • Download URL: gcont-0.1.4.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for gcont-0.1.4.tar.gz
Algorithm Hash digest
SHA256 4bb24c6e71d9e3a9d939651c1c1def67ff3180e071b54b7865510319d80dcd09
MD5 ffea884325946620bc15a3f1a527dba4
BLAKE2b-256 9094da702ccdbe442c2f159be22610ec4814c691cf7ff0ccd1826f8f938c9904

See more details on using hashes here.

File details

Details for the file gcont-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: gcont-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for gcont-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f00ed364c8e78fb89d9a7ae9db91951e50097f7eefa75a19df68f2e38dac6a82
MD5 8fc4e1da8f4fec028779141b36e7ed32
BLAKE2b-256 2bd7c3e370034df710d0cbeb6ebebe581d9fd1cccfc8064c7dcd4e7bee9b8291

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