Example: Command

With the command table

Let's say you have a command:

idquantitynamecommand
31Radaradatouch grass.el

This command with ID 3 can be referenced in a Karma Consequence with 'c3'.

Consequence

idquantitynameconsequence
2Radarada (Automatically set)c3

We can reuse the Frequency, and Condition, creating just a Consequence and Karma to automate the running of this command.

Frequency

idquantitydaysnext_date
112030-01-01 10:00:00

Condition

idquantitynamecondition
1Daily-1 * f1

Karma

idquantitynamecondition_idoperatorconsequence_id
1Daily Radarada (Automatically set)1=2

This will daily run the Command 'touch grass.el'.


Alternativelly, you can make it so the Command is part of the Condition.

echo $(find ~/books/technology -type f | wc -l)

This command will output a number, which we can use inside a Condition.

Command

idquantitynamecommand
4Tech Books Countecho $(find ~/books/technology -type f | wc -l)
5Open Current Tech Bookpdfreader ~/books/techology/current/*

Condition

idquantitynamecondition
3Read Tech Task-1 * f1 * c4

Consequence

idquantitynameconsequence
3Open Current Tech Bookc5

Karma

idquantitynamecondition_idoperatorconsequence_id
1Daily Radarada (Automatically set)3=3

That will automatically open the current technology book one is reading. If the automatic opening is not ideal one can set it so the Consequence is changing the quantity of a Record:

idquantityheadbody
1-1Read Tech Book

When typing 1 in operation the quantity of this Record will be zero. If you have a Condition that is 'rq1 == 0' that will be evaluated to '1' and can trigger the Consequence 'c5'. Though this method needs one Karma expression to run 'c5' if 'rq1 == 0' and another to make it so if 'rq1 == 0' Condition then 'rq1' Consequence, making 'rq1' be '1' and not triggering the infinite opening of the Tech Book.