Comments and Tags are not imported from Zotero
Hey, first of all great plugin! I don't know if I'm doing anything wrong but when I import a highlighted and commented file with tagged comments Bibnotes it only seems to copy the highlighted text and the citation. Anything filed under {{comment}} or {tag} seems to get lost in the process. I didn't quite encounter this issue here or in the obsidian forum yet. I use Zotero 6.0.12 and Obsidian 0.15.9 with BetterBibtex 6.7.21 and BibNotes Formatter 0.9.209 on Ubuntu and view, highlight and extract with the zotero native pdf viewer. My note template in Zotero reads
{{highlight quotes='true'}} {{citation}} {{comment}} {{if tags}} Tag: {{tags join='; '}} {{endif}}
Attached an example of an actual file out of my library:
debugout.txt
and the corresponding note in zotero:

Zotero seems to export comments and tags, at least I find them in the appended .txt-file, but it doesn't print them out in the notes.
Again, thanks for your great work. I hope there's a real simple solution to this.
follow-up: was able to reproduce this on my Macbook (macOS 12.3.1), same versions of Zotero, Obsidian and BetterBibtex respectively as mentioned in the Post above. Set it all up from scratch, got the exact same result as described above.
2nd follow-up: If I toggle "always place the comment made to a highlight before the text of the highlight" it suddenly works like a charm.
the same behavior occurs to me, including the "If I toggle always place the comment made to a highlight before the text of the highlight it suddenly works like a charm".
I looked at the json file, and didn't see anything special that might lead to such a bug; the only unusual thing that I saw, is that, the paths related to zotero items contains special characters like Chinese characters, which are converted to things like "%20". Not sure if there is anything to do with this. In my opinion, the problem lies on the side of bibnote formatter.
Finally, the "Structure of the extracted highlights/comments tag" doens't seem to work. it would be great if the users can specify the formats (including adding specific formats or extra text here).
BTW, I'm using softwares of the same versions as the OP, except that I'm using windows 10.
Here it seems that there are two issues:
-
missing comments (and tags);
-
failing to adjust the output format of the annotations; for example, I may want to add linebreaks between highlights, comments and tags, and I may want to add a prefix ">[!Tips]" before {{highlights}} so that the annotation would be rendered as a callout block; I suspect that this is supposed to be doable with the aid of "Structure of the extracted highlights/comments tag".
another related potential bug is: somehow the zotero links loses track to the original item or pdf; there should be two separate links for them but now only one is shown; moreover, the link is not complet, as shown below.

