Skip to content

Uses Rofi to parse jinja2 templates and type parsed responses, for things like email, chat response, etc.

Notifications You must be signed in to change notification settings

drewsortega/rofi-response-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rofi Response Generator

Generates responses based on a global variables and individual requests to generate responses and type them out, emulating keyboard output.

Installation

  1. Install required system packages
  • xdotool
  • rofi
  • python3
  • pip3
  1. Install required python3 packages
pip3 install -r requirements.txt
  1. Add any globally accessible vars you want to have for your templates to global_vars.yml

Running

./run.sh

Creating a new Template

  1. Add a [NAME].yml file to a directory in templates/ (or create a new one)
  2. add a content field, with jinja2 template options. Note this only supports plain-fields at the moment, no lists.
    • for every newline you want in the template, you must pre-fix it with an extra newline. For example, for 1 newlines, write 2. For 2 newlines, write 3, etc.
    • for global variables from global_vars.yml, pre-face every item with global.. For example, global.name
    • for requested-variables each time you run a template, pre-face every item with args.. For example, args.user_name
  3. If you used any args. objects, add an args list, with bulleted items for every arg you wish to request.

Example Template File

content: "Hello {{ args.recipient_name }},


Thanks for you email.



Best,


{{ global.name }}

{{ global.role }}"
args:
    - recipient_name

Example global_vars.yml File

name: John Doe
role: Systems Developer

About

Uses Rofi to parse jinja2 templates and type parsed responses, for things like email, chat response, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published