All Projects → tsudoko → Anki Sync Server

tsudoko / Anki Sync Server

Licence: agpl-3.0
Self-hosted Anki sync server

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Anki Sync Server

Anki Ultimate Geography
Geography flashcard deck for Anki
Stars: ✭ 330 (-6.25%)
Mutual labels:  anki
Pogo
Server framework for Deno
Stars: ✭ 341 (-3.12%)
Mutual labels:  server
Serve Handler
The foundation of `serve`
Stars: ✭ 349 (-0.85%)
Mutual labels:  server
Jellyfin Kodi
Jellyfin Plugin for Kodi
Stars: ✭ 332 (-5.68%)
Mutual labels:  sync
Summer
这是一个支持分布式和集群的java游戏服务器框架,可用于开发棋牌、回合制等游戏。基于netty实现高性能通讯,支持tcp、http、websocket等协议。支持消息加解密、攻击拦截、黑白名单机制。封装了redis缓存、mysql数据库的连接与使用。轻量级,便于上手。
Stars: ✭ 336 (-4.55%)
Mutual labels:  server
Cellnet
High performance, simple, extensible golang open source network library
Stars: ✭ 3,714 (+955.11%)
Mutual labels:  server
Akarin
Akarin is a powerful (not yet) server software from the 'new dimension'
Stars: ✭ 332 (-5.68%)
Mutual labels:  server
Anki Android
AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
Stars: ✭ 4,425 (+1157.1%)
Mutual labels:  anki
Nock Nock
🚪 Monitor and validate your websites to maintain maximum uptime.
Stars: ✭ 339 (-3.69%)
Mutual labels:  server
Nodejsstarterkit
Starter Kit for Node.js v14.x, minimum dependencies 🚀
Stars: ✭ 348 (-1.14%)
Mutual labels:  server
Pode
Pode is a Cross-Platform PowerShell web framework for creating REST APIs, Web Sites, and TCP/SMTP servers
Stars: ✭ 329 (-6.53%)
Mutual labels:  server
Rojo
Rojo enables Roblox developers to use professional-grade software engineering tools
Stars: ✭ 338 (-3.98%)
Mutual labels:  sync
Iredmail
Full-featured, open source mail server solution for mainstream Linux/BSD distributions.
Stars: ✭ 343 (-2.56%)
Mutual labels:  server
Nodepolus
NodePolus is a JavaScript library containing multiple implementations of the Among Us network protocol.
Stars: ✭ 331 (-5.97%)
Mutual labels:  server
Mscs
Powerful command-line control for UNIX and Linux powered Minecraft servers
Stars: ✭ 347 (-1.42%)
Mutual labels:  server
Gmvault
gmail backup software
Stars: ✭ 3,396 (+864.77%)
Mutual labels:  sync
Hi Nginx
A fast and robust web server and application server for C++,Python,Lua ,Java,quickjs language
Stars: ✭ 346 (-1.7%)
Mutual labels:  server
Mirakurun
A Modern DTV Tuner Server Service for ISDB.
Stars: ✭ 352 (+0%)
Mutual labels:  server
Vespa
The open big data serving engine. https://vespa.ai
Stars: ✭ 3,747 (+964.49%)
Mutual labels:  server
Cppwebframework
​The C++ Web Framework (CWF) is a MVC web framework, Open Source, under MIT License, using C++ with Qt to be used in the development of web applications.
Stars: ✭ 348 (-1.14%)
Mutual labels:  server

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 by David Snopek to support the flashcard functionality on Bibliobird, a web application for language learning.

This version is a fork of jdoe0/ankisyncd. It supports Python 3 and Anki 2.1.

Contents

Installing

  1. Install Anki. The currently supported version range is 2.1.1〜2.1.11, with the exception of 2.1.91. (Keep in mind this range only applies to the Anki used by the server, clients can be as old as 2.0.27 and still work.) Running the server with other versions might work as long as they're not 2.0.x, but things might break, so do it at your own risk. If for some reason you can't get the supported Anki version easily on your system, you can use anki-bundled from this repo:

     $ git submodule update --init
     $ cd anki-bundled
     $ pip install -r requirements.txt
    

    Keep in mind pyaudio, a dependency of Anki, requires development headers for Python 3 and PortAudio to be present before running pip. If you can't or don't want to install these, you can try patching Anki.

  2. Install the dependencies:

     $ pip install webob
    
  3. Modify ankisyncd.conf according to your needs

  4. Create user:

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

     $ python -m ankisyncd
    

  1. 2.1.9 is not supported due to commit 95ccbfdd3679 introducing the dependency on the aqt module, which depends on PyQt5. The server should still work fine if you have PyQt5 installed. This has been fixed in commit a389b8b4a0e2, which is a part of the 2.1.10 release.

Installing (Docker)

Follow these instructions.

Setting up Anki

Anki 2.1

Create a new directory in the add-ons folder (name it something like ankisyncd), create a file named __init__.py containing the code below and put it in the ankisyncd directory.

import anki.sync, anki.hooks, aqt

addr = "http://127.0.0.1:27701/" # put your server address here
anki.sync.SYNC_BASE = "%s" + addr
def resetHostNum():
    aqt.mw.pm.profile['hostNum'] = None
anki.hooks.addHook("profileLoaded", resetHostNum)

Anki 2.0

Create a file (name it something like ankisyncd.py) containing the code below and put it in ~/Anki/addons.

import anki.sync

addr = "http://127.0.0.1:27701/" # put your server address here
anki.sync.SYNC_BASE = addr
anki.sync.SYNC_MEDIA_BASE = addr + "msync/"

AnkiDroid

Advanced → Custom sync server

Unless you have set up a reverse proxy to handle encrypted connections, use http as the protocol. The port will be either the default, 27701, or whatever you have specified in ankisyncd.conf (or, if using a reverse proxy, whatever port you configured to accept the front-end connection).

Do not use trailing slashes.

Even though the AnkiDroid interface will request an email address, this is not required; it will simply be the username you configured with ankisyncctl.py adduser.

Running ankisyncd without pyaudio

ankisyncd doesn't use the audio recording feature of Anki, so if you don't want to install PortAudio, you can edit some files in the anki-bundled directory to exclude pyaudio:

Anki ≥2.1.9

Just remove "pyaudio" from requirements.txt and you're done. This change has been introduced in commit ca710ab3f1c1.

Older versions

First go to anki-bundled, then follow one of the instructions below. They all do the same thing, you can pick whichever one you're most comfortable with.

Manual version: remove every line past "# Packaged commands" in anki/sound.py, remove every line starting with "pyaudio" in requirements.txt

ed version:

$ echo '/# Packaged commands/,$d;w' | tr ';' '\n' | ed anki/sound.py
$ echo '/^pyaudio/d;w' | tr ';' '\n' | ed requirements.txt

sed -i version:

$ sed -i '/# Packaged commands/,$d' anki/sound.py
$ sed -i '/^pyaudio/d' requirements.txt

ENVVAR configuration overrides

Configuration values can be set via environment variables using ANKISYNCD_ prepended to the uppercase form of the configuration value. E.g. the environment variable, ANKISYNCD_AUTH_DB_PATH will set the configuration value auth_db_path

Environment variables override the values set in the ankisyncd.conf.

Support for other database backends

sqlite3 is used by default for user data, authentication and session persistence.

ankisyncd supports loading classes defined via config that manage most persistence requirements (the media DB and files are being worked on). All that is required is to extend one of the existing manager classes and then reference those classes in the config file. See ankisyncd.conf for example config.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].