Inline Todo Plugin

Thanks, I now see your response to my PR on your github page. Yeah, I'm sure most users do not use RTE. I almost exclusively use the RTE, only MD for tweaks. RTE existence is another reason why I prefer Joplin over Obsidian. Your TODO plugin is the other reason. It's better, IMO, than the Obsidian Tasks community plugin.

4 Likes

I almost exclusively use RTE, but tag Inline Todo notes as "layout:viewer" for the Persistent Editor Layout pluggin. Works well

Potentially useful for those who have to frequently push due date back a day or more. I created a Autohotkey hotkey script that does this.

The basic functionality is you have the cursor on the line containing the due date you want to increment by x days, then press the hotkey corresponding to # of days you want to push due date back (I have it set up for 1, 2, and 7 days, using key combo Win+1, Win+2, and Win+3, respectively, since I have dedicated buttons for these on my keyboard, but you can assign whatever hotkey (single key or keystroke combo) you wish). I can rapidfire press the hotkey to increment by multiples of the # of days corresponding to each hotkey.

On the row the cursor is on, the script is looking for the pattern //yyyy-mm-dd (*1) and will increment by # of days according to hotkey pressed, and overwrite the entire line with the same line except with the incremented date.

*1 - I use hotstrings to spit out much of the inline todo format, e.g., if I type ":-@d", it will expand to "- @desk //". I also use hotstrings for the date. If anyone has questions on this, ask away.

#1::IncrementDate(1) ; in Joplin 'Today' note, increments date by 1
#2::IncrementDate(2) ; in Joplin 'Today' note, increments date by 2
#3::IncrementDate(7) ; in Joplin 'Today' note, increments date by 7

IncrementDate(numDays) {
    if WinActive("ahk_exe Joplin.exe") {
        ; Get the current line
        A_Clipboard := ""  ; Clear the clipboard
        Send("{Home}+{End}^c")  ; Select the entire line and copy
        ClipWait(2)
        if !A_Clipboard {
            MsgBox("Failed to copy the current line.")
            ; MsgBox("IncrementDate() fxn is running")
            return
        }
        
        currentLine := A_Clipboard

        ; Regular expression to find the date pattern
        datePattern := "//(\d{4}-\d{2}-\d{2})"
        
        ; Check if the date pattern exists in the line
        if (RegExMatch(currentLine, datePattern, &dateMatch) > 0) {
            oldDate := dateMatch[1]
            
            ; Parse and increment the date
            newDate := IncrementDateBy(oldDate, numDays)
            
            ; Replace the old date with the new date
            newLine := StrReplace(currentLine, "//" . oldDate, "//" . newDate)
            
            ; Replace the current line with the new line
            A_Clipboard := newLine
            Send("{Home}+{End}^v")  ; Select the entire line and paste
            
            ToolTip("Date incremented: " . oldDate . " -> " . newDate)
            SetTimer () => ToolTip(), -2000  ; Remove the tooltip after 2 seconds
        } else {
            ToolTip("No date found in the current line.")
            SetTimer () => ToolTip(), -2000  ; Remove the tooltip after 2 seconds
        }

        Send("{Home}")
    }
}

IncrementDateBy(dateStr, numDays) {
    dateParts := StrSplit(dateStr, "-")
    year := Integer(dateParts[1])
    month := Integer(dateParts[2])
    day := Integer(dateParts[3])
    
    ; Create a date-time string in YYYYMMDDHH24MISS format
    dateTimeStr := Format("{:04}{:02}{:02}000000", year, month, day)
    
    ; Increment the date by one day
    newDateTime := DateAdd(dateTimeStr, numDays, "days")
    
    ; Format the new date back to YYYY-MM-DD
    return FormatTime(newDateTime, "yyyy-MM-dd")
}
1 Like

Following up on this Plugin, bcs I use it a lot.

This executable helps me get my todo's weekly in an excel:

Place the executable on your machine.
Go to your summary note, and select all, copy
Run the executable.
Open excel and paste.

Does this

Add a mark TODO as done command from the context menu.

work under Linux? I only get the 5 standard "Open ...; Save As ... etc" commands in my context menu ...

