This script has a bunch of utility functions for storing data, setting up timers, and all that jazz.
Requirements: python 3.9+, packages listed in requirements
Functions included:
- Random Case -
random_case string
- Add -
add keyword info
- Remove -
remove keyword
- List all data -
list_data
- Copy to clipboard -
clipboard keyword
- Diceroll
diceroll [faces]
- Timer
timer duration
All arguments are passed in similar to command line arguments.
If any argument has spaces inside it, use double quotes to make it count as one.
The entire function name doesn't need to be supplied as long as a good enough match is found. Most functions also implement their own fuzzy matching.
All occurences of -p
are replaced by the current contents of the clipboard.
quit
exits the program.
The JSON file in the directory houses all the information you store.
If massive amounts of data must be added, you can dump it all in the info as valid json instead of calling theadd
function multiple times.
Takes in a string, converts it to random case, and copies it to the clipboard.
Takes in a keyword and a string and stores it into the JSON file. If there is a conflict in naming, you get to decide whether to override the previous keyword.
Removes the keyword and the information belonging to it from the JSON file.
Prints all the keywords along with their information neatly, strings having more than 40 characters are truncated; To display their entire information, use the Clipboard function.
Takes in a keyword and copies its content to the clipboard.
Does exactly what the name suggests, rolls a dice. An optional argument can be passed in to extend the number of faces the die has.
Counts down until the duration specified, then plays a ding. The duration can be passed in as any human readable format.
Examples of durations are:
1m 30s
280s
2 hours and 40 minutes
One hour