Beeminder Forum

Super slick Anki server-side integration

Hi folks!

Anki uses Ankiweb for syncing between web, desktop, and mobile. The Anki dev team/person is strictly against any sort of Ankiweb API or access, and while I could probably sneak around it, I don’t think it’s the right thing to do.

However, there are options in the desktop Anki and in Ankidroid (no idea about iOS…) to use a third party syncing server. There is a good one written in Python, which is also something I’m awesome with.

I’m considering writing a super slick Anki integration that lives on the server. This means you would sync from desktop or mobile when you’re finished, like you have to now, and Beeminder and the server would talk together. This means you could be a mobile-only Anki user and still get the integration! You wouldn’t have to remember to do anything–except sync.

The only downside that I can see is that 1) most people don’t want to run services and 2) I have no idea what this means for shared decks, but I assume it’s not great news. I don’t use those, so I am not sure how important they are.

Before I can commit to working on this, or even looking more into it, I have some questions:

First–how many people are interested in this?
Second–how many people would only run this if it was hosted by someone else?
Third–how many people need to be able to share their decks like they can via ankiweb, rather than by uploading an export somewhere?

(If you don’t know, we already have some user-supplied Anki integrations that are plugins for the desktop. They’re awesome but do have a few limitations that bug me due to having to run on the desktop.)

9 Likes

Interested, can run my own server, don’t share decks

2 Likes

I use iOS and it doesn’t support 3rd party sync servers so this wouldn’t work for me. If it did work, I’m not sure how comfortable I would be entrusting my anki syncing needs to something unproven because it’s important for me to be able to sync whenever I need to.

I wonder if it would be against the rules to have a server somewhere running a headless desktop anki, with beeminder addon of choice.

I think it is. Damien has been asked by folks “Can I just sync a server program just once a day for my personal account?” and he’s said no. I don’t even fault him for it (it isn’t the choice I would make) but he’s already donating so much that I don’t really feel like I can ask for more.

I wonder what his stance on adding third party sync to iOS is, though. I haven’t checked on that.

2 Likes

Would be super interested!

1 Like

I have gotten a good version of anki sync server running on my server, working between desktop and ankidroid.

Do not expect this to go quickly, but I’m pretty excited to track Anki this way.

1 Like

I am continuing to make progress on this. I have been using anki sync server for the past month, and in the last few days I have started writing a plugin. I am not yet sure which are the things I want to add first. I want to make sure I have enough days worth of new cards in a variety of decks, and I want to make sure I’m reviewing to zero.

1 Like

I am very interested to finally see a method for syncing ankidroid directly with beeminder.
keep up the good work. looking forward to use it.

I’m definitely interested in the code for this (the desktop half), but not in using the service itself.

Can I hope to see it on github when it’s ready?

I know I’m interested in (there are probably other things I’d like too that I haven’t thought of too):

  1. how many questions added
  2. how many question-answering sessions done
  3. how many questions ansewred
  4. the tags on all added questions (because this is some information about the “connectedness” of the questions, which is an important part of the process)

If you’re doing this on the desktop, and you have access to the
collection file for the user you care about, you can import it using
anki and get all that information.

It’s already on Github, but please don’t use it to host a service and
run it, unless you’re not going to send any angry users my way. It’s
just not ready yet. https://github.com/adamwolf/anki-sync-server

I think you can answer 1 and 3 pretty easily. 1 is just the total
number of questions, and 3 is the total number of answers in the
revlog. I’m not sure if 2 is actually stored like that. I suppose
you could look at the datetimes of every answer and cluster them?

Could you talk more about 4?

Thanks! I realize if there’s an API I can ‘just’ use that, but copying from other people’s code doing something very similar is often a lot less work :slight_smile:

Re 4: Memory and understanding both entail connecting concepts together, so the more connected the questions are that I enter, the better.

One measure of how successful I am at writing questions that are like that is whether the questions I enter in one session share tags. Another one is just the count of questions I enter in one session (if I just enter one or two, that’s not enough).

Recommended to anybody who hasn’t read it:

http://augmentingcognition.com/ltm.html

I think the biggest issue to getting what you want done is that Anki doesn’t really store card additions in sessions.

I see – I guess a day will function as a session for my purposes though.