/zippity

A tool to package instructions and relevant source files for ChatGPT into a single markdown file.

Primary LanguagePython

ZPT - Zip it for GPT

alt text

With ZPT you can:

  • Collect TODOs from your codebase
  • Use the TODOs to generate a markdown file that can be used to create a GPT prompt

Installation

pipx install zippity_py

Usage

After installation, you can use the CLI by running:

> zpt --help

Usage: zpt [OPTIONS] [SOURCE_DIRECTORY]

Options:
  -e, --extensions TEXT (Default: '.py,.js,.ts')
  -r, --result_file PATH  (Default: 'ZIPPITYDO_EXAMPLE.md')
  -t, --template_file PATH
  --help    

Template

Templates are jinja markdown files, that get passed an list of these:

FileTodos = TypedDict(
    "FileTodos",
    {
        "todos": List[Todo],
        "content": str,
        "language": str,
        "mimetype": str,
        "name": str,
    },
)

Each FileTodo will have a list of todos, like this:

Todo = TypedDict(
    "Todo",
    {
        "line_number": int,
        "text": str,
    },
)

The default template is in todo/todo_template.md; once compiled it looks like this:

Screenshot

Contributing

Contributions are welcome. Please make sure to update tests as appropriate.

License

MIT