Commit graph

386 commits

Author SHA1 Message Date
Damien Elmes
29e93f8c1d make sure we update guid in note object too 2012-10-27 21:11:16 +09:00
Damien Elmes
bd1c6d4395 more robust anki1 upgrading & anki2 importing
- base the 2.0 model id on the 1.2 one so we don't get new models each time we
  reimport the file
- when determining if we can reuse an existing note, it must have the same
  model id, and the model must have the same schema
- make sure we check templates when determining schema
- if schema has diverged, note needs new guid
2012-10-27 20:55:08 +09:00
Damien Elmes
99c238ae39 fix unit tests 2012-10-26 02:11:08 +09:00
Damien Elmes
bc896c21c9 fix unit test, add ordinals to db 2012-10-25 00:42:10 +09:00
Damien Elmes
b5c72155a3 work around invalid 1.2 decks with multiple templates sharing same ord 2012-10-24 13:11:18 +09:00
Damien Elmes
fb06966398 fix csv test 2012-10-23 22:27:07 +09:00
Damien Elmes
133d4c2e8e unbury cards when returning to deck list 2012-10-23 19:48:35 +09:00
Damien Elmes
eb7240d220 allow duplicates in import 2012-10-23 17:52:55 +09:00
Damien Elmes
0c1e98d0b2 fix cloze test 2012-10-23 17:52:48 +09:00
Damien Elmes
e3da64f00b don't clobber tags if they're not mapped 2012-09-21 15:51:45 +09:00
Damien Elmes
f2fffce6d1 handle conflicts in apkg import as well 2012-09-21 15:42:30 +09:00
Damien Elmes
f13acf8c68 handle file name conflicts in media on .anki2 import 2012-09-21 15:25:52 +09:00
Damien Elmes
267b7b0035 fix unit test 2012-09-10 23:53:00 +09:00
Damien Elmes
b436c46b18 fix unit test 2012-09-09 06:32:03 +09:00
Damien Elmes
fa4f26e560 is:learn should match relearning cards too - filter on queue, not type 2012-09-03 03:20:12 +09:00
Damien Elmes
8aaff17ccf when exporting without scheduling, revert decks to default conf 2012-08-25 16:09:49 +09:00
Damien Elmes
875342e141 space buttons by at least a day
when a card has a low interval like 1, you can end up with next times of
2,2,3, which some users think is a bug. change the code to yield 2,3,4
instead.
2012-07-28 12:47:25 +09:00
Damien Elmes
779bcbef39 ensure crt synced 2012-07-18 11:19:30 +09:00
Damien Elmes
2616e95348 don't delete old revlog entries when cards deleted 2012-07-11 10:35:17 +09:00
Damien Elmes
57a9668350 fix cloze->basic model changing 2012-07-05 05:39:25 +09:00
Damien Elmes
7aa9691334 unit test update pending more info from hume 2012-07-05 04:37:26 +09:00
Damien Elmes
52ae784a65 don't throw error when learning card answered with no steps 2012-07-04 22:58:49 +09:00
Damien Elmes
c3aed57df5 silently ignore attempt to delete default deck
users can nest the default deck, so we don't want to throw an error when they
delete a top level deck which the default deck happens to be under
2012-07-04 19:42:24 +09:00
Damien Elmes
ce83001be6 treat 'not' as a normal search string 2012-06-20 09:37:56 +09:00
Damien Elmes
07ae142781 we don't automatically delete anymore, so update unit test 2012-06-19 16:35:56 +09:00
Damien Elmes
72102063bf add failing lapse test 2012-06-08 14:10:11 +09:00
Damien Elmes
bc36aace81 update test 2012-06-03 20:24:57 +09:00
Damien Elmes
315838a56b fix answer buttons on review card 2012-05-27 13:14:58 +09:00
Damien Elmes
c27cc17762 findDupes() and findNotes() 2012-05-27 00:12:26 +09:00
Damien Elmes
1e5e574721 add search for added time 2012-05-26 14:50:45 +09:00
Damien Elmes
d25e2453a6 catch invalid grouping 2012-05-26 13:00:01 +09:00
Damien Elmes
e20a98d9be fix from kostas 2012-05-25 16:25:22 +09:00
Damien Elmes
0ad8d82961 fix cloze unit test 2012-05-25 11:06:31 +09:00
Damien Elmes
17095ae1fb switch args in rated: search; make ease optional 2012-05-25 11:05:02 +09:00
Damien Elmes
fa5fca5941 don't touch due cards either 2012-05-24 18:02:32 +09:00
Damien Elmes
ec1a4f7458 even if failed 2012-05-24 17:51:49 +09:00
Damien Elmes
e3bb4a817e and undue cards have untouched ivl 2012-05-24 17:35:27 +09:00
Damien Elmes
455796f189 when rescheduling off, graduating cards get reset to new 2012-05-24 17:12:12 +09:00
Damien Elmes
d6bce7c873 start on filter/cram updates, deck:filtered
- cram decks no longer pull cards from other cram decks, as tests like is:due
  don't make sense on crammed decks
