Skip to main content

No project description provided

Project description

Turbo Text Transformer Prompts

Note this is automatically installed when you do pip install turbo-text-transformer. This repo is just for storing the templates.

Designed for use with turbo-text-transformer.

You pipe some text in, the template is applied, then you pipe it into ttt (from pip install turbo-text-transformer) 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

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. They will be installed in the ~/.config/ttt/templates directory.

This is a smiple example of a template:

Context: Provide only code as output.
Prompt: {{prompt}}
Code:

It will just output a code snippet based on the query.

You can also pass a list of flags to the prompt to fine tune the control, such as this:

This is an example of minimally altering some given code to achieve a specific task.

I received the following code:

`{{language}}
{{prompt}}
`

My task was to make minimal alterations to this code to: "{{task}}".

The altered code is below.

`{{language}}

For this one, you can pass the 'task' and 'language' arguments to make it more specific.

Contributing

PULL REQUESTS WITH MORE TEMPLATES VERY WELCOME!

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

turbo_text_transformer_prompts-0.1.10.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file turbo_text_transformer_prompts-0.1.10.tar.gz.

File metadata

File hashes

Hashes for turbo_text_transformer_prompts-0.1.10.tar.gz
Algorithm Hash digest
SHA256 825cd560d743d54f4d8ea0f87015d58f79c14fb80b55918a463eb4b358375010
MD5 7cf8b0f00a920e7640a012bfd1161bcf
BLAKE2b-256 9ad4c45105c3b77927347cb84435fda8901ed5353f02f6edb289b38a4175a825

See more details on using hashes here.

File details

Details for the file turbo_text_transformer_prompts-0.1.10-py3-none-any.whl.

File metadata

File hashes

Hashes for turbo_text_transformer_prompts-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 222814c5d36182071cb59ed0cff6c42805c86a0442e64fc09d9002620ced8a30
MD5 8719f7cad592a472f61df28448e4014a
BLAKE2b-256 df7bcf5bd3b7911606bd718fc441bdf1be9c47fa7e123d8dbf2b76429a37e4b7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page