ahrm / sioyek

Sioyek is a PDF viewer with a focus on textbooks and research papers
https://sioyek.info/
GNU General Public License v3.0
7.15k stars 236 forks source link

Zotero integration #263

Open DhruvaSambrani opened 2 years ago

DhruvaSambrani commented 2 years ago

Multiple aspects of Zotero can be integrated with Sioyek, mainly showing notes in portals, adding pdf to zotero, opening from zotero's database etc. I do not have any idea about the amount of work this will involve.

mistzzt commented 2 years ago

opening from Zotero's database

iirc you can set sioyek as Zotero's external pdf reader.

Another point to add- relevant to #160: it'd be great if sioyek could save some annotations (e.g., highlighted areas) to the pdf file so that I can store those annotations in Zotero.

gjgress commented 2 years ago

Zotero and sioyek integration would be a match made in heaven. Saving pdfs to Zotero would complete the workflow really nicely.

  1. Open paper from Zotero in sioyek
  2. See reference to another paper in paper; middle click to open in browser, or ctrl + click to download it directly
  3. Read through said paper; if pertinent, save from sioyek to Zotero library

In the meantime though, I recommend using the Zotero browser extension. If you want to add a paper to your library, you can open it in your browser and use the extension to save it to your library, with all the metadata.

I actually think the functionality suggested could be implemented as a bash/Python script. I may take a crack at it if I have the time.

Elaws commented 1 year ago

It would be amazing if we could have all Sioyek's annotations and highlights into Zotero's PDF reader. From there, it's easy to get these annotations and highlights into a note taking app such as Obsidian.

As useful as Sioyek is, it's a bit unfortunate that none of the annotations and highlights we make are compatible with other PDF, and that none of the annotations and highlights made in other PDF readers are usable in Sioyek, as mentioned here.

A fluent Sioyek -> Zotero -> Obsidian workflow would honestly be a blast. Related FR on Zotero forum.

ahrm commented 1 year ago

We do have an extension that allows you to embed annotations so they are available in other PDF viewers: https://github.com/ahrm/sioyek-python-extensions#-embed_annotations

A more advanced zotero integration could be implemented as an extension, contributions are welcome.

Elaws commented 1 year ago

Thank you @ahrm, this is a great news !

I would like to test it, but my Sioyek fork is from 6th March : I'm not really experimented with this, so what would be the best way to proceed according to you ?

  1. fetch upstream
  2. cherry-pick the commits that I missed from 6th March to today ?
  3. merge with my fork

Thanks a lot !

ahrm commented 1 year ago

Do I need to update the submodules (git submodule update --init --recursive) ?

Yes, we have updated the mupdf submodule.

Since I made a few commits from the fork, can I then do the following

It is theoretically possible, but it is going to be pretty difficult.

Elaws commented 1 year ago

Thanks for your reply @ahrm.

Do you think it's better that I just download the latest Sioyek sources and just add manually again my commits ? But it means that I should do this each time I want to add Sioyek updates ?

How people do keep a fork updated with upstream when they already made a few commits on their fork ?

ahrm commented 1 year ago

You can try to merge the upstream changes (git merge). It might have some conflicts though since sioyek has changed a lot since then which you'll have to resolve manually.