/zippity

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

Primary LanguagePython

Zippity

PyPI version codecov Documentation Status License: MIT

dum lil CLI to collect TODOs for ChatGPT

Warns

I'm currently preparing the companion GPT; you are welcome to use it in the meantime but it's going to be disappointing.

alt text

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 template/template.md; once compiled it looks like this:

Screenshot

Contributing

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

License

MIT