No project description provided
Project description
Turbo Text Transformer Prompts
Designed for use with turbo-text-transformer.
You pipe some text in, the template is applied, then you pipe it into ttt
which will process it with eg. OpenAI.
cat pyproject.toml tttp/__main__.py | tttp -t readme | ttt > README.md
Turbo Text Transformer Prompts is a command-line tool that allows users to generate text files from pre-configured templates using user input prompts. The tool uses Jinja2 templating engine to render text files from templates.
How to Run
pip install turbo-text-transformer-prompts
You will also need to clone the repository containing the templates you want to use. For example:
mkdir -p ~/.config/ttt/
git clone https://github.com/fergusfettes/turbo-text-transformer-prompts ~/.config/ttt/tttp
Template Structure
A template is a text file written in Jinja2 syntax. The file should have the .j2
extension and be placed inside the templates
directory.
The template can contain placeholders for user input. Placeholders are enclosed in double curly braces and contain a variable name. For example:
Hello, {{ name }}!
This template will prompt the user to enter a value for the name
variable.
Prompt Files
Prompt files can be used to predefine the values to be filled in the template. Prompt files are text files that contain a prompt message followed by the values to be filled, one per line. For example:
Please enter your name:
John Doe
To use a prompt file, specify the file using the --prompt
option:
tttp --filename simple --prompt /path/to/prompt/file
If there are any values that need to be added or changed from
Contributing
If you find a bug or would like to contribute to Turbo Text Transformer Prompts, please create a new GitHub issue or pull request.
License
Turbo Text Transformer Prompts is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for turbo_text_transformer_prompts-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7563aa1b044fcb1afa20722074ba482d20de2a849d4dfd620913174e72f6bc0 |
|
MD5 | e764eb5d3e69c3e28bab281417d1ba96 |
|
BLAKE2b-256 | 2cb8d46258a1934304a116ee8922c81da9a867139e606864c7debcfe472a8cb9 |
Hashes for turbo_text_transformer_prompts-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bff9c502245a40cc54843988111eacb20be204e5d4dca6b4523a79c22d27dfd |
|
MD5 | 534f167e8a60f6344a355d40ce7d2d98 |
|
BLAKE2b-256 | 9d211ba94a2ad2bec0e6758a52591365b64e0afb0818bbfa671ab35b097f15df |