A workfolw using Scrivener + Zotero + Highlights + Latex to collect information and write papers


i write python script to modify the .scriv project file and import Zotero papers into it

Is Highlights working well for you? I tried the demo under Sierra & it was quite buggy, though largely from the PDF problems in Sierra, as I understand it.

which part is buggy?
the Highlights App itself or my scripts to extract text?
if the Highlights App is buggy, you can send a email to contact@highlightsapp.net to report a bug (i reported one bug last year and got reply in the same day!)
if my script is buggy, please raise issues in github for it.

I use OS X EI Capitan (10.11.6) and i do not test the demo on other computer.
Highlights working well for me.

Please note that use of a script like this is entirely at your own risk. There is no supported way to modify a Scrivener project with any tool other than Scrivener itself.


the workflow consist of 3 parts

  1. demos to use scrivener to write latex paper
  2. how to use Highlights to collect highlight and comment text
  3. how to import Zotero database into Scrivener

only part 3 use my script

i change the project .scrivx file, which is a xml file, strictly agree with what scrivener itself did, so i don’t think it’s a problem
my script will backup the whole scriv project every time it runs.

The first 2 parts of the workflow is for normal people
This workflow part 3 is for the Geek person (you should at last know what is ‘makefile’), for those people, of course they know what they are doing.

Really nice workflow!

If you wanted a slightly less risky Zotero import, you could generate an OPML file that Scrivener can import into the Binder, this is what I do with Bookends reference manager. But the XML is easy to parse and fix if anything were to go wrong (given the geek credentials of setting this up!) so I wouldn’t worry about editing the scrivx file directly (noting that the format may change when a new version of Scrivener is released!)

Or at least know enough to make a backup before they do it.

Are you familiar with the saying, “Fools rush in where angels fear to tread?” It applies to software, too, hence the warning for the unwary.


ok, i acknowledge that my scripts have risks to modify the project file, as i do not test it on large project file sample.
So part 3 is only for those who use Zotero and have basic knowledge about python and xml.

but anyone can try part 1 and part 2

I do much more things than simply import info into Binder.
I change the keyword list, the Custom Metadata list, the auto-complete list and some other things.
I also somehow implement the “Hard link” feature (you know it if you are familiar with linux) for text, because you may have duplicated papers in different Zotero collections
Its great for Scrivener to use xml, i only spent two days to finish my script by guess and with trial and error.
I will check the consistency every time Scrivener have update.

That is really nice!!! I made a wishlist item some time ago because I wished OPML import could do some of these things too:


Can you explain a bit more about how you do this?

it’s very simple, because each Text or Folder in Binder have a unique ID for others to refer, if you create a new term in Binder that has the same ID as an exists one, they are the same.
but then you will have trouble when delete (empty trash) one of these multi-linked terms, so i add an new custom Metadata called “Hardlink” which counts the hardlink for each text, and another script “safeRemove” to handle the deletion.
this feature is not elaborated tested(i only test features i used a lot, as i’m accumulating more papers in the project, i will do more tests on the feature to make it safe), you can use it, but i currently do not write it on the workflow

i think i have write detailed comment in my script. you can read the source code to learn how to change all the things

my script make backup each time it runs, if you also want to write some scripts, do the same thing