[FR] Implement full support for updating literature notes with grouped annotations in bullet lists #175
Replies: 5 comments 3 replies
-
The in-place update doesn't use the in-place update is actually implement differently than simple overwrite updates. It need to first locate the range where it should update. it's kind of tricky to update existing group in a generic way, since we can't tell which heading/list item is the container for the grouped items without explictly specifying it. Before I come up with a new API to handle this, you can use overwrite mode to update note properly. |
Beta Was this translation helpful? Give feedback.
-
@aidenlx have you considered the way that Zotero integration does it? There is a special keyword called persist notes where the overwrite will ignore anything commented out by % tags. 'Persistent block' Another feature is to add only annotations since the last update date. 'Update by recent' https://github.com/mgmeyers/obsidian-zotero-integration/blob/main/docs/Templating.md The intent is to safely organize thoughts inside the imported annotations incrementally and non destructively. As far as features are concerned I am far more interested in the 'update by recent' than the 'persistent block' PS I am happy to work on this. Should I post this on discussions? |
Beta Was this translation helpful? Give feedback.
-
This could make the overwrite update mode less destructive, but it wouldn't enable all the update modes that Obsidian-Zotero offers or aims to offer for custom templates - especially not the in-place updating of annotations. This is the most promising/innovative update mode, in my view. If you do the basic persist block (following the Zotero Integration's docs' example) for all annotations, the subsequent updates will not get added to the same group heading as the existing annotations. The existing ones persist as is, and the new ones get appended at the end, creating duplicate headings in the case of annotations grouped by color. Unless you are using some custom template that has different behavior? There is this experimental template that puts every annotation in separate persist blocks: https://forum.obsidian.md/t/zotero-integration-import-templates/36310/107?u=feralflora I am not sure of the merits of this approach, and it seems like it would be quite messy. And again, it does not allow in-place updating of existing annotations, as far as I can tell. |
Beta Was this translation helpful? Give feedback.
-
Is there any change regarding how well the plugin can cope with updating non-callout annotations and highlight? In the plugin settings it says:
However, it's not documented how block-ids are properly added in order for the updating feature to work with callout wrapping disabled. Could you clarify that? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Since update 1.0.2,
Update Literature Note
partially works for grouped list items using the templates I've shared before. But there are still issues:Here are some scenarios:
Note: I tested point 3. and 4. with the
In-place Update of Existing Annotation
toggled on.Regarding point 2.:
I tried to make an zt-annots.eta template that could fix this issue, by keeping track of which headings have already been created, and only creating them if they don't exist. However, it doesn't work and I think it's because the
createdColorLabels
map doesn't persist.Here is the template:
I had some ideas for persistence, either by storing the names of existing headings for each it.key in a separate file (JSON), or by checking level three headings in the existing literature note. However, I didn't manage to implement these ideas in the template successfully. I have several such experimental templates which are probably misguided.
Beta Was this translation helpful? Give feedback.
All reactions