taylormitchell / ankify_roam

A command-line tool which brings flashcards created in Roam to Anki.
MIT License
36 stars 6 forks source link

I can't get the automated import to work. #9

Closed Etyre closed 2 years ago

Etyre commented 4 years ago

The roam-to-git part seems to be working and backing up every hour, but I can't get the crontab command you recommend to work. (For one thing, it looks like it has an extra set of quotes: I don't think that the part that comes after the timing should be quoted.)

Does it work for you?

taylormitchell commented 3 years ago

Hey Etyre,

I have it working on my end but I have a slightly different set up than what is shown on the README. Try setting it up this way:

Open your terminal and run crontab -e to open up your cron jobs.

Add the following two lines to it. The first pulls the latest roam-to-git backup on github down to your local copy every hour. The second one runs ankify_roam 15 minutes after that. You'll need to replace the paths with your own:

0 * * * * cd ~/GitHub/roam_backup;git fetch --all;git reset --hard origin/master
15 * * * * ankify_roam add ~/GitHub/roam_backup/json/my_roam.json

Hope that helps!