omnivore-app / logseq-omnivore

Logseq plugin to fetch articles and highlights from Omnivore
MIT License
278 stars 15 forks source link

TODO control #99

Closed avelino closed 1 year ago

avelino commented 1 year ago

I like to control in logseq the tasks I need to do, for this I use TODO

reading is one of the tasks I have in the day and I use the omnivore for capturing and reading (on the laptop)

template that I use in logseq (with TODO):

TODO [{{{title}}}]({{{omnivoreUrl}}}) #read [[quick capture]]
collapsed:: true
site:: {{#siteName}}[{{{siteName}}}]{{/siteName}}({{{originalUrl}}})
{{#author}}
author:: {{{author}}}\n{{/author}}
{{#labels.length}}\nlabels:: {{#labels}}[[{{{name}}}]]{{/labels}}
{{/labels.length}}
date-saved:: {{{dateSaved}}}
{{#datePublished}}
date-published:: {{{datePublished}}}
{{/datePublished}}

every time I make an annotation or mark a passage of text and omnivore overwrites the block, making me lose track of what was already done

example:

I marked a task as DONE

DONE [AFFiNE - All In One KnowledgeOS](https://omnivore.app/me/af-fi-ne-all-in-one-knowledge-os-1879e8896e5) #read [[quick capture]]
site:: [AFFiNE](https://affine.pro)
date-saved:: [[2023-04-20]]

was overwritten:

TODO [AFFiNE - All In One KnowledgeOS](https://omnivore.app/me/af-fi-ne-all-in-one-knowledge-os-1879e8896e5) #read [[quick capture]]
site:: [AFFiNE](https://affine.pro)
date-saved:: [[2023-04-20]]
thiswillbeyourgithub commented 1 year ago

Run into the same issue yesterday. Would be great if the TODO/DONE could be ignored I guess?

A general fix could be to add a syntax in the template like {TODO|DONE} that would make the plugin match this block no matter if TODO or DONE is present? I'm guessing this could be useful to others with heavily customized setups.

avelino commented 1 year ago

I tried to understand the code to see if I would be able to do the implementation, but I didn't find it so simple to implement the logic

https://github.com/omnivore-app/logseq-omnivore/blob/f8c89c8da361cd08896368f4231a7cb6687d5ddc/src/index.ts#L261

probably the maintainers can do this implementation with more property

sorry for not being able to solve the reported "problem" :(

sywhb commented 1 year ago

Hey @avelino @thiswillbeyourgithub , the plugin has been updated to address this issue.

We will only update the article block if there is any property being changed