Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toBibTeX with BibTeX markup #10

Open
htvogler opened this issue Aug 21, 2020 · 2 comments
Open

toBibTeX with BibTeX markup #10

htvogler opened this issue Aug 21, 2020 · 2 comments

Comments

@htvogler
Copy link

Hi iandol, first of all thank you very much for taking care of this great toolbox!

I use the toBibTeX workflow quite often. My problem is that it doesn't export the references in BibTeX markup, which means that all formatting (italics, superscripts etc.) are lost.

With the dictionary-based scripting methods it has now become possible to export with proper BibTeX markup. I made some corresponding changes to the code. It's not done in the most elegant way, and I was also not able to get the "repeat while" loop running. For larger groups it is considerably slower than your version.
Nevertheless, you may want to have a look at it and find a better way to integrate the changes.

Cheers,
Hannes

toBibTeX_HV.txt

@iandol
Copy link
Owner

iandol commented Sep 1, 2020

Hi Hannes, when I get time I can have a look and see. Did you get an idea about what takes up so much time, is it just that the new dictionary methods are that much slower than the older events? What is the rough time difference?

I don't personally use the toBibTeX tool so much (Applescript leaks memory with large exports [my usual export is ~7000 references], so I normally do a manual export), so I may not get round to testing this soon...

@iandol
Copy link
Owner

iandol commented Sep 1, 2020

➜ time osascript toBibTeX.applescript Desktop 'Reviews'
osascript toBibTeX.applescript Desktop 'Reviews'  0.16s user 0.10s system 1% cpu 18.467 total
(base)

➜ time osascript toBibTeXD.applescript Desktop 'Reviews'
osascript toBibTeXD.applescript Desktop 'Reviews'  0.20s user 0.09s system 0% cpu 34.822 total
(base)

Your code: 34.8 secs vs. original 18.5 secs for 523 refs... The old code splits the export into chunks, which at least for the event system was much faster than trying to do it all in one go, I suspect this will also work.

@htvogler -- I did make some testing code with the newer interface a while ago (which is chunked, maybe this will be faster: https://github.com/iandol/bookends-tools/blob/master/source/newBibTeX.applescript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants