bookends-tools icon indicating copy to clipboard operation
bookends-tools copied to clipboard

Conversion to JSON issue

Open ksummers92 opened this issue 3 years ago • 3 comments

First of all, thank you for these amazing tools. I noticed that you are also the author of scrivomatic which I have been using with Scrivener and these bookends tools to make reference managing a breeze.

The issue that I am having with toBibTeX and the subsequent conversion to JSON is at the JSON conversion step. I had a different issue with this back in 2020 (#8), but none of the cite keys are empty and I have even gone through the keys to make sure that none of them were duplicates. The attached screenshot is the error that I am getting. I narrowed down the cause and it appears to have been caused by special characters in the abstract field (see second screenshot). Not sure how to put that special character in a SQL search, but I thought that I would bring it to your attention in case anyone else has a similar issue.

Thank you again. Screen Shot 2022-02-22 at 21 24 49 Screen Shot 2022-02-22 at 21 49 43

ksummers92 avatar Feb 23 '22 03:02 ksummers92

Hi, could you try to export just that ref to a BibTeX file from Bookends and attach it here, or make a bookends library with just that ref?

More broadly, there is now a much better way to deal with BibTeX. Jon added an automatic sync system in V14.0.1, so that Bookends itself can both create and update a BibTeX file. This is much faster and more robust than these Applescript tools.

I have made some launchd scripts that watch this bib file and run the JSON conversion automagically whenever Bookends updates it. See this forum post: https://www.sonnysoftware.com/phpBB3/viewtopic.php?p=25644#p25644

iandol avatar Feb 24 '22 12:02 iandol

Unfortunately, I found it by elimination and accidentally overwrote the .bib file after I corrected the special characters since I did not know if that was the problem or not. Some digging on the character suggests that it is the result of an unprintable font in MacOS.

Thanks for the heads up on this new way to handle BibTeX for references. Sorry that I could not be more help with this particular issue that I found.

ksummers92 avatar Feb 25 '22 03:02 ksummers92

I actually did find an old .bib file saved elsewhere that did not get overwritten. However, the reference that contained the special character that I narrowed the error down to was not in the .bib file. So unfortunately, I still cannot recreate the error because I no longer have the special characters in the reference. Hopefully that fact that it does not appear in the .bib file provides some insight.

ksummers92 avatar Feb 26 '22 18:02 ksummers92