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

Fm
Fmajor
Posts: 17
Joined: Tue Dec 01, 2015 6:17 pm
Platform: Mac

Thu Nov 02, 2017 3:24 pm Post

https://github.com/Fmajor/Scrivener-ADS-Latex-Workflow

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

de
derick
Posts: 261
Joined: Mon Aug 11, 2008 9:58 pm

Thu Nov 02, 2017 8:21 pm Post

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.

Fm
Fmajor
Posts: 17
Joined: Tue Dec 01, 2015 6:17 pm
Platform: Mac

Fri Nov 03, 2017 3:12 am Post

derick wrote: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.

User avatar
kewms
Posts: 3232
Joined: Fri Feb 02, 2007 5:22 pm
Platform: Mac

Fri Nov 03, 2017 4:23 pm Post

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.

Katherine
Scrivener Support Team

Fm
Fmajor
Posts: 17
Joined: Tue Dec 01, 2015 6:17 pm
Platform: Mac

Sat Nov 04, 2017 6:43 am Post

kewms wrote: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.

Katherine


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.

User avatar
nontroppo
Posts: 755
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Sat Nov 04, 2017 12:31 pm Post

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!)

User avatar
kewms
Posts: 3232
Joined: Fri Feb 02, 2007 5:22 pm
Platform: Mac

Sun Nov 05, 2017 1:22 am Post

Fmajor wrote: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.


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.

Katherine
Scrivener Support Team

Fm
Fmajor
Posts: 17
Joined: Tue Dec 01, 2015 6:17 pm
Platform: Mac

Sun Nov 05, 2017 12:43 pm Post

kewms wrote:
Fmajor wrote: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.


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.

Katherine

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

Fm
Fmajor
Posts: 17
Joined: Tue Dec 01, 2015 6:17 pm
Platform: Mac

Sun Nov 05, 2017 12:51 pm Post

nontroppo wrote: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!)

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.

User avatar
nontroppo
Posts: 755
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Sun Nov 05, 2017 1:00 pm Post

Fmajor wrote:I change the keyword list, the Custom Metadata list, the auto-complete list and some other things.


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

viewtopic.php?f=4&t=38888&p=236167

Fmajor wrote: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


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

Fm
Fmajor
Posts: 17
Joined: Tue Dec 01, 2015 6:17 pm
Platform: Mac

Sun Nov 05, 2017 1:27 pm Post

nontroppo wrote: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