Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project: implement Anki plugin for syncing to/from Orbit #246

Open
andymatuschak opened this issue Nov 5, 2021 · 0 comments
Open

Project: implement Anki plugin for syncing to/from Orbit #246

andymatuschak opened this issue Nov 5, 2021 · 0 comments
Labels
🚩 Blocked 🗂 Enhancement Type: New features, improvements to the product 🚩 Help wanted Particularly amenable/appropriate for contributors

Comments

@andymatuschak
Copy link
Owner

andymatuschak commented Nov 5, 2021

Orbit's users naturally overlap with pre-existing Anki users. Orbit's ambitions are different from those of Anki, and it's much earlier along, so most of these people will of course want to continue doing their actual reviews in Anki, where they already have all their data.

It seems to me that the nicest way to enable this is to create an Anki plugin which will automatically pull in new prompts from Orbit. A better version of this plugin would perform bi-directional sync, so that you can freely move back and forth between Orbit and Anki as SRS interfaces. Edit prompts in Anki when Orbit's (missing) editor falls short; review in Orbit if you prefer its design or want a web interface; etc.

The key technical challenge here is that Anki's plugins are implemented in Python, and so you'll inevitably end up duplicating a bunch of stuff in the Orbit api, sync, and store packages. That really seems like a shame, but I don't see a great way around it. We could conceivably bundle Orbit command-line tools, Git plumbing style, and invoke them from Python to do the heavy lifting, but bundling binaries with Anki plugins seems quite implausible: Anki runs on Windows, all sorts of architectures, etc. So probably the best approach is to implement this as an HTTP client of the Orbit API, even though it'd be nice to also support syncing to/from local Orbit stores (e.g. from the native Orbit desktop app).

At a high level: we'll want to read from /events, translating prompt ingest events into creating Anki notes, translating review events into Anki revlog, etc. We can store the last event ID we saw, then next time only fetch events after that one.

This project will depend on #216 (implementing an OAuth provider for Orbit).

@andymatuschak andymatuschak added 🚩 Help wanted Particularly amenable/appropriate for contributors 🚩 Blocked 🗂 Enhancement Type: New features, improvements to the product labels Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚩 Blocked 🗂 Enhancement Type: New features, improvements to the product 🚩 Help wanted Particularly amenable/appropriate for contributors
Projects
None yet
Development

No branches or pull requests

1 participant