BibNotes Formatter: New Plugin to Export and Format Annotations from Zotero into Obsidian

To carry over the information from zotfile regarding the settings for all colour you can either let zotfile do the job (and leave the settings within Bibtex as they are now) or do this:

  • restore the default settings in zotfile “extensions.zotfile.pdfExtraction.colorCategories”. This will make Zotfile export the name of the colour and Bibtex will be able to recognise and manipulate the colour.
  • in the settings of Bibtex you can add the custom text you want for each colour around the {{highlight}} placeholder. For instance "#important {{highlighlight}} will add the #important tag before highlights of that colour.

Currently the highlight settings that are specific to a colour do not override the general highlight settings (e.g. italic, bold). I can add the possibility of overriding those if this is helpful

@stpag is there a way to specify the folder by a variable? like rootvault/{{citeKey}}? It doesn’t work for me. I think it makes sense because it is importing raw material from zotero and they are going to be other notes beside it in this folder and there should be a MoC as the main note not navigate between them.

also using ( in the title somehow ignore for me when i test it.

Are you referring to the folder where the notes will be exported? It is not possible at the moment as I built it around my workflow which involves collecting all the literature notes into the same folder. But it is certainly possible to programmatically change the export path based on some value.

What value would be helpful? The example you mentioned (rootvault/{{citeKey}}) would lead to a different folder to be created for each entry since the citeKey is unique. That would generate hundreds if not thousands of folders. Maybe the option of exporting the note into folders that mirror the structure of Zotero’s folder?

1 Like

Yes I think citeKey is best option. I already use it to store my Epub/MD books. I prefer this method because it is also how Zotero store its library on Harddrive. then I link the book/paper in related Topics (like how it is in Zotero also). Maybe it is not the best solution but this kind of structure give me some space to fall back to when I am trying rearrange my MoC notes, otherwise it is a real headache for me.

i was actually looking for such a feature. where is this setting? I couldn’t find such a setting even in Bibtex advanced settings

It’s “extensions.zotfile.pdfExtraction.colorCategories”. It is detailed here: Zotero -> zotfile -> mdnotes -> obsidian -> dataview Workflow - #61 by OXHusky
You will need to access the settings from Zotero Advanced Config

1 Like

i already have this set up. but can’t find what you are saying and i was double confused because you said it was in Bibtex settings not zotfile.

btw, it would be awesome if you can a setting to import zotfile categorized by color notes by their order of color rather than mixing them again. if they get into separate notes like how mdnote does it it would be even better

Can you post a screenshot of the type of final output you have in mind?

it think as long as it keeps the grouping by color it is not that essential but i am thinking of something like this which creates all these notes in the same folder:

but if it is not practical i think just keeping annotation in different section of the main note like this:


1 Like

I like this idea! Perhaps a “group by color” toggle in the settings could be added if this feature is added to the plugin? But I would personally prefer to have them in the same note.
But perhaps, the colours could be a placeholder, so that we can easily set in the custom template where each colored highlight goes?

For example, I could highlight all the method sections in red, all the references I want to check in green, and all the results in yellow.
Then the template could have the following placeholders:

### Method

### Results

### References

Thank you @stpag for this plugin.

Regarding updating the changing the contents of notes.

" If a note already exists, its content will be updated without over-writing the existing annotation (e.g. comments added manually from within Obsidian and block-references will not be over-written)"
What exactly is protected during the update?
For example, if I write in the note, between highlights, and update the note, I imagine this will be erased?
But in the template, can I create a section called “summary” for example, write stuff in this heading, and then update the extracted notes, and the summary will not be affected? (I test this and it did not work. My text got erased as if the template was reapplied).

I also noticed that when updating the note, some characters got erased.

I noticed that the underscores from the citekeys were removed from the name of the file.

Could you make a short video of your workflow and how you use your plugin (if you have the time) ? It would be really useful for me to see exactly what we can edit in obsidian and what we should only edit in Zotero :slight_smile:


I like this idea. It should be feasible (meaning, within my limited coding expertise). I have added it to my todo list


Here is how the plugin works when it comes to updating an existing note.

  1. The metadata is replaced so any change to any field will need to be made in Zotero. This is not safeguarded. If you want to add a “summary section” that should not be over-written, this would need to be in the “Extracted Annotation”. I can see this may not work for your use-case, so I may need to think about an alternative.

  2. The code them process the annotations. It identifies the text of the highlight or of the code, and looks whether any segment of that text (length depends on the length of the whole text) is already in the note. If a match is found, then the existing version of that highlight/comment is kept. If a match is not found, then this is regarded as a new comment/highlight and it is added in the text, after the last match found.

In practice this means that if you correct typos, add [[]], or add comments to any existing highlight, this will not be replaced/updated. If you want it to be replaced/updated, then remove it completely from the existing note and run the plugin.

1 Like

I think that the reason why the underscores were removed from the name of the file is because I added a function that removed non-alphanumeric characters from the file name is order to avoid running across special characters that cannot be included in the file name. I can see from your example that my implementation was an over-kill. I will find an alternative that does not remove underscores.

Thanks so much. Yes, Another 1, or even 2 levels up would be wonderful!

it also ignores parenthesis just for the record to debugged later

that i was guessing and it think your solution is good enough, i just think it is a good idea to separate a note for pure synching and use another note to analyze , comment and mess around with what got imported using "Link to block "and embed it. just need a solution to do this in mass. I see a lot of potential in this feature of obsidian, unfortunately I don’t a lot of plugins use this feature to their advantage.

I think you can do something like this with a custom template.
Let’s say that your exported note is named after the citekey {{citekey}}. In the template you could have a section like:


this addition note would not created automatically by the plugin, but once you generate it by clicking on it, it would be embedded in the lit note

Thanks. I thought that parentheses where not allowed in file names on Windows but I was wrong

1 Like

sorry for late reply i was away from computer.
i know , the problem is not format of the note but separation of notes base of the color again (which already exists in zotfile outlet). writing the links automatically or manually is the easy part. as you said i can already link them using the Template.