Script to export static/smart groups or folders matching a pattern to separate BibTeX files
Posted: Mon Mar 20, 2017 1:27 am
Reposting from this thread: viewtopic.php?f=2&t=4105&p=19168#p19158
I've put together an applescript to export a particular group or folder of groups from Bookends to separate BibTeX files (one per group). It's meant to be run from the command line, with parameters that allow you to select which group(s)/folder(s) you'd like to export as well as where you would like the exported .bib files to go (see comments at the top of the file for more details and syntax).
The idea is that it could be used as part of a makefile or other build script for a paper you're writing in TeX or markdown. If you wanted to, you could set it to be run from a cron job or via something like Hazel if you wanted automated refreshing of export for a particular group or folder of groups. I wouldn't recommend using it to constantly re-export your entire database, since as Jon said, that takes a while and is probably not usually necessary.
Just as a test, I have tried to use this script to export a group with all of the references in my library (~6500 references), and it reliably crashes. It does seem to work pretty well on groups of references up to about 2000 items.
The script is available here: https://gist.github.com/naupaka/3637da8 ... 3575a7c2e1
I've put together an applescript to export a particular group or folder of groups from Bookends to separate BibTeX files (one per group). It's meant to be run from the command line, with parameters that allow you to select which group(s)/folder(s) you'd like to export as well as where you would like the exported .bib files to go (see comments at the top of the file for more details and syntax).
The idea is that it could be used as part of a makefile or other build script for a paper you're writing in TeX or markdown. If you wanted to, you could set it to be run from a cron job or via something like Hazel if you wanted automated refreshing of export for a particular group or folder of groups. I wouldn't recommend using it to constantly re-export your entire database, since as Jon said, that takes a while and is probably not usually necessary.
Just as a test, I have tried to use this script to export a group with all of the references in my library (~6500 references), and it reliably crashes. It does seem to work pretty well on groups of references up to about 2000 items.
The script is available here: https://gist.github.com/naupaka/3637da8 ... 3575a7c2e1