Squashed commit of the following:

commit cb509e8f75e3dcdbc66327be4bfbf6661aa084b5
Author: David Snopek <dsnopek@gmail.com>
Date:   Fri Jul 12 22:06:28 2013 +0100

    Cut down 'import' statements to only modules actually used.

commit 0ea255115e095e31af5a991e9cce2b5b15cb496d
Author: David Snopek <dsnopek@gmail.com>
Date:   Fri Jul 12 22:00:06 2013 +0100

     * Add getCollectionManager() so that the whole process can share the same ThreadingCollectionManager object.

     * Got the RestApp actually working!

commit 00997bab600b13d4b430ed2c2839b1d2232f55ed
Author: David Snopek <dsnopek@gmail.com>
Date:   Fri Jul 12 21:04:58 2013 +0100

    Got the sync_app working again (more or less)

commit 459c69566bb92d2c0195a384e067d98c059bdea7
Author: David Snopek <dsnopek@gmail.com>
Date:   Fri Jul 12 19:47:40 2013 +0100

    Started implementing test for the RESTful callbacks that PrepECN is going to need.

commit 7ffbac793f9bf45ab9056c1de475422b8742e107
Author: David Snopek <dsnopek@gmail.com>
Date:   Fri Jul 12 17:19:06 2013 +0100

    Started work on a WSGI app for RESTful access to Anki based on Bibliobird code here:

      https://raw.github.com/dsnopek/bbcom/master/AnkiServer/AnkiServer/deck.py

commit 8820411388ce0c2b7b14769c614c22c675d2dbdd
Author: David Snopek <dsnopek@gmail.com>
Date:   Fri Jul 12 15:03:56 2013 +0100

     * Seperated the collection and threading code.

     * Implemented a new interface to interact with the collections, which will hopefully be more transparent and testable.
This commit is contained in:
David Snopek
2013-07-12 22:08:16 +01:00
parent 661662400f
commit e25cf25684
12 changed files with 597 additions and 202 deletions

View File

@@ -12,26 +12,30 @@ Instructions for installing and running AnkiServer:
the dependencies we need there:
$ virtualenv AnkiServer.env
$ AnkiServer.env/bin/easy_install webob PasteDeploy PasteScript sqlalchemy simplejson MySQL-python
$ AnkiServer.env/bin/easy_install webob PasteDeploy PasteScript sqlalchemy simplejson
3. Download and install libanki. You can find the latest release of Anki here:
http://code.google.com/p/anki/downloads/list
Look for a *.tgz file with a Summary of "Anki Source". At the time of this writing
that is anki-1.0.1.tgz.
that is anki-2.0.11.tgz.
Download this file and extract. Inside you will find a libanki/ directory with a
setup.py. You will want to run setup.py with the python executable inside our virtualenv,
or AnkiServer.env/bin/python, like so:
Download this file and extract.
Then either:
anki-1.0.1/libanki$ ../../AnkiServer.env/bin/python setup.py install
a. Run the 'make install', or
b. Copy the entire directory to /usr/share/anki
4. Make the egg info files (so paster can see our app):
$ AnkiServer.env/bin/python setup.py egg_info
5. Then we can run AnkiServer like so:
5. Copy the example.ini to production.ini and edit for your needs.
6. Then we can run AnkiServer like so:
$ AnkiServer.env/bin/paster serve development.ini