Not sure if it is related to encoding issues. I'm using the settings "
{{highlight quotes='true'}} {{citation}} {{comment}} {{if tags}} Tag: {{tags join='; '}}{{endif}}
" as suggested, and setting showing author year page number in bibnote formatter.I tried two items, both behave in the same way. Below is an example; I have also uploaded the json file.
related code:
"note": "<div data-citation-items=\"%5B%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fgroups%2F4602244%2Fitems%2FCWDGQDCM%22%5D%2C%22itemData%22%3A%7B%22id%22%3A%22http%3A%2F%2Fzotero.org%2Fgroups%2F4602244%2Fitems%2FCWDGQDCM%22%2C%22type%22%3A%22article-journal%22%2C%22abstract%22%3A%22%E6%8A%BD%E8%B1%A1%5Cn%E6%8A%98%E7%BA%B8%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%BB%93%E6%9E%84%E7%B4%A7%E5%87%91%E8%BD%BB%E5%B7%A7%E3%80%82%E7%84%B6%E8%80%8C%EF%BC%8C%E4%BC%A0%E7%BB%9F%E8%AE%BE%E8%AE%A1%E4%B8%AD%E7%9A%84%E6%8A%98%E7%BA%B8%E7%BB%93%E6%9E%84%E7%9A%84%E5%88%BB%E9%9D%A2%E5%9F%BA%E6%9C%AC%E4%B8%8A%E6%98%AF%E4%B8%8D%E5%8F%AF%E5%8F%98%E5%BD%A2%E7%9A%84%E5%88%9A%E6%80%A7%E6%9D%BF%E3%80%82%E5%9B%A0%E6%AD%A4%EF%BC%8C%E5%9C%A8%E8%BF%99%E4%BA%9B%E7%BB%93%E6%9E%84%E4%B8%AD%E5%AE%9E%E7%8E%B0%E5%82%A8%E8%83%BD%E5%92%8C%E5%BC%BA%E5%A4%A7%E7%9A%84%E8%87%AA%E9%94%81%E6%80%A7%E5%8F%AF%E8%83%BD%E6%98%AF%E5%85%B7%E6%9C%89%E6%8C%91%E6%88%98%E6%80%A7%E7%9A%84%E3%80%82%E6%88%91%E4%BB%AC%E6%B3%A8%E6%84%8F%E5%88%B0%EF%BC%8C%E7%93%A2%E8%99%AB%E7%94%B2%E5%A3%B3%E8%99%AB%E7%9A%84%E5%A4%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E5%A4%9A%E6%A8%A1%E5%BC%8F%E6%9C%BA%E5%99%A8%E4%BA%BA%E5%BC%80%E5%8F%91%E4%BA%86%E5%8F%AF%E9%83%A8%E7%BD%B2%E7%9A%84%E6%BB%91%E7%BF%94%E6%9C%BA%E6%A8%A1%E5%9D%97%E3%80%82%E6%BB%91%E7%BF%94%E6%9C%BA%E6%A8%A1%E5%9D%97%E5%8F%AF%E7%B4%A7%E5%87%91%E6%8A%98%E5%8F%A0%EF%BC%8C%E5%8F%AF%E5%BF%AB%E9%80%9F%E5%B1%95%E5%BC%80%EF%BC%8C%E5%B9%B6%E5%8F%AF%E4%BB%A5%E6%9C%89%E6%95%88%E5%9C%B0%E6%89%BF%E5%8F%97%E7%A9%BA%E6%B0%94%E5%8A%A8%E5%8A%9B%E3%80%82%E6%88%91%E4%BB%AC%E8%BF%98%E4%BD%BF%E7%94%A8%E7%AC%A6%E5%90%88%E8%A6%81%E6%B1%82%E7%9A%84%E6%8A%98%E7%BA%B8%E6%9D%A5%E5%A2%9E%E5%BC%BA%E8%B7%B3%E8%B7%83%E6%9C%BA%E5%99%A8%E4%BA%BA%E4%B8%AD%E8%B7%B3%E8%B7%83%E6%9C%BA%E6%9E%84%E7%9A%84%E8%83%BD%E9%87%8F%E5%AD%98%E5%82%A8%E8%83%BD%E5%8A%9B%E3%80%82%5CnLadybird%20beetle%E2%80%93inspired%20origami%20uses%20the%20deformation%20and%20geometry%20of%20its%20facet%20to%20enable%20unique%20energy%20storage%20and%20self-locking.%5CnLadybird%20beetle%E2%80%93inspired%20origami%20uses%20the%20deformation%20and%20geometry%20of%20its%20facet%20to%20enable%20unique%20energy%20storage%20and%20self-locking.%22%2C%22collection-title%22%3A%22%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%E6%95%B0%E9%87%8F%EF%BC%9A%2064%20%E5%9F%BA%E9%87%91%E9%A1%B9%E7%9B%AE%EF%BC%9A%20Defense%20Acquisition%20Program%20Administration%20%E5%9F%BA%E9%87%91%E5%8F%B7%EF%BC%9A%20UD190018ID%20%E5%9F%BA%E9%87%91%E9%A1%B9%E7%9B%AE%EF%BC%9A%20Korea%20Institute%20of%20Science%20and%20Technology%20%E5%9F%BA%E9%87%91%E5%8F%B7%EF%BC%9A%202V07080-19-P073%20%E5%A7%93%E5%90%8D%EF%BC%9A%20Baek%2CSang-Min%20ORCID%EF%BC%9A%20http%3A%2F%2Forcid.org%2F0000-0002-8634-2102%20%E5%8D%95%E4%BD%8D%EF%BC%9A%20Soft%20Robotics%20Research%20Center%2C%20Seoul%20National%20University%2C%20Seoul%2C%20Republic%20of%20Korea.%20Department%20of%20Mechanical%20and%20Aerospace%20Engineering%2C%20Institute%20of%20Advanced%20Machines%20and%20Design%2C%20Seoul%20National%20University%2C%20Seoul%2C%20Republic%20of%20Korea.%20%E5%A7%93%E5%90%8D%EF%BC%9A%20Yim%2CSojung%20ORCID%EF%BC%9A%20http%3A%2F%2Forcid.org%2F0000-0002-5296-5336%20%E5%8D%95%E4%BD%8D%EF%BC%9A%20Soft%20Robotics%20Research%20Center%2C%20Seoul%20National%20University%2C%20Seoul%2C%20Republic%20of%20Korea.%20Department%20of%20Mechanical%20and%20Aerospace%20Engineering%2C%20Institute%20of%20Advanced%20Machines%20and%20Design%2C%20Seoul%20National%20University%2C%20Seoul%2C%20Republic%20of%20Korea.%20%E5%A7%93%E5%90%8D%EF%BC%9A%20Chae%2CSoo-Hwan%20ORCID%EF%BC%9A%20http%3A%2F%2Forcid.org%2F0000-0002-4819-5746%20%E5%8D%95%E4%BD%8D%EF%BC%9A%20Soft%20Robotics%20Research%20Center%2C%20Seoul%20National%20University%2C%20Seoul%2C%20Republic%20of%20Korea.%20Department%20of%20Mechanical%20and%20Aerospace%20Engineering%2C%20Institute%20of%20Advanced%20Machines%20and%20Design%2C%20Seoul%20National%20University%2C%20Seoul%2C%20Republic%20of%20Korea.%20%E5%A7%93%E5%90%8D%EF%BC%9A%20Lee%2CDae-Young%20ORCID%EF%BC%9A%20undefined%20%E5%8D%95%E4%BD%8D%EF%BC%9A%20Soft%20Robotics%20Research%20Center%2C%20Seoul%20National%20University%2C%20Seoul%2C%20Republic%20of%20Korea.%20Department%20of%20Mechanical%20and%20Aerospace%20Engineering%2C%20Institute%20of%20Advanced%20Machines%20and%20Design%2C%20Seoul%20National%20University%2C%20Seoul%2C%20Republic%20of%20Korea.%20School%20of%20Engineering%20and%20Applied%20Sciences%2C%20Harvard%20University%2C%20Cambridge%2C%20MA%2C%20USA.%20Wyss%20Institute%20for%20Biologically%20Inspired%20Engineering%2C%20Harvard%20University%2C%20Cambridge%2C%20MA%2C%20USA.%20%E5%A7%93%E5%90%8D%EF%BC%9A%20Cho%2CKyu-Jin%20ORCID%EF%BC%9A%20http%3A%2F%2Forcid.org%2F0000-0003-2555-5048%20%E5%8D%95%E4%BD%8D%EF%BC%9A%20Soft%20Robotics%20Research%20Center%2C%20Seoul%20National%20University%2C%20Seoul%2C%20Republic%20of%20Korea.%20Department%20of%20Mechanical%20and%20Aerospace%20Engineering%2C%20Institute%20of%20Advanced%20Machines%20and%20Design%2C%20Seoul%20National%20University%2C%20Seoul%2C%20Republic%20of%20Korea.%20%E6%96%87%E7%8C%AE%E7%BD%91%E7%AB%99%EF%BC%9A%20https%3A%2F%2Fwww.science.org%2Fdoi%2F10.1126%2Fscirobotics.aaz6262%22%2C%22container-title%22%3A%22Science%20Robotics%22%2C%22DOI%22%3A%2210.1126%2Fscirobotics.aaz6262%22%2C%22ISSN%22%3A%222470-9476%22%2C%22issue%22%3A%2241%22%2C%22journalAbbreviation%22%3A%22Sci.%20Robot.%22%2C%22language%22%3A%22en%22%2C%22license%22%3A%22Copyright%20%C2%A9%202020%20The%20Authors%2C%20some%20rights%20reserved%3B%20exclusive%20licensee%20American%20Association%20for%20the%20Advancement%20of%20Science.%20No%20claim%20to%20original%20U.S.%20Government%20Works.%20http%3A%2F%2Fwww.sciencemag.org%2Fabout%2Fscience-licenses-journal-article-reuseThis%20is%20an%20article%20distributed%20under%20the%20terms%20of%20the%20Science%20Journals%20Default%20License.%22%2C%22note%22%3A%22publisher%3A%20Science%20Robotics%5Cnsection%3A%20Research%20Article%22%2C%22source%22%3A%22robotics.sciencemag.org%22%2C%22title%22%3A%22Ladybird%20beetle%E2%80%93inspired%20compliant%20origami%22%2C%22URL%22%3A%22https%3A%2F%2Fsyndication.highwire.org%2Fcontent%2Fdoi%2F10.1126%2Fscirobotics.aaz6262%22%2C%22volume%22%3A%225%22%2C%22author%22%3A%5B%7B%22family%22%3A%22Baek%22%2C%22given%22%3A%22Sang-Min%22%7D%2C%7B%22family%22%3A%22Yim%22%2C%22given%22%3A%22Sojung%22%7D%2C%7B%22family%22%3A%22Chae%22%2C%22given%22%3A%22Soo-Hwan%22%7D%2C%7B%22family%22%3A%22Lee%22%2C%22given%22%3A%22Dae-Young%22%7D%2C%7B%22family%22%3A%22Cho%22%2C%22given%22%3A%22Kyu-Jin%22%7D%5D%2C%22accessed%22%3A%7B%22date-parts%22%3A%5B%5B%222021%22%2C1%2C26%5D%5D%7D%2C%22issued%22%3A%7B%22date-parts%22%3A%5B%5B%222020%22%5D%5D%2C%22season%22%3A%2215%22%7D%2C%22citation-key%22%3A%22baek2020LadybirdBeetleInspired%22%7D%7D%5D\" data-schema-version=\"8\"><h1>Annotations<br/>(20/08/2022, 18:43:49)</h1>\n<p><span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fgroups%2F4602244%2Fitems%2FKYDQ2WM6%22%2C%22annotationKey%22%3A%22KXIFSBN7%22%2C%22color%22%3A%22%23ff6666%22%2C%22pageLabel%22%3A%221%22%2C%22position%22%3A%7B%22pageIndex%22%3A0%2C%22rects%22%3A%5B%5B36%2C656.101%2C378.216%2C678.601%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fgroups%2F4602244%2Fitems%2FCWDGQDCM%22%5D%2C%22locator%22%3A%221%22%7D%7D\">“Ladybird beetle–inspired compliant origami”</span> <span class=\"citation\" data-citation=\"%7B%22citationItems%22%3A%5B%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fgroups%2F4602244%2Fitems%2FCWDGQDCM%22%5D%2C%22locator%22%3A%221%22%7D%5D%2C%22properties%22%3A%7B%7D%7D\">(<span class=\"citation-item\">Baek et al., 2020, p. 1</span>)</span></p><p><span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fgroups%2F4602244%2Fitems%2FKYDQ2WM6%22%2C%22annotationKey%22%3A%225N34N42G%22%2C%22color%22%3A%22%23ffd400%22%2C%22pageLabel%22%3A%221%22%2C%22position%22%3A%7B%22pageIndex%22%3A0%2C%22rects%22%3A%5B%5B36%2C475.451%2C222.608%2C489.226%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fgroups%2F4602244%2Fitems%2FCWDGQDCM%22%5D%2C%22locator%22%3A%221%22%7D%7D\">“The rapid deployment and load-bearing abilities”</span> <span class=\"citation\" data-citation=\"%7B%22citationItems%22%3A%5B%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fgroups%2F4602244%2Fitems%2FCWDGQDCM%22%5D%2C%22locator%22%3A%221%22%7D%5D%2C%22properties%22%3A%7B%7D%7D\">(<span class=\"citation-item\">Baek et al., 2020, p. 1</span>)</span> this is a sample comment within a highlight Tag: testtag1; testtag2</p><p><span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fgroups%2F4602244%2Fitems%2FKYDQ2WM6%22%2C%22annotationKey%22%3A%22RFKTSBGV%22%2C%22color%22%3A%22%235fb236%22%2C%22pageLabel%22%3A%222%22%2C%22position%22%3A%7B%22pageIndex%22%3A1%2C%22rects%22%3A%5B%5B152.758%2C101.48%2C290.999%2C115.255%5D%2C%5B36%2C90.479%2C291.214%2C104.254%5D%2C%5B36%2C79.478%2C181.159%2C93.253%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fgroups%2F4602244%2Fitems%2FCWDGQDCM%22%5D%2C%22locator%22%3A%222%22%7D%7D\">“Therefore, previous origami applications have focused on the flexure design to acquire deformationrelated functionality in the origami str”</span> <span class=\"citation\" data-citation=\"%7B%22citationItems%22%3A%5B%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fgroups%2F4602244%2Fitems%2FCWDGQDCM%22%5D%2C%22locator%22%3A%222%22%7D%5D%2C%22properties%22%3A%7B%7D%7D\">(<span class=\"citation-item\">Baek et al., 2020, p. 2</span>)</span></p></div>",
zotero_note.txt
I have encountered the same issue, the https://github.com/stefanopagliari/bibnotes/issues/130#issuecomment-1219481349 could solve the problem temporarily. Thank you so much
I have encountered the same issue too, the https://github.com/stefanopagliari/bibnotes/issues/130#issuecomment-1219481349 solve it, but I would like to keep the previous order.
I meet the same issue. And I slove it by changing "Highlight Color" transformation.
Simply add {{comment}} {{tag}} to the color you want to show.
Like below:
