nicucalcea / obsidian-tasks-todo-txt

An Obsidian plugin that generates a todo.txt from your Obsidian Tasks
4 stars 1 forks source link

bidirectional sync #2

Open abdcef opened 1 year ago

abdcef commented 1 year ago

Hi, creating a new thread for this. One option is to replace the original todo by a transcluded block reference from the todo.txt file. This may have challenges for the task to render properly in the original note as completed tasks in Obsidian have to be formatted in differently compared to the todotxt syntax.

nicucalcea commented 1 year ago

Hm, that's one approach. I used to just open todo.txt in Obsidian with this plugin, I guess we can think of a way to have these tasks transcluded across the vault.

I was also thinking of having a hidden log file that would keep track of where the original task corresponding to each line in todo.txt is in Obsidian (something like File path :: line x). Then when something changes in the txt, Obsidian can look in the log, find the original note and update it to match.

I'm weary of complicating it too much and introducing sync conflicts. What if you make changes to todo.txt while Obsidian is not open to listen for changes? Or if you add new tasks in todo.txt, where should they show up in Obsidian?

abdcef commented 1 year ago

I agree that it's not an easy ask. Also original tasks may move (I chunk my daily note into atomic notes). And to add to the complications, block references in Obsidian are fragile.

I really like how todo.txt works and would not want to see it become complicated either.

Let's continue to explore options.

How do you manage contexts and projects?

FackJox commented 1 year ago

Just a thought, if you're using something like syncthing to sync your plain text files across devices. Then you can use syncthing's sync conflict management and don't need to reproduce this.