Action
 Line to Reminders Inbox
Line to Reminders Inbox
                  
        Posted by @nahumck,
    Last update
    almost 3 years ago
    UPDATES
over 3 years ago
- Sharing publicly
- Added a warning for a blank line or draft in the script step.
over 3 years ago
- Sharing publicly
- Added a warning for a blank line or draft in the script step.
over 4 years ago
Changed the script object to be more universal. Added an action step for Reminders.
Sends a line to the Reminders Inbox for processing.
Steps
- 
    script/*--- Send a single line to the Inbox of Reminders ---*/ /*--- Get entire line of cursor function ---*/ function getCursorLine(editor) { var cursorPosition = editor.getSelectedRange()[0]; var selectionLength = editor.getSelectedRange()[1]; var lineRange = editor.getSelectedLineRange(); var sel = editor.getTextInRange(lineRange[0], lineRange[1]); return sel.replace(/^[-\*\s\[\]\|\d\.\{\}]+/gi,"") } let task = getCursorLine(editor); task = task.trim(); if (task.length == 0) { context.cancel(); app.displayWarningMessage("Line is empty"); } else { draft.setTemplateTag("task",task); }
- 
    reminderlistNameTemplate Inbox titleTemplate [[task]] noteTemplate 
Options
- 
  After Success Default Notification Info Log Level Info 
  Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.