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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gcont-0.1.3.tar.gz
  • Upload date:
  • Size: 6.0 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.3.tar.gz
Algorithm Hash digest
SHA256 3cf3c7c1efef4a4cea162e044154612b33f340e8fa6acdf52c0ce4a38faa011e
MD5 41b4c54b48478917bc68655275c24988
BLAKE2b-256 99eab4f6df050cc66b9ab0a30332ee4ea6d1bd1048ea127f31b454992e3bc9c1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gcont-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9954c8c76d8e59141ec590694f8a227de49b70692814cd05dc8cfe9d0e520bb0
MD5 9da55d2ebd42db5d9fe487604eeda37b
BLAKE2b-256 83936045a9ad185f4599645de832c7451da6cf9cb7b8d25c9be623ab1ceead0e

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