GET CONTEXT
About
Get Context is a directory context generator designed to provide a structured overview of the contents of a directory and its subdirectories. It generates a single text file that lists the directory structure and the contents of text or program files, while excluding non-human-readable files such as binary or multimedia files. This tool is particularly useful for organizing and reviewing large codebases or data directories. It can also be used to easily pass the contents of a directory to a large language AI model for further analysis.
Installation and Usage
This program is available as the Python package "get_context". If Python is installed on your system, you should be able to run:
pip install get_context
After the package is installed, the program can be run on the command line by typing:
get_context <directory> [file_extensions...]
The program takes the directory as the first argument and can optionally filter files by specified extensions. For example:
get_context . .py .txt
This will generate a text file containing the directory structure and the contents of .py and .txt files within the specified directory.
Disclaimer
This program is still in development and is currently buggy. Further testing and implementation is required before it can be used as a fully-fledged, reliable product.
Attributions
This program uses both Python’s built-in libraries and external libraries for various functionalities:
- File and Directory Handling: The program uses Python’s built-in
osandmimetypeslibraries for file and directory manipulation. - Text Encoding and Decoding: The program uses Python's built-in
codecsandiolibraries to handle different text encodings. - Pattern Matching: The program uses the external
pathspeclibrary to handle file exclusion patterns, specifically for interpreting and applying.gitignore-style patterns.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for get-context 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| get_context-0.1.1.tar.gz | 6.5 kB | Without provenance | Details for get_context-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| get_context-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for get_context-0.1.1-py3-none-any.whl |
Total release size: 14.6 kB
Release files / get_context-0.1.1.tar.gz
| Download URL | get_context-0.1.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb8f65b31583649b8452cf40d35046f58723a952ee1fed946b5bfb20c33e43b1
|
|
BLAKE2b-256 checksum How to use checksums |
612ee2a635c59a23a17b75af473c05c20eb05ecbca376821c182065dfa608ebf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / get_context-0.1.1-py3-none-any.whl
| Download URL | get_context-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98b1a3b39d389597bd46b96a8f6d0ac3aa99f7baad60fe4224388c011d91026b
|
|
BLAKE2b-256 checksum How to use checksums |
dbb3a3fc13ca188d0608be10e545ee137e409e53eab8058acf430ad6d1c25d3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for get-context 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.