Hi, I have dockerized anki-sync-server (via PyPi package) and run it on my Raspberry Pi. It syncs perfectly with AnkiDroid!
I want to go further and make changes to my collection programmatically. I know that the sync server can only sync, so there is no endpoint like add new note
. So my plan is to download the collection, patch it, and send it back.
But I’m stuck even with authentication. There is no API documentation, the implementation is Rust-based, and even with the help of LLMs, I don’t understand what my requests should look like…
1 Like
AnkiConnect
Will this one satisfy?
1 Like
I have checked this plugin, but it cannot be installed and run on a server like a Raspberry Pi, as far as I understand.
My idea is to have a workflow that gets, for example, a word, generates a note from it with the help of AI, and adds it to a deck. The workflow can be triggered in different ways, by a message to a Telegram bot or by submitting a form.
Is it possible to write a python script to call anki’s pylib, or directly operate the sqlite database, and run a web server of your own to build a workflow with other tools? This is just a preliminary idea and has not been verified.
I have the exact same problem. Were you able to find a solution for this?
I usually use anki-connect, so I haven’t explored other possibilities.
Okay I just found this as the closest thing to what I was looking for: GitHub - mlcivilengineer/anki-desktop-docker: Creates an anki gui inside docker, accessible via browser
It runs a whole client (Anki Desktop) in a docker container. With AnkiConnect, you basically have an API to add new cards programmatically which will then sync with other devices.
Don’t even have to run your own sync server IIUC.