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.5.tar.gz (6.5 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.5-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gcont-0.1.5.tar.gz
  • Upload date:
  • Size: 6.5 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.5.tar.gz
Algorithm Hash digest
SHA256 2dfe627912928d1e35049176755cf17d811e0c6e2221ee0f0f3d50033e36b9d5
MD5 1de6d85465bbef4abc9ad6d0dcd216d5
BLAKE2b-256 eabafc9226815220659c35ef0457e4e9f0b398e80d202ddbdad9350930b04052

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gcont-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f6e0f268399eae9098d8eb59552915412ac7db8f8865167815f9fc9a6834504e
MD5 3ca44f654387797f7769b8b5b302a03d
BLAKE2b-256 8a4dc97e1efa30cee3318afb3d7f6272803c2a8fbc9de2ccbd2311226163a461

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