Giter Site home page Giter Site logo

e-alizadeh / zotero2readwise-sync Goto Github PK

View Code? Open in Web Editor NEW
59.0 59.0 145.0 11.04 MB

An automated and scheduled trigger of Zotero2Readwise Python library (https://github.com/e-alizadeh/Zotero2Readwise)

License: MIT License

automation readwise readwise-highlights zotero

zotero2readwise-sync's Introduction

Hi there. I'm Essi ๐Ÿ‘‹

๐ŸŒฑ I'm in Permanent Beta who loves and enjoys learning, improving and evolving...


๐Ÿ“ซ How to reach me:

I post frequently on my personal website, and on medium. You can follow me on:

Personal Website LinkedIn Medium Twitter


๐Ÿ“• Latest Blog Posts

Personal Blog
README.md last auto-generated Wed Jul 17 00:25:37 2024

zotero2readwise-sync's People

Contributors

e-alizadeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zotero2readwise-sync's Issues

Would you consider Readwise2Zotero-Sync...?

Hello Essi

I'm using Zotero2Readwise-Sync daily and it's been extremely helpful, thank you for all your work!

I wondered if you have considered going the other way, since Readwise now has its Reader product which is a very nice way to read articles (especially if they are non-PDF). It would be extremely cool to be able to export Reader highlights (which are Readwise highlights, of course) back into Zotero, so they appear in the Zotero interface and can be referenced in Zotero notes and e.g. when writing/citing in a word processor.

Do you think this is feasible/interesting?

Thank you again!

Using `include_notes=True` in Zotero2Readwise-Sync

I wondered how to use this option when utilising Zotero2Readwise-Sync -- I have many manually-written notes in Zotero that it would be really helpful to have in Readwise, alongside the annotations (which are working great!).

Run is now failing

The past few days my runs have been failing, with the follow (not very helpful) output:

It may take some time...

1170 Zotero items are retrieved.
ZOTERO: Start formatting 1170 annotations/notes...
It may take some time depending on the number of annotations...
A complete message will show up once it's done!


ZOTERO: Formatting Zotero Items is completed!!


NOTE: 1170 Zotero annotations/notes (out of 1170) failed to format.
You can run `save_failed_items_to_json()` class method to save those items.

ZOTERO: Detail of failed items are saved into /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/zotero2readwise/failed_zotero_items.json


Readwise: Push 0 Zotero annotations/notes to Readwise...
It may take some time depending on the number of highlights...
A complete message will show up once it's done!

Traceback (most recent call last):
  File "run.py", line 64, in <module>
    zt2rw.run()
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/zotero2readwise/zt2rw.py", line 55, in run
    self.readwise.post_zotero_annotations_to_readwise(formatted_items)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/zotero2readwise/readwise.py", line 149, in post_zotero_annotations_to_readwise
    self.create_highlights(rw_highlights)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/zotero2readwise/readwise.py", line 72, in create_highlights
    raise Zotero2ReadwiseError(
zotero2readwise.exception.Zotero2ReadwiseError: Uploading to Readwise failed with following details:
POST request Status Code=400 (Bad Request)
Error log is saved to error_log_400_failed_post_request_to_readwise.json file.
Error: Process completed with exit code 1.

Any thoughts on what the issue is? Looks like the issue with with formatting, which suggests a problem with the Zotero API. But it's clearly connecting, if it's able to grab 1170 items.

Automation failing

I am trying to manually trigger the automation and it keeps failing, saying

run.py: error: the following arguments are required: zotero_library_id
Error: Process completed with exit code 2

I ran it with the debugger and got this output during the 'Run Automation' phase.

##[debug]Evaluating condition for step: '๐Ÿš€ Run Automation'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: ๐Ÿš€ Run Automation
##[debug]Loading inputs
##[debug]Evaluating: format('python run.py {0} {1} {[2](https://github.com/joshuadanpeterson/Zotero2Readwise-Sync/actions/runs/7361790719/job/20039547775#step:6:2)}', secrets.READWISE_TOKEN, secrets.ZOTERO_KEY, secrets.ZOTERO_ID)
##[debug]Evaluating format:
##[debug]..Evaluating String:
##[debug]..=> 'python run.py {0} {1} {2}'
##[debug]..Evaluating Index:
##[debug]....Evaluating secrets:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'READWISE_TOKEN'
##[debug]..=> '***'
##[debug]..Evaluating Index:
##[debug]....Evaluating secrets:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'ZOTERO_KEY'
##[debug]..=> '***
##[debug]'
##[debug]..Evaluating Index:
##[debug]....Evaluating secrets:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'ZOTERO_ID'
##[debug]..=> '***'
##[debug]=> 'python run.py *** ***
##[debug] ***'
##[debug]Result: 'python run.py *** ***
##[debug] ***'
##[debug]Loading env
Run python run.py *** ***
##[debug]/usr/bin/bash -e /home/runner/work/_temp/80c4b7[3](https://github.com/joshuadanpeterson/Zotero2Readwise-Sync/actions/runs/7361790719/job/20039547775#step:6:3)e-876[4](https://github.com/joshuadanpeterson/Zotero2Readwise-Sync/actions/runs/7361790719/job/20039547775#step:6:4)-48a0-ae14-c2a0[6](https://github.com/joshuadanpeterson/Zotero2Readwise-Sync/actions/runs/7361790719/job/20039547775#step:6:6)a6[7](https://github.com/joshuadanpeterson/Zotero2Readwise-Sync/actions/runs/7361790719/job/20039547775#step:6:7)f6b2.sh
usage: run.py [-h] [--library_type LIBRARY_TYPE]
              [--include_annotations INCLUDE_ANNOTATIONS]
              [--include_notes INCLUDE_NOTES]
              [--filter_color {#ffd400,#ff6666,#5fb236,#2ea8e5,#a28ae5,#e56eee,#f19837,#aaaaaa}]
              [--use_since]
              readwise_token zotero_key zotero_library_id
run.py: error: the following arguments are required: zotero_library_id
Error: Process completed with exit code 2.
##[debug]Finishing: ๐Ÿš€ Run Automation

As you can see, I have my secrets variables set up. Thing is that I have the right library key, so I'm not sure why it's saying that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.