Gradualist
Gradually automate your procedures, one step at a time
Inspired by https://blog.danslimmon.com/2019/07/15/
Features
Main Features
- Converts a markdown file into interactive steps
- Saves results into another markdown file
- On 100% automated, saves results into a script file instead
Ancillary features
- Sublists are marked like 1.1.3 (first step, first substep, third sub-substep)
- Go back one step
Keywords
All keywords are case insensitive.
Starting keywords
Start steps with these words to use them. Using these words also makes it clearer what you want your user to do.
-
Enter: store single line answer Synonyms that trigger: Type, Write
- Store
{response}
in variables like so. - In steps after previous,
{words}
will be replaced whatever you entered. - Input is entered on a single line
- Automatically triggered if there is a
{variable}
, even if a keyword isn't present - If no curly braces around a variable, everything after 'Enter' becomes the variable name
- Store
-
Describe: longform answer Synonyms that trigger: Explain
- Store multiline
{response}
in variables like so. - In steps after previous,
{response}
will be replaced whatever you entered. - If a
{variable}
isn't provided, words after Describe are the variable - Type enter twice to signify the end of input
- Starting with a question word or including a ? will force a step to be a multiline answer
- Store multiline
-
Run: runs code Synonyms that trigger: Exec, Execute
-
Run this inline
echo shell script
- Start the step with the word 'run', case insensitive
- This will run in your shell, whichever that is for your OS.
-
Run this multiline python script, starting the step with run.
import webbrowser webbrowser.open("https://python.org")
- Start the step with the keyord 'run', case insensitive
- Code needs a code fence
- Language suggestion is required
-I
is an arg to python. Include as many options as you want.- If an output file is specified with curly braces, it will be saved in the working directory; otherwise a temporary file will be used.
-
-
While: Loops until condition Synonyms that trigger: Loop
- Format is 'While condition do task'
- While condition, keep on doing it
-
For: Loops over array
- Format is 'For [el1, el2, ...], do task'
- Example: "For ["blue", "orange", "yellow"], use {} marker in your drawing
- Generates array-length tasks
-
If: Conditional Synonym for else: Otherwise, elsewise Synonym for then: First comma
- Format is 'if condition then task1 else task2'
- Example: "if it's sunny, then I'll have a picnic else I'll read a book inside"
- Variable its_sunny would get a value
-
Click: Have the user click somewhere
- This can be automated with clicking with x,y coordinates
- Use the browser extension to select the element
-
Select
- Select from multiple options, usually in a dropdown
- Use the browser extension to select the element
-
Open: Open a file or URL
- If opening a URL, default browser will be used
- Include the words 'with program' to specify which program to open it with (i.e. firefox instead of chrome)
- Include the word 'new' to create a new one if one doesn't exist
-
Import filepath:task list
- Include a separate markdown procedure as a sublist of the current task
-
Anything Else
- The point of this is to be as compatible with as many procedures as possible, so don't require keywords
- There won't be any suggestions for automation
On 100% automated, saves results into a script file instead
Anywhere keywords
- Personal: Input is entered with no visible output like a password (i.e. Enter your personal password)
Defaults
- Saved files have tasks with
- Timestamp of when tasks were completed
- How long tasks took
- Whether tasks were completed, skipped, or not done
Todo
Shortterm
- Separate logic for input, output, and processing
- Logic
- loops until step complete
- if/then statements
- Set script variables like timeout, or autofinish after a certain time
- Configuration in a yaml file
Longterm
- How will this interact with mdx?
- How would you reference other documents (i.e. imports)
- Migrate to rust