Tasks in Obsidian Organize and track my time blocks, with different colors representing various activity categories
Abstract
Easily record your tasks through shortcuts. This script is designed to be used together with the Task plugin.
Steps for Creating the Shortcut
1. Choose from List
Define a List. The list items are start and end
Action: Choose from List
2. Use If to check different activity type
Action: If the variable value is "start", got to step 3, otherwise step 4
3. Choose from Menu
Action: Choose from Menu
Add my first-level category of activities. Then define a Dictionary in each options, and add specific categories. Action: Choose from List(Variable is Dictionary)
When it reaches the end menu, use Action: Ask for input to get some notes from users. Define a Dictionary to store the menu results, current time, activity type(result of step 1), and notes.4. End the activity
Define a List to get the comments or rating of this activity. The list items can be the comments or feelings.
Action: Choose from List
Define a Dictionary to store current time, activity type(result of step 1), and comments.
Encode to JSON Use "Encode to JSON" to convert the dictionary into JSON.5. Get backup File on GitHub
Action: Get Contents from URL
See Github api doc for parameters details.Action: Get Dictionary Value to get the results of Github api in Json(get sha and content)
Action: Base64 Encode to decode the contents with base64
Action: Combine Text to combine the decoded contents and the dictionary from step 3 or 4
Action: Base64 Encode to encode the combined contents with base64
6. Upload backup File on GitHub
See Github api doc for parameters details.
list ['due', 'schedule', 'start'] menu due Ask for Input -> Combine text -> menu [scheduled date,start]Input data format
Check the Task plugin