[Discuss] Syncing between Notes and MarkDown #244
Replies: 11 comments 8 replies
-
To avoid possible conflicions caused by the annotation/citation, there will be extra hidden text in the exported markdown file. Like this: <!-- bn:begin:ABXZ1469 -->
comment (pdf link) (item link)
<!-- bn:end:ABXZ1469 --> And the markdown block wrapped by these decorators will be regarded as placeholders while syncing.
|
Beta Was this translation helpful? Give feedback.
-
Hi, Also, Zettlr uses a totally app-agnostic/future proof way of linking between pages: Double brackets with an ID of the type %Y%M%D%h%m%s, [[20201116150658]]. Would it be difficult to compile a Better-notes template that would include this identifier in every note? With the feature in place I could use both apps seamlessly together. I just found Better-n. A great invention that makes Zotero so much better. Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hi, @IpeTek
This BN plugin tries to do something different: sync the note itself, rather than the citation information. This allows users to take notes while reading papers in Zotero more easily and sync them to their familiar note software later.
Template Name: <p>${((date)=>`[[${date.getFullYear()}${String(date.getMonth()).padStart(2, '0')}${String(date.getDate()).padStart(2, '0')}${String(date.getHours()).padStart(2, '0')}${String(date.getSeconds()).padStart(2, '0')}]]`)(new Date())}</p> The result: |
Beta Was this translation helpful? Give feedback.
-
The only idea that comes to mind is to write the citations in a yaml header and then reference them in the note as [1] [2] [3]. Not a really good way to handle this, but maybe it can give you an additional idea on how to handle it. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion. Actually the citation information is stored in each note item as a string, having it stored in the markdown is a good idea. |
Beta Was this translation helpful? Give feedback.
-
We are almost there: I proudly announce that we now have a two-path syncing of Zotero note and MarkDown! Currently, it's still a pre-release and I decide to test it for at least one week before we could make it a formal release. The pre-release version will not be updated automatically. Please install manually from https://github.com/windingwind/zotero-better-notes/releases/tag/0.8.0-1 How to SyncTo add a note to syncing list, export it to an MD file: You can manage the syncing list from the menu->File->Better Notes Sync Manager. The notes in the syncing list, along with their corresponding MD files, are automatically updated, with content, formats, and image attachments. To stop syncing, select items in the sync manager and click How it WorksI use the rehype and remark to build a syntax tree from MD/note and parse them so that they can be converted to another format lossless. The metadata of annotations is stored as raw HTML in MarkDown so that they can be converted back to notes. The metadata of images in the note is saved to the image alt ![ About Diff-MergeIf you happen to modify both the note and MD file, the plugin will try to analyze the changes and merge them automatically (like what Git does). However, it is possible that you are required to merge them manually. Pick changes that you need from the left pane and the result will be rendered in the right pane. The changes on the raw note are shown in the center pane. To confirm, click Note that if you skip any merge requests and the auto-sync is on, you may be required to do this again later. Have fun with the new feature and please let me know any suggestions/bugs! |
Beta Was this translation helpful? Give feedback.
-
Congratulations! Hopefully will have time to test. |
Beta Was this translation helpful? Give feedback.
-
About YAML header: There will be a new template The version, library ID, and item key is controlled by the plugin and cannot be removed. |
Beta Was this translation helpful? Give feedback.
-
During the 5 pre-release versions, no severe bug is reported. https://github.com/windingwind/zotero-better-notes/releases |
Beta Was this translation helpful? Give feedback.
-
Thanks for adding this wonderful feature, I might have a suggestion to add. Since my workflow involves using neovim for fast typesetting of math, I would greatly benefit from having an "Open in External Editor" button for a synced Zotero note (and, maybe, also a keyboard shortcut) to open the corresponding .md file in a predefined external editor? Thank you very much. |
Beta Was this translation helpful? Give feedback.
-
Hi, how do I change the MD file name template so that the file name for a note is not changed at all? So say I've got a note called "This is a test note" it would be exported as
to
which gives me |
Beta Was this translation helpful? Give feedback.
-
Hi,
These days I've received many requests about syncing/importing markdown files to a Zotero note, like #143 #141. This has been put aside for a long time and I'm planning to support the two-path syncing using a note2md(we already have)+md2note conversion.
The syncing system would automatically compare the note and MD file's versions and their modification time. The older one will be updated if it keeps unchanged since the last syncing. If both are modified, the user will be asked to merge them and choose which modification will be accepted using a git-diff style window.
Previous discussions about note2md syncing are here: #45
Welcome any suggestions!
Beta Was this translation helpful? Give feedback.
All reactions