Damien Elmes
c16cb6ee9b
fix more bugs in group count tree
2011-10-24 01:28:43 +09:00
Damien Elmes
8be318d749
when removing a group should ensure there's an active one left
2011-10-23 06:08:57 +09:00
Damien Elmes
1ce5a7552e
ensure top level properties updated on rename
2011-10-23 05:45:15 +09:00
Damien Elmes
f37f4aff96
need to sort tree based on split components, not string order
2011-10-22 21:14:46 +09:00
Damien Elmes
716684edae
make sure to save on group delete
2011-10-22 21:04:57 +09:00
Damien Elmes
b9dc5764a3
add group renaming
2011-10-22 20:41:33 +09:00
Damien Elmes
3068e79b42
Merge branch 'new'
2011-10-22 18:39:08 +09:00
Damien Elmes
ae839dd3a3
group deletion should be recursive; fix css in import
2011-10-22 10:04:32 +09:00
Damien Elmes
b31bd5c091
vacuum after import; make sure models.current() always returns
2011-10-22 07:39:13 +09:00
Damien Elmes
1772474765
make sure we record the prefix before changing filename
2011-10-22 04:46:21 +09:00
Damien Elmes
5ac6cc7a36
don't die if deck has no media folder
2011-10-22 04:33:49 +09:00
Damien Elmes
bbe2973952
add newly created clozes too
2011-10-22 03:58:54 +09:00
Damien Elmes
46dd863f3c
convert genCards() to bulk update; drop random
2011-10-22 03:39:34 +09:00
Damien Elmes
852189808f
catch attempts to save a fact that deletes a cloze card
2011-10-22 03:10:34 +09:00
Damien Elmes
a4e8eb8b74
cache required fields, drop emptyAns
...
For importing and the deck creation wizard, we need to be able to generate
thousands of cards efficiently. So instead of requiring the creation of a fact
and rendering it, we cache the required fields and cloze references in the
model.
Also, emptyAns is dropped, as people can achieve the same behaviour by adding
the required answer fields as conditional to the question.
Todo: refactor genCards() to work in bulk, handle cloze edits intelligently
(prompt to delete invalid references, create new cards as necessary)
2011-10-22 02:28:57 +09:00
Damien Elmes
8bb26aaf74
add the ability to skip cards for shared decks
2011-10-22 00:05:09 +09:00
Damien Elmes
4539ca2b73
import each anki1 deck as its basename
2011-10-22 00:02:28 +09:00
Damien Elmes
119217290e
implement anki1 importer
2011-10-21 23:45:42 +09:00
Damien Elmes
b242b06052
import media too
2011-10-21 07:53:22 +09:00
Damien Elmes
83f8ef45ff
anki2 importing and reorganize import code
2011-10-21 07:36:44 +09:00
Damien Elmes
1ba75e8dc9
don't need a separate migration package; the rest is std import
2011-10-20 22:18:55 +09:00
Damien Elmes
76960abd75
fix upgrading; drop old mnemosyne 1 importer
2011-10-20 22:05:34 +09:00
Damien Elmes
cf4abcb403
split upgrade code into separate file; use .anki2 now
2011-10-20 05:26:50 +09:00
Damien Elmes
050afa57ad
make sure consecutive syncs don't do anything; check server removal
2011-10-06 15:54:55 +09:00
Damien Elmes
0c85acf3f7
refactor to support early exit when no media changes
...
- regular sync now receives a media USN as well
- server bumps media usn not only on sync but any other media change
- added local media.hasChanged()
2011-10-06 15:34:22 +09:00
Damien Elmes
dd37ee5915
syncing same file twice should work
2011-10-06 14:47:22 +09:00
Damien Elmes
afe1ad2b0b
add resync test, fix zip meta
2011-10-06 14:37:07 +09:00
Damien Elmes
b4fdf1c690
send 'continue' for multiple zips; test splitting
2011-10-06 13:51:44 +09:00
Damien Elmes
8c1f397459
ensure successive calls work
2011-10-06 13:25:01 +09:00
Damien Elmes
0a52f55e50
test removing too
2011-10-06 13:06:32 +09:00
Damien Elmes
4b710b5a87
use sha1 everywhere; the speed differences are negligible
2011-10-03 14:58:01 +09:00
Damien Elmes
eca6ef204f
check file is added on remote test
2011-10-03 13:42:53 +09:00
Damien Elmes
866fe8a283
don't sync mod time; media conflicts are very unlikely
2011-10-03 13:33:55 +09:00
Damien Elmes
49181ee738
fix media zipping and addFiles call
2011-10-03 12:59:35 +09:00
Damien Elmes
5da3bba1df
initial work on media syncing
2011-10-03 12:45:08 +09:00
Damien Elmes
a8d2578be5
move common auth+upload code into base class
2011-10-01 22:16:56 +09:00
Damien Elmes
bf3bb9dd32
if sync server offline, abort sync tests
2011-10-01 20:44:35 +09:00
Damien Elmes
f131021c7e
remote partial syncing working; fixed mod time on finish()
2011-10-01 14:24:39 +09:00
Damien Elmes
dd5b2056fb
factor out file uploads; use for incremental sync too
2011-09-30 21:09:10 +09:00
Damien Elmes
20d753591d
add timestamp & common error checks to meta(); kill old code
2011-09-29 22:18:36 +09:00
Damien Elmes
aabc884341
start work on remote syncing; full up/down implemented
2011-09-29 20:58:42 +09:00
Damien Elmes
9b8e949a72
add db timeout
2011-09-29 15:57:29 +09:00
Damien Elmes
40e9eea43f
fix update cutoff call
2011-09-29 04:01:11 +09:00
Damien Elmes
2a73d58532
make close() idempotent; add isEmpty()
2011-09-26 08:06:13 +09:00
Damien Elmes
22df2790f9
refactor media change logging
2011-09-25 06:33:57 +09:00
Damien Elmes
9fdfac722d
fixed bug in bundling
2011-09-24 14:46:42 +09:00
Damien Elmes
667b89ecc5
support partial syncs of arbitrary size
...
The full sync threshold was a hack to ensure we synced the deck in a
memory-efficient way if there was a lot of data to send. The problem is that
it's not easy for the user to predict how many changes there are, and so it
might come as a surprise to them when a sync suddenly switches to a full sync.
In order to be able to send changes in chunks rather than all at once, some
changes had to be made:
- Clients now set usn=-1 when they modify an object, which allows us to
distinguish between objects that have been modified on the server, and ones
that have been modified on the client. If we don't do this, we would have to
buffer the local changes in a temporary location before adding the server
changes.
- Before a client sends the objects to the server, it changes the usn to
maxUsn both in the payload and the local storage.
- We do deletions at the start
- To determine which card or fact is newer, we have to fetch the modification
time of the local version. We do this in batches rather than try to load the
entire list in memory.
2011-09-24 12:42:02 +09:00
Damien Elmes
e8f1cecd81
don't allow loading of decks created with future versions
2011-09-24 07:30:34 +09:00
Damien Elmes
699839188b
ensure we give correct intervals for new cards
2011-09-23 14:55:20 +09:00
Damien Elmes
001a69db43
make sure we update the rep count on pass/fail, and add unit test
2011-09-23 12:52:38 +09:00