- cram decks now default to not overriding the original deck's steps
- remove obsolote dyn_failed sort order - have to fix this in upgrade
- search/limit/order properties have been merged into a list, in case we may
  want to support multiple queries in the future (eg 10 cards from tag A, 20
  cards from tag B)
- added a resched option to disable boosting/failure - not yet implemented
- added an unused flag to allow cards to persist in the cram deck after
  graduation. implementing this will take some work and won't come in 2.0
- instead of is:filtereddeck, use deck:filtered
2012-05-24 13:38:58 +09:00
Damien Elmes
942beef5de allow != in properties 2012-05-23 23:07:23 +09:00
Damien Elmes
b63ac7e80d turn off not after application 2012-05-23 20:54:03 +09:00
Damien Elmes
6af7f6e846 improved finding
- new per-character tokenizer that is easier to read and maintain
- OR searches now supported
- grouping with ( and ) now supported
- sorting is off by default now
- searching in html is disabled for now, but may come back later
- use ? arguments instead of named arguments to ease porting to other
  platforms
- field:foo is no longer wrapped in implicit wildcards
- avoid joining notes table if it not required - about 30% faster
- fixed sql injection bug in findNids()
- commands no longer have to take care of negation themselves
- commands can return nothing to immediately flag the query as invalid
2012-05-23 20:21:47 +09:00
Damien Elmes
ef4ff86f8c support searches for particular ratings 2012-05-23 14:39:30 +09:00
Damien Elmes
3755a8f82d support matches on card properties 2012-05-23 14:18:44 +09:00
Damien Elmes
5cb858b02d unittest: cards in learning are imported with 1 step left 2012-05-23 13:19:20 +09:00
Damien Elmes
bc2112a127 fix availOrds() when conditional expressions have extra text 2012-05-23 08:03:03 +09:00
Damien Elmes
28b5a108f6 wildcard deck searches 2012-05-21 11:45:24 +09:00
Damien Elmes
a8513a679a fix some unittest issues thanks to kostas 2012-05-21 08:47:00 +09:00
Damien Elmes
b6bdd4aa21 daily learning queue
The way we were handling 1 day+ learning intervals was not great - they'd show
up at the start of a new day before normal reviews, meaning the hardest cards
came first. In previous Anki versions we deliberately sorted the queue in the
opposite order to prevent that. When relearning the cards the next day, if you
failed a card and expected to see it in 10 minutes that wouldn't happen
either, as all the overdue cards took precedence.

To fix this, we put cards that are due tomorrow or later into a separate queue
(queue 3), and pull cards from that queue only after the reviews are done. In
the future it might also be nice to move overdue learning cards into that
queue automatically at the start of a session.
2012-05-20 16:56:14 +09:00
Damien Elmes
32fde2a072 encode daily steps in left
When a user has learning steps that extend past the daily cutoff, we end up
counting them all instead of only the ones that would be done today. In order
to avoid this without expensive calculations or db schema changes, we
calculate the number of steps until the daily cutoff and pack it into the left
column, as totalLeft + leftToday*1000.
2012-05-20 16:05:50 +09:00