All Projects → chronologos → roam-to-anki

chronologos / roam-to-anki

Licence: other
Sync flashcards from Roam Research to Anki

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to roam-to-anki

Fabricius
Fabricius is an Anki plugin that bidirectionally syncs between Roam and Anki.
Stars: ✭ 54 (+58.82%)
Mutual labels:  anki, roamresearch
kian
Alternative desktop frontend for Anki2
Stars: ✭ 33 (-2.94%)
Mutual labels:  anki
frozen-fields
A fork of Tiago Barroso's Frozen Fields add-on with support for Anki 2.1
Stars: ✭ 22 (-35.29%)
Mutual labels:  anki
roamsr
Spaced Repetition in Roam Research
Stars: ✭ 96 (+182.35%)
Mutual labels:  roamresearch
anki2orgdrill
Python package to convert Anki style flashcards to Emacs org-drill format
Stars: ✭ 18 (-47.06%)
Mutual labels:  anki
AnkigaokaoTutorial
一本结合高考的 Anki 入门书
Stars: ✭ 48 (+41.18%)
Mutual labels:  anki
ScienceNotebooks
Collection of tools and stylesheet for scientific writting and learning (through Anki)
Stars: ✭ 43 (+26.47%)
Mutual labels:  anki
anki
Go library to read Anki *.apkg files
Stars: ✭ 32 (-5.88%)
Mutual labels:  anki
files2flashcards
Keep your flashcards rooted in the context of your notes
Stars: ✭ 28 (-17.65%)
Mutual labels:  anki
notes
A miscellany of thoughts.
Stars: ✭ 18 (-47.06%)
Mutual labels:  anki
anki tools
No description or website provided.
Stars: ✭ 32 (-5.88%)
Mutual labels:  anki
tweet-to-markdown
A command line tool to convert Tweets to Markdown.
Stars: ✭ 111 (+226.47%)
Mutual labels:  roamresearch
static-roam
A static-site generator for Roam Research
Stars: ✭ 59 (+73.53%)
Mutual labels:  roamresearch
AnnA Anki neuronal Appendix
Using machine learning on your anki collection to enhance the scheduling via semantic clustering and semantic similarity
Stars: ✭ 39 (+14.71%)
Mutual labels:  anki
anki-apkg
Create .apkg file for Anki
Stars: ✭ 25 (-26.47%)
Mutual labels:  anki
SmartReview
💠 单词智能复习项目 - 艾宾浩斯遗忘曲线 + 混淆词
Stars: ✭ 43 (+26.47%)
Mutual labels:  anki
speed-focus-mode
Speed Focus Mode add-on for Anki
Stars: ✭ 19 (-44.12%)
Mutual labels:  anki
google-translate-anki
No description or website provided.
Stars: ✭ 28 (-17.65%)
Mutual labels:  anki
ForgetMeNot
A flashcard app for Android.
Stars: ✭ 234 (+588.24%)
Mutual labels:  anki
find-all-the-new-words
找出文章中的生词(配合anki使用)
Stars: ✭ 38 (+11.76%)
Mutual labels:  anki

[[Roam -> Anki Sync]] (deprecated)

-- deprecated --

Version 2 of this project is in active development here: Fabricus. It supports bidirectional sync and is implemented as an Anki plugin.

Summary

This contains code meant to be used with roam-backup and Anki. roam-backup saves your Roam Research into Google Cloud Storage. Roam -> Anki Sync reads from Google Cloud Storage and extracts any flashcards you defined into Anki.

Features

  • Any changes in Roam will be synced to Anki, preserving the card's existing review schedule.
  • Lightning fast operation thanks to ripgrep.
  • Unit tests (hey that's a feature for small hacked together projects right?)

Known Bugs / Feature Requests:

  • A note will not sync if it changes in Roam Research in a way that requires the user to manually run tools->empty cards in Anki (e.g. removing a cloze field). Workaround is to do just that and run the tool again.
  • See issues tab for more.

Requirements

  1. You must install NodeJS, Git, Anki, ripgrep and the AnkiConnect Plugin.
  2. You must have have roam-backup saving to a Google Cloud Storage bucket GCS_BUCKET_NAME.
  3. ripgrep must be available on $PATH (usually this isn't a problem).
  4. Create a local .env file to define nodejs env variables. See Usage section for what is expected there.
  5. Create a new model in Anki called ClozeUID with 3 fields: { Text: text, Extra: extra, UID: uid }. Easiest way is to clone the existing Cloze model and add a UID field. This field is used for idempotency.
  6. AnkiConnect should be available on http://127.0.0.1:8765.

This program expects some Node environment variables to be present. To provide them, create a .env file following the example below:

GCS_BUCKET_NAME="some-roam-backup"
GCS_SERVICEACCOUNT_KEYFILE="./key.json"
DEFAULT_DECK="Some Deckname"
ANKI_CONNECT_URL="http://127.0.0.1:8765"

GCS_SERVICEACCOUNT_KEYFILE can be omitted if using application default credentials.

Usage

In Roam, a modified Anki cloze syntax is provided. Example:

- this is {c1:another} {c2:flashcard} {c3:haha}. #flashcard {uid:20200405151338}.

The necessary components are:

  1. #flashcard or [[flashcard]] tag
  2. cloze deletion(s) in the above format (note double colon).
  3. unique id in {uid:something} format, for idempotency. I usually use a timestamp generated via text expansion.

Everything must be on a single line.

npm start will run a one-time sync from Roam to Anki. To make this run automatically, use your OS automation system of choice e.g. cron.

Organizing your cards

Once cards are synced, changes are pulled one way from roam to anki. The note fields will be overwritten in Anki if they have been changed there. Any tags on the note in Anki will be preserved.

An easy way to organize automatically synced cards is to filter by the ClozeUID model and tag to your heart's content.

Authenticating to GCS

  1. If you have gCloud installed, you can run gcloud auth application-default login.
  2. Otherwise, go to Google Cloud Console, download your service account keyfile and define add it to your .env file.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].