"Context menu" refers to the right click menu. It seems like you might be opening up a DE specific menu. You should see the "Toggle TODO" option if you right click on a TODO item from your summary note.
Open/Save as don't seem like typical Joplin menu options either, so I can't really guess on whats going on.

I don't know what a "DE specific menu" might be; there is definitely no "Toggle TODO" option when right clicking.

When right-clicking on the link in the todo summary note I get these 5 options:

Open ...
Save as ...
Reveal file in folder
View OCR text
Copy path to clipboard

Apart from "Open ..." which jumps to the actual task, the other options don't seem to do anything.
(Just in case it makes a difference: it's a Mac keyboard & Linux Mint ...)

DE stands for Desktop Environment. Linux Mint can be installed with one of three different DEs. Menus can be different depending on which one you install.

I see the problem now, thanks for clarifying. The mark todo option is only available in the editor context menu, not the viewer.

(DE is Cinnamon ...)

Ok, I had overlooked that vital bit of information about the editor context menu, thank you for clarifying.
I actually thought I could check the tasks from the summary note (which would be really neat :slightly_smiling_face:); but checking them in the (unrendered) note works perfectly. One click more, but still a nice shortcut; thanks for your time.

v1.8.0

  • Mobile support was added to the plugin
    • This is a very basic release for now, but I have some planned functionality to make mobile use more functional/convenient
2 Likes

For some reason, I cannot get the folder filtering to work now. It’s been a couple months (summer months), but now when I try to to use the inline-todo-plugin syntax with a folder name, I keep getting ā€œAll Done!ā€

Did I forget something? I know that notebook names with spaces should have quotes - but that shouldn’t be an issue. I use dashes between words for notebooks. Nevertheless, I tried using the notebook name with and without quotes and still see ā€œAll Done!ā€ when I know there are open Todos in that notebook.

Note that the regular inline-todo-plugin syntax I have on another page works fine. It’s just the notebook filtering that isn’t working for me.

(edit): forgot to include Settings: List Style, Notebook List

Joplin 3.4.6 (prod, win32)

Device: win32, Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
Client ID: 0378dcb93fa0432f90665b413993d04f
Sync Version: 3
Profile Version: 48
Keychain Supported: Yes
Alternative instance ID: -

Revision: 4128061

Backup: 1.4.3
Favorites: 1.3.2
Freehand Drawing: 3.1.0
History Panel: 1.0.4
Inline TODO: 1.7.4
Menu items, Shortcuts, Toolbar icons: 1.1.0
Note overview: 1.7.1
Note Tabs: 1.4.0
Outline: 1.5.14
Persistent Editor Layout: 2.2.0
Quick Links: 1.3.2
Reset Checkboxes: 1.1.2

More testing…. I created a test page with the following inline todo:

<!-- inline-todo-plugin 5360-IM-MFCF 5369-CHILD-ADOLESCENT 5372-ASSESSMENT-MCFC -->

Three notebooks representing my classes this semester. I have test notes with 1-2 todos on them in each notebook. Only notebooks 2 and 3 todos are displaying. Nothing from the first listed notebook, even though I have two notes (one assignment page with about 7 todos, one test note with a single todo) in that notebook, the todos are NOT showing up. I checked spelling - even copy and pasted directly from notebook name (Edit > copy notebook name). I checked for accidental spaces in the name. I tried using quotes around the name. Nothing….. Why would one folder be missed and the two others work???

Oh man….. More testing…. And guess what? I’m an idiot. For whatever reason, I didn’t copy and paste the first school notebook. And I had fat-fingered the notebook name!! This was all due to a typo. Ugh. Thanks for listening. I’ll slink back to my room now…

(edit)

FWIW… I think I may have discovered a bug. It’s minor, but may be important to some. I created another notebook, planning to move everything to new notebook (thinking maybe something was wrong with the notebook itself). After discovering my typo and testing again, the following line:

<!-- inline-todo-plugin 5360-IM-MCFC -->

picked up todos from BOTH ā€œ5360-IM-MCFCā€ and ā€œ5360-IM-MCFC_oldā€

I don’t know if matching stops at a certain number of characters, but figured you’d want to know.

1 Like

I can’t get it to work. After installing I create the summary note, but no matter how many to-dos I create afterwards, they don’t get added to the summary.

I’ve installed the mobile version of the plugin, and there I suffer a different issue. I have no idea how to create the summary, or if it is created automatically by gathering the already existing to-dos.

I have to say that I’ve just recently started using Joplin, and that all my notes come from importing them from Evernote.

1 Like

Hello. I have a bug.

  1. Let’s say, I have created a todo in my journal.
  2. Then go to Todo Summary.
  3. Click on any item link. It opens my journal page and erases content with the Todo Summary. Even if I’m in a viewer mode (Ctrl+L).

Thanks in advance for helping me to fix this issue or to find what I’m doing wrong.

Joplin 3.4.12 (prod, win32)

Device: win32, Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
Client ID: 9369d53ab34d42bfa8cba9ed3be34670
Sync Version: 3
Profile Version: 48
Keychain Supported: Yes
Alternative instance ID: -

Revision: e9a9f68

Admonition markdown extension: 1.1.0
Autolinker: 1.0.4
Automatic Backlinks to note: 3.0.3
Backup: 1.4.3
Better Code Blocks: 2.0.1
Conflict Resolution: 1.2.3
Diff view: 0.2.0
Easy Backlinks: 1.3.0
Enhancement: 1.2.1
Extra Markdown editor settings: 1.11.0
Favorites: 1.3.2
Freehand Drawing: 3.1.0
Graph: 1.1.0
Inline Tag Navigator: 2.6.2
Inline TODO: 1.9.0
Jarvis: 0.11.0
Joplin Calendar: 1.2.0
Journal: 2.0.0
Math Mode: 0.8.2
Menu items, Shortcuts, Toolbar icons: 1.1.0
Note list and sidebar toggle buttons: 1.0.3
Note Tabs: 1.4.0
Outline: 1.5.15
Paragraph Extractor: 1.2.1
Quick Links: 1.3.2
Resource Search Plugin: 0.1.2
Rich Markdown: 0.16.4
Slash Commands: Datetime & More: 1.5.1
Table Formatter Plugin: 1.2.1
Tagging: 1.0.3
Templates: 2.4.0
YesYouKan: 1.1.2

same here. It keeps saing ā€œAll done!ā€ even though I have undone ToDos.

I run it on Mac (M2) and double-checked that I have the latest version of Joplin running.

I have also the Plugin ā€œAgendaā€ which finds my ToDos. And disabled ā€œAgendaā€ to make sure they donĀ“t interfer, but it didnĀ“t help.

Anyone has an idea what @j3r0m3666 and me are doing wrong? Or could it be a bug of the Plugin?

It's tough to say without seeing some examples. Can you share a screenshot of your settings, the summary page (editor view), and an example of a todo that you expect to be collected?

This appears to be the same issue as Todo content overwriting other notes Ā· Issue #36 Ā· CalebJohn/joplin-inline-todo Ā· GitHub
Maybe you can review that and see if it seems familiar? It seems that most people don't experience this issue, but for those that do, it's consistent. There is some evidence that there is a conflict with another plugin that is causing this issue. I'm currently working on a fix (using a custom editor, rather than saving todos to a note), so hoping to have something in the next few weeks.

1 Like

Thanks for answering.

Joplin-Version: Joplin 3.4.12 (on MacOS (M2))

Here is a screenshot of the Settings (in German, I am not sure, if this is readable for you, if not I can try to change my language to English)

This is a screenshot of the summary page:

And this would be a ToDo (Task) I would expect to be collected, itĀ“s called ā€œAufgabe 1ā€, I created it even in the same notebook, but I habe also plenty of others that do not get collected:

This plugin is for "inline" todos, not todo notes. The plugin collects checkboxes that have a specific format, so that they can all be viewed in one place. There isn't currently the functionality to aggregate notes that are marked as todo. It likely isn't too much trouble however, so I'll make a note of it (although it does contradict the name of the plugin :sweat_smile: )

Here is an example of the kind of "inline todos" that this plugin looks for.

I take a lot of notes about various things. It can be helpful to
keep my TODOs together with the content they pertain to.

- [ ] @TODO Think about how to make a plugin to solve this +joplin

This way the TODO benefits from context.

- [ ] @TODO +joplin //2022-04-04 Release the TODO plugin!

I'd still like a way to view all these! See below.
1 Like