Giter Site home page Giter Site logo

sunznx / zotero2readwise-sync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from e-alizadeh/zotero2readwise-sync

0.0 1.0 0.0 11.04 MB

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

License: MIT License

zotero2readwise-sync's Introduction

Zotero2Readwise-Sync

Zotero ➡️ Readwise Automation

This repo has actually a cronjob (time-based Job scheduler) using GitHub actions that automates the Zotero -> Readwise integration using the Zotero2Readwise Python library.

Instructions

You just need to fork this repository and add the following secrets to your git repository secrets, and you're ready to go!

  • Readwise Access Token (secret name: READWISE_TOKEN)
  • Zotero Key (secret name: ZOTERO_KEY)
  • Zotero Library ID (secret name: ZOTERO_ID)

Check the Section Usage in Zotero2Readwise repo to get instructions on how to find above information.

Note that since Readwise token and Zotero Key's are sensitive information, they should be treated as your passwords. Because of this, I'm using GitHub Action secrets to manage such sensitive variables!

Change the scheduled automation

You can run Zotero2Readwise automation at any repeated schedule by changing the cron schedule expression. Check crontab guru or crontab (has some examples) for more details.

Once you come up with the desired schedule, update the cron argument in .github/workflows/automation.yml file given below. Don't forget the double quote around the expression!

  schedule:
    - cron: "0 3 * * 1,3,5"

Above is the default schedule I've set up to run the automation. The cron expression means to run the automation at 03:00 AM every Monday, Wednesday, and Friday. You can change the schedule as you wish. Just make sure that your cron job expression is valid by checking

A scheduled GitHub Action will show scheduled next to the deployment as can be seen below.

How to add secrets to your repo's GitHub Actions secrets

Manual Trigger

If you want to manually trigger the automation, you can simply commit an empty message and push it to your forked repo, like the following:

git commit --allow-empty -m "Trigger automation"

and then,

git push

This will run the automation immediately and won't impact your scheduled automation.

Note

Keep in mind that GitHub Actions may run the scheduled automation with some delay (sometimes with one-hour delay!).

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.