I am programming a script to (semi)automate citing academic literature.
Scrivener’s XML format makes scripting simple enough, even though I cannot quite work out one thing: the .scrivx file (in the .srciv package content) contains the file structure, but I cannot quite work out what the following variable represents:
The TextSelection element encodes the range of currently selected text. The first number is the index of the first selected character (which is often the cursor location), the second is the number of characters.
We do have a specification document for the file format. I don’t personally have the authority to release it, but it’s not a huge secret. Send an email to our support address if you’re interested.