Commit Graph

  • 8b9961febc Prefer anki-bundled if it exists flan 2018-08-20 14:44:29 +02:00
  • c3024ba396 Make the server runnable with python3 -m ankisyncd flan 2018-08-20 14:42:40 +02:00
  • 82d7126425 Use cwd in ankisyncctl.py for now flan 2018-08-20 04:03:39 +02:00
  • 7ace256e0a Check for protocol version before proceeding flan 2017-11-09 15:56:25 +01:00
  • de7b6ec22f Remove redundant try/catch block around os.makedirs() flan 2017-11-08 13:49:28 +01:00
  • aae65cc5d8 Remove redundant else blocks flan 2017-11-08 13:23:48 +01:00
  • c0ea23c307 Monkey patch anki at runtime flan 2017-11-06 22:50:44 +01:00
  • 2a27d78591 Use config specified in argv[1] flan 2017-11-06 20:00:24 +01:00
  • 59f28faa1e Use mapping protocol access instead of legacy configparser API flan 2017-11-06 19:33:27 +01:00
  • 354354ca72 Make built-in server actually use the "host" config field flan 2017-11-06 17:35:29 +01:00
  • ca106e6136 Clean up imports flan 2017-11-06 17:21:17 +01:00
  • 7d1a222501 Remove redundant except block flan 2017-11-06 17:06:45 +01:00
  • e97a11edb4 Make spacing more consistent flan 2017-11-06 16:56:13 +01:00
  • 9ffd380e64 Make it possible to use hooks before and after every sync operation flan 2017-11-05 23:34:23 +01:00
  • 65bef264be Use int instead of str for the response code flan 2017-11-05 22:17:30 +01:00
  • 978b1d7371 Make _check_zip_data() and _adopt_media_changes_from_zip() take a ZipFile flan 2017-11-04 18:16:39 +01:00
  • 0e5bbf4f9e Use more with statements flan 2017-11-04 18:07:50 +01:00
  • 1677ed38b9 Update comment flan 2017-11-04 17:39:37 +01:00
  • af8548182b Shorten MockServerConnection.post() flan 2017-11-04 17:38:29 +01:00
  • c9c02d3253 Resolve relative paths and symlinks before opening auth/session DB flan 2017-11-04 04:21:59 +01:00
  • 024e76423d Explicitly convert str and bytes where needed flan 2017-11-04 04:11:48 +01:00
  • 5aff76fee7 Update mock server flan 2017-11-04 03:33:08 +01:00
  • 3d6a2a639a Remove explicit inherits from object flan 2017-11-04 02:38:17 +01:00
  • 95eadafb9b Update anki to 7b1747d6504c9091a34793cebaa559b9fb6968df flan 2017-11-04 02:28:14 +01:00
  • 32b82d5803 Fix up some changes made by 2to3 flan 2017-11-04 02:15:40 +01:00
  • 0cc21101d7 2to3 everything flan 2017-11-04 02:06:42 +01:00
  • c08fb74d91 Enable logging flan 2017-11-04 01:53:44 +01:00
  • d4f7c87fb4 Remove debug prints flan 2017-11-04 01:44:49 +01:00
  • ec83527fa4 Remove unused function flan 2017-11-04 01:41:45 +01:00
  • f5050582ba Remove unnecessary class from helpers.server_utils flan 2017-11-04 00:47:34 +01:00
  • a48ad44a65 Remove unnecessary class from helpers.file_utils flan 2017-11-04 00:22:09 +01:00
  • e959d8745a Place all files in a single directory when testing user managers flan 2017-11-03 02:48:49 +01:00
  • 9451d4df95 Remove redundant Response wraps flan 2017-11-03 02:18:28 +01:00
  • 5ec0dd7418 Remove redundant json.dumps() calls flan 2017-11-03 01:49:18 +01:00
  • 2ca7c596e3 Run msync handlers the same way as sync ones flan 2017-11-03 01:46:38 +01:00
  • d2bbb7150c Remove unused vars flan 2017-11-03 01:40:39 +01:00
  • 8e13c92b6e Use less from imports flan 2017-11-03 00:20:24 +01:00
  • c1b88c24f9 Make JSON check less lame flan 2017-11-02 23:56:48 +01:00
  • 910e557776 Rename username2dirname() to userdir() flan 2017-11-02 19:32:10 +01:00
  • 33868f013d Don't assume a non-SyncCollectionHandler operation is handled by SyncMediaHandler flan 2017-11-02 19:01:53 +01:00
  • a52c213088 Make operation_download() and operation_hostKey() return response body flan 2017-11-02 18:40:26 +01:00
  • 6e84242cc5 Use logging.warn() instead of print() for the auth warning flan 2017-11-01 19:56:38 +01:00
  • 17331136ca Use print functions everywhere flan 2017-11-01 19:48:35 +01:00
  • cb18fcb04a Move old_client() outside classes flan 2017-11-01 19:47:22 +01:00
  • a7e29c56f4 Patch anki using git apply flan 2017-11-01 18:29:39 +01:00
  • bf02a98a93 Update test_meta() for Anki >=2.0.27 flan 2017-11-01 18:12:38 +01:00
  • 97382f3eb8 Fix check for AnkiDroid 2.3 flan 2017-11-01 18:06:13 +01:00
  • e1f7c422df Show failing versions when testing _old_client() flan 2017-11-01 17:45:16 +01:00
  • 85c9b85c1f Make _old_client() support alphas/betas flan 2017-11-01 17:43:47 +01:00
  • 2dc1f28b04 Move version checks to a separate function, add test flan 2017-11-01 16:41:41 +01:00
  • 8195e58e3b Make parts of SyncUserSession more readable flan 2017-11-01 15:36:31 +01:00
  • bdcbb9eced Note which commit motivated creation of test_login() flan 2017-11-01 04:35:02 +01:00
  • 6617398921 Don't hardcode location of sqldiff flan 2017-11-01 04:06:06 +01:00
  • ce3aa4a685 Make DB utils more general flan 2017-11-01 04:04:48 +01:00
  • 55bdbfacaa Remove unused lines flan 2017-10-30 19:56:17 +01:00
  • 39f3ee110d Make test file names follow a single convention flan 2017-10-30 19:28:29 +01:00
  • 765cce3d74 Move hostKey handling to a separate function flan 2017-10-30 19:23:32 +01:00
  • ce6433b9ba Add functional tests for authentication flan 2017-10-30 19:16:06 +01:00
  • 3792c89ecb Fix authentication flan 2017-10-29 19:29:46 +01:00
  • 3f3e2f4df4 Fix inconsistent indentation of README code blocks flan 2017-10-29 04:29:44 +01:00
  • bf1bf4de72 Add some context from upstream README flan 2017-10-29 04:21:22 +01:00
  • 6154cfde62 Don't leave an empty directory in cwd after running tests flan 2017-10-28 23:40:42 +02:00
  • e464592a57 Add gitignore flan 2017-10-28 23:18:18 +02:00
  • c805468449 Refactor ankiserverctl.py to delegate database operations to SqliteUserManager and use python3 compatible print calls. Christoph Mack 2016-05-27 21:42:52 +02:00
  • c7d7ff3e85 Merge SyncApp's SqliteUserManager and the newly introduced UserManager and group all user managers in user_managers.py. Christoph Mack 2016-05-27 21:33:22 +02:00
  • 573aeece81 Add more test helpers and integration tests for SyncApp's media sync feature using WebTest's TestApp. Add test helpers for creating, inspecting and manipulating instances of SyncApp and RestApp. Add subclasses of Anki's RemoteServer and RemoteMediaServer for communicating with the wrapped SyncApp instance under test. Add helpers for monkey patching Anki's MediaManager and DB for easier testing. Add test assets directory. Christoph Mack 2016-02-29 09:56:28 +01:00
  • cb574aa0a7 Add test helper classes for creating and managing temporary files, working with anki collections and sqlite dbs. Add class for managing users so users can be added programmatically without using ankiserverctl. Christoph Mack 2016-02-05 22:40:39 +01:00
  • 28e950c138 Added unit tests for SimpleUserManager, SqliteUserManagerTest, SimpleSessionManager and SqliteSessionManagerTest. Christoph Mack 2015-10-05 19:41:00 +02:00
  • 6e881bfb85 Added unit test for SyncCollectionHandler. Moved CollectionTestBase to a separate file. Christoph Mack 2015-10-05 19:21:38 +02:00
  • 99adc658d5 Remove support for legacy modules flan 2017-10-28 20:43:09 +02:00
  • 86b63d51b5 Remove superfluous/outdated instructions flan 2017-10-28 20:40:32 +02:00
  • 2cb5871ba3 Safer handling of uploaded database files during full sync. Before overwriting its version of a user's collection database file with one uploaded by the client, the server now performs a basic integrity check using SQLite's 'pragma integrity_check'. Christoph Mack 2015-10-08 21:41:04 +02:00
  • f3788fc2c8 fix syntax error causing failure in error handler in SyncMediaHandler._remove_media_files() Christoph Mack 2016-08-02 19:34:17 +02:00
  • 67830218eb Drop support for Anki <2.0.27 flan 2017-03-05 00:39:06 +01:00
  • b0cb424770 Use os.path.join() for path concatenation flan 2017-10-28 19:02:07 +02:00
  • ceb931519d Bring back authentication flan 2017-10-28 18:37:37 +02:00
  • 48cfa9a029 Remove unused lines flan 2017-10-28 18:14:05 +02:00
  • 4a9ee4d40c Rewrite command handling flan 2017-10-28 17:54:58 +02:00
  • 91b5a6e052 Remove redundant messages flan 2017-10-28 17:50:38 +02:00
  • 098c9dff4a Use user-prefixed data directory by default flan 2017-10-28 17:34:16 +02:00
  • 16d8bd9b78 Drop service management from ankisyncctl flan 2017-10-28 17:04:24 +02:00
  • bd2c5bdff9 Remove SSL support flan 2017-10-28 05:50:18 +02:00
  • c398ccdb89 Apply @ndl's patches jdoe0 2016-11-03 21:44:40 +07:00
  • 1678890d3d Add SSL support jdoe0 2016-06-25 23:59:59 +07:00
  • e093e3981e Update README.md jdoe0 2016-04-05 23:30:30 +07:00
  • e32bceccf3 Not only add, but also remove files when adopting changes to client media files in SyncMediaHandler.uploadChanges(). Count added and removed files as processed and increment media usn accodingly. Refactor SyncMediaHandler.uploadChanges(). Christoph Mack 2016-01-24 13:21:00 +01:00
  • 87ee726d25 Define skey once when creating user session, not each time when beginning media sync. Christoph Mack 2016-01-22 23:27:32 +01:00
  • 1b1a3d8e22 Define a random skey to return to the client when media syncing begins, so we don't send a null skey value. Christoph Mack 2016-01-22 08:34:10 +01:00
  • f03aea67c1 SyncMediaHandler.begin(): return media database usn instead of collection database usn. If the wrong usn is returned, media syncing on the client will not finish with status "noChanges" even if there have been no changes since the last media sync. Christoph Mack 2016-01-19 11:20:37 +01:00
  • 3baad9cfac Fix syncing with AnkiDroid jdoe0 2015-11-29 11:53:58 +07:00
  • d3eab4266e Update addon code in README.md jdoe0 2015-11-27 12:27:07 +07:00
  • dfe62472a1 Update config file jdoe0 2015-11-27 12:25:37 +07:00
  • ab40509cb2 Add missing function _execute_handler_method_in_thread() jdoe0 2015-11-27 10:42:38 +07:00
  • 8066fba1fe Update for Anki >= 2.0.27 jdoe0 2015-11-19 13:20:41 +07:00
  • 40d515234e Update README.md jdoe0 2014-07-22 20:29:02 +07:00
  • 07ed4dfb75 ankisyncd.sh: Disable python version check jdoe0 2014-01-18 01:40:43 +07:00
  • 8c3a53c3f4 ankisyncd.sh: Look for 'python2' before checking the version of 'python' jdoe0 2014-01-10 19:34:12 +07:00
  • 0311e25574 Collection.media.illegal() was renamed to Collection.media.hasIllegal() in Anki 2.0.12. David Snopek 2013-12-31 20:21:38 +00:00
  • f210f728ea Updated the bundled Anki 2.0.20 and made some fixes for that version. Fixes #9. David Snopek 2013-12-31 20:06:31 +00:00
  • 525652dad0 Renamed config file to ankisyncd.conf jdoe0 2014-01-04 20:06:14 +07:00