软件版本:
Windows:2.1.15
Android:2.9.5
服务器设置
// 换源
yum -y install https://centos7.iuscommunity.org/ius-release.rpm //ius第三方源
yum makecache
// 安装python
yum install python36u
yum -y install python36u-pip
yum -y install python36u-devel
// 安装git
yum install git
git clone https://github.com/tsudoko/anki-sync-server.git
cd anki-sync-server
git submodule update --init
cd anki-bundled
pip3.6 install -r requirements.txt
echo '/# Packaged commands/,$d;w' | tr ';' '\n' | ed anki/sound.py
echo '/^pyaudio/d;w' | tr ';' '\n' | ed requirements.txt
pip3.6 install webob
pip3.6 install -r requirements.txt
cd ..
客户端设置
windows客户端
在目录C:\Users\Jayce\AppData\Roaming\Anki2\addons21
下新建文件夹1551286908
在此目录下新建python文件__init__.py
内容如下:(ip需要修改为自己的)
import anki.sync, anki.hooks, aqt
addr = "http://192.168.0.102: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)