meisei4 / ankihighlights

0 stars 0 forks source link

Docker and remote Anki API #1

Open meisei4 opened 2 months ago

meisei4 commented 2 months ago

FIgure out how to use this anki api docker container (https://hub.docker.com/r/pnorcross/anki-desktop) in a way that doesn't require manual set up...

It should automatically be able to login to your anki profile, and also have the anki api plugin installed on it.

Figure out if it can be hosted on something for free

Figure out how to do security stuff with keeping login information etc? (too ambitious perhaps)

meisei4 commented 2 months ago

https://git.foosoft.net/alex/anki-connect

review properly the basics of adding notes and cards and how to make a basic CRUD api for processing the ebook database as input and generating/updating cards as output to anki.

meisei4 commented 1 month ago

The current approach using AnkiConnect, while functional, is not the optimal solution due to several reasons:

  1. AnkiConnect Plugin Dependency: AnkiConnect is merely a plugin that provides API access by running Anki as a server. This adds unnecessary complexity as it requires the Anki desktop application to be actively running, including its GUI.

  2. Lack of a Public Anki API: There is no official public REST API for Anki, which limits our ability to directly interact with AnkiWeb data without relying on plugins like AnkiConnect.

  3. Containerization Challenges: While containerizing AnkiConnect (e.g., using Docker) might seem like a solution, it is not ideal. The current containerized solutions, like those found on Docker Hub, still require the full Anki desktop application to run within the container, which includes unnecessary overhead.

  4. Direct AnkiWeb Access: The ultimate goal is to have a lightweight, server-hosted API endpoint that can interact directly with AnkiWeb data without requiring the Anki desktop application. Unfortunately, this is not currently feasible due to the limitations of the existing Anki ecosystem and the lack of direct API support from AnkiWeb.

Given these constraints, our best course of action is to continue using AnkiConnect while exploring alternative methods for more streamlined and efficient access to Anki data. We should also keep an eye on any developments regarding a public API from AnkiWeb, as this would significantly simplify our integration efforts in the future.

?????? ALSO DO WE NEED A CLI?:

links:

https://forums.ankiweb.net/t/is-there-any-plan-to-expose-rest-api-for-anki/43106/4

https://hub.docker.com/r/pnorcross/anki-desktop

https://addon-docs.ankiweb.net/command-line-use.html

https://github.com/julien-sobczak/anki-cli