Go to file
flan a48ad44a65 Remove unnecessary class from helpers.file_utils
A class which keeps track of temporary files and removes them
automatically when they're not needed anymore might be a good idea,
but this implementation didn't remove files in some cases. Adding
unrelated methods that could as well be just standalone functions
is bad design, too.

In this case, it's better to just get rid of it altogether instead
of fixing it, since Python 3 has a TemporaryDirectory class, which
can be used for the same purpose and is definitely more
battle-tested.
2017-11-04 00:24:34 +01:00
anki-bundled@499b02281b Apply @ndl's patches 2016-11-03 22:32:19 +07:00
ankisyncd Remove redundant Response wraps 2017-11-03 02:18:28 +01:00
tests Remove unnecessary class from helpers.file_utils 2017-11-04 00:24:34 +01:00
.gitignore Add gitignore 2017-10-28 23:18:18 +02:00
.gitmodules Apply @ndl's patches 2016-11-03 22:32:19 +07:00
ankisyncctl.py Refactor ankiserverctl.py to delegate database operations to SqliteUserManager and use python3 compatible print calls. 2017-10-28 23:13:46 +02:00
ankisyncd.conf Bring back authentication 2017-10-28 19:55:40 +02:00
COPYING Renamed LICENSE.txt to COPYING 2013-10-13 16:10:00 -05:00
libanki.patch Patch anki using git apply 2017-11-01 18:42:43 +01:00
README.md Patch anki using git apply 2017-11-01 18:42:43 +01:00

ankisyncd

Anki is a powerful open source flashcard application, which helps you quickly and easily memorize facts over the long term utilizing a spaced repetition algorithm. Anki's main form is a desktop application (for Windows, Linux and macOS) which can sync to a web version (AnkiWeb) and mobile versions for Android and iOS.

This is a personal Anki server, which you can sync against instead of AnkiWeb. It was originally developed to support the flashcard functionality on Bibliobird, a web application for language learning.

This version has been modified from dsnopek's Anki Sync Server to remove the REST API, which makes it possible to drop some dependencies.

Installing

  1. Install the dependencies:

     $ pip install webob
    
  2. Patch the bundled libanki:

     $ (cd anki-bundled && git apply ../libanki.patch)
    
  3. Modify ankisyncd.conf according to your needs

  4. Create user:

     $ ./ankisyncctl.py adduser <username>
    
  5. Run ankisyncd:

     $ python ./ankisyncd/sync_app.py
    

Setting up Anki

To make Anki use ankisyncd as its sync server, create a file (name it something like ankisyncd.py) containing the code below and put it in ~/Anki/addons.

import anki.sync

anki.sync.SYNC_BASE = 'http://127.0.0.1:27701/'
anki.sync.SYNC_MEDIA_BASE = 'http://127.0.0.1:27701/msync/'

Replace 127.0.0.1 with the IP address or the domain name of your server if ankisyncd is not running on the same machine as Anki.