Commit graph

718 commits

Author SHA1 Message Date
Damien Elmes
2967819882 fix fid queries 2010-10-29 19:41:40 +09:00
Damien Elmes
621d11a6da don't generate cards if the question is blank, again 2010-10-29 01:05:33 +09:00
Damien Elmes
7e6f4907b0 make sure we don't count/grab cards multiple times 2010-10-28 20:33:19 +09:00
Damien Elmes
46ba2db87a use new field cache so we can ignore html in std search 2010-10-27 21:22:29 +09:00
Damien Elmes
731c4100f9 wrap the remaining really long lines 2010-10-27 21:06:45 +09:00
Damien Elmes
4cce768c70 update search code for new scheduler 2010-10-27 21:03:48 +09:00
Damien Elmes
8c7322c974 merge marcus' searching code 2010-10-27 20:54:42 +09:00
Damien Elmes
8ce0ff5b8b add a field cache for searching without html 2010-10-27 19:00:49 +09:00
Damien Elmes
9f9841cb22 use a join instead of a subquery as sqlite can optimize it better 2010-10-26 20:21:59 +09:00
Damien Elmes
c50b7e61cb new indices, make sure to set type when reviewing early
- new type, combinedDue for failed cards & count checks
- only reset() on deck load if not already done
- remove isDue from dynamic indices but leave old ones around for now
2010-10-26 20:10:05 +09:00
Damien Elmes
5bc7c390a0 make sure to respect failed card timing, fix default hard times 2010-10-26 11:46:35 +09:00
Damien Elmes
27b7ccb41f set deck vars before updating the cutoff 2010-10-25 15:46:58 +09:00
Damien Elmes
71de076309 no need to adjust types when rebuilding priorities 2010-10-25 15:38:50 +09:00
Damien Elmes
c1d79b856f superfluous rowcount 2010-10-25 15:36:43 +09:00
Damien Elmes
33e6a17141 make sure to set isDue=0 for spaced cards too, for backwards compat 2010-10-25 15:28:59 +09:00
Damien Elmes
b0e4748a1c make sure to update combinedDue with the new value 2010-10-25 14:35:05 +09:00
Damien Elmes
de18f59474 compat hack for suspended cards on older platforms 2010-10-24 14:21:21 +09:00
Damien Elmes
ecc99780e4 add bury support 2010-10-24 13:06:16 +09:00
Damien Elmes
1d89be0a1e make sure to set isDue=0 when answering a card for compatibility reasons 2010-10-24 13:01:13 +09:00
Damien Elmes
4c76d25b05 remove obsolete 'inactive' from findCards() 2010-10-24 12:55:33 +09:00
Damien Elmes
a3040d1fb4 suspend leeches after they've been removed from the queue 2010-10-24 12:32:40 +09:00
Damien Elmes
fbae42d8ef tweak deck stats for new scheduling 2010-10-24 12:26:18 +09:00
Damien Elmes
1e2d88dccf make sure to consider active tags when calculating next due card 2010-10-24 11:47:47 +09:00
Damien Elmes
057414f404 use same active/inactive limits for failed queue 2010-10-23 16:15:42 +09:00
Damien Elmes
df2ae3b63b give each scheduler a name 2010-10-20 18:03:10 +09:00
Damien Elmes
94ad0cb95e new cram code, remove refs to inactive cards
- cramming is now a separate scheduler type
- correctly answering a card while cramming causes its scheduling to be
  changed in the standard review too
- options to sort cards by earliest modified, ordered, random
- render priority 0 obsolete, as it's all done at queue generation time now
2010-10-20 13:12:17 +09:00
Damien Elmes
30a6f04708 make queue limit configurable, fix bulk fetching of cards for ankionline 2010-10-19 19:45:57 +09:00
Damien Elmes
b7e3d87e5d new active/inactive handling, bigger queues
- separate categories for new & review cards
- 'only these tags' + 'none of these tags'
2010-10-19 19:17:52 +09:00
Damien Elmes
be4dea39b1 more scheduler updates
- reimplement reviewEarly and newEarly by replacing parts of the scheduler,
  instead of adding special conditions
- remove references to isDue and priority (1,2,3,4) which is not necessary
  anymore
- add option to switch between per-day scheduling and due now scheduling
- newCardsToday() -> newCardsDoneToday()
- don't decrement counts for suspended cards
- make sure to update type when suspending/unsuspending
- fix findCards()
- set hardInterval = 1-1.1 on upgrade, or the default per day scheduling doesn't
  make sense
2010-10-18 18:01:19 +09:00
Damien Elmes
ad743d850d start work on scheduling refactor
Previously we used getCard() to fetch a card at the time. This required a
number of indices to perform efficiently, and the indices were expensive in
terms of disk space and time required to keep them up to date. Instead we now
gather a bunch of cards at once.

- Drop checkDue()/isDue so writes are not necessary to the DB when checking
for due cards
- Due counts checked on deck load, and only updated once a day or at the end
of a session. This prevents cards from expiring during reviews, leading to
confusing undo behaviour and due counts that go up instead of down as you
review. The default will be to only expire cards once a day, which represents
a change from the way things were done previously.
- Set deck var defaults on deck load/create instead of upgrade, which should
fix upgrade issues
- The scheduling code can now have bits and pieces switched out, which should
make review early / cram etc easier to integrate
- Cards with priority <= 0 now have their type incremented by three, so we can
get access to schedulable cards with a single column.
- rebuildQueue() -> reset()
- refresh() -> refreshSession()
- Views and many of the indices on the cards table are now obsolete and will
  be removed in the future. I won't remove them straight away, so as to not
  break backward compatibility.
- Use bigger intervals between successive card templates, as the previous
intervals were too small to represent in doubles in some circumstances

Still to do:

- review early
- learn more
- failing mature cards where delay1 > delay0
2010-10-18 14:35:11 +09:00
Damien Elmes
747a28556a when determining which card templates to use, replace text: too 2010-10-18 11:34:02 +09:00
Damien Elmes
4437024ecc fix a bug caused by sqlite not understanding unicode case 2010-08-26 18:38:08 +09:00
Damien Elmes
9332444dfd add hook for when undo is finished 2010-08-16 19:27:00 +09:00
Damien Elmes
84cb81854b faster tag updating for large number of tags 2010-08-16 18:52:55 +09:00
Damien Elmes
f3d2965e12 Revert "don't delete dangling facts when deleting cards" hack
We don't need this any more as we do conflict handling.

This reverts commit 880219567e.
2010-07-21 18:37:35 +09:00
Damien Elmes
880219567e don't delete dangling facts when deleting cards
If the user is not careful to only sync when one side has been modified, they
can end up with cards on one side and not the other. If they then delete a
card, deleting the dangling facts also deletes the fact associated with the
not-yet-synced card. In order to avoid this, we avoid deleting dangling facts
until a DB check.
2010-05-21 06:56:38 +09:00
Damien Elmes
edf121f8dc add hex cache for dumb clients, make sure not to mark deck modified 2010-05-16 01:01:38 +09:00
Damien Elmes
5616e679f5 cache the css as a deck var, don't accidentally send it in sync 2010-05-10 21:32:36 +09:00
Damien Elmes
a1d3f13f0a update for sqlalchemy 0.6 2010-04-21 13:21:16 +09:00
Damien Elmes
1be5943903 remove erroneous comment 2010-04-16 01:25:47 +09:00
Damien Elmes
21ec548680 more explicit setting of creation time, don't fiddle with ordinals for rand 2010-04-15 23:05:14 +09:00
Damien Elmes
783751d7ea support ? for single char search 2010-04-06 18:47:39 +09:00
Damien Elmes
09f51e5028 when adding facts, use a small due increment for each card model 2010-03-03 02:51:05 +09:00
Damien Elmes
80197d9c2f when generating cards, use a small creation date increment 2010-03-03 02:49:55 +09:00
Damien Elmes
220670a048 update combinedDue attr in cardAnswered(), not just on disk 2010-02-22 16:41:20 +09:00
Damien Elmes
472b68b831 don't backup when importing / saving as 2010-02-20 10:03:39 +09:00
Damien Elmes
bc345d3711 create backup dir if missing 2010-02-20 09:54:54 +09:00
Damien Elmes
6dce4e0602 add progress dialog to save as 2010-02-09 01:52:06 +09:00
Damien Elmes
ae690ccea3 don't bother with an integrity check if the deck is unchanged 2010-02-09 01:36:39 +09:00
Damien Elmes
295bacacd8 forget sync name on saveas 2010-02-09 01:30:16 +09:00
Damien Elmes
095a7dbb6f implement save as without attaching a db
Attaching new to old causes old to be implicitly commited.
We also can't access old from new if a write lock has been
taken out, so the only option left is to move all the data
through Python and take the speed hit.
2010-02-09 01:27:49 +09:00
Damien Elmes
dfd88cc4c1 don't set modtime of 0 2010-02-06 01:20:50 +09:00
Damien Elmes
c659660864 don't send acq cards when there are cards to review & new cards shown last 2010-02-05 13:07:42 +09:00
Damien Elmes
09f51e27f0 return newly created card ids when generating cards 2010-02-05 12:59:54 +09:00
Damien Elmes
8378f71c73 since interval is updated first, use lastInterval in cardIsBeingLearnt() 2010-02-01 05:11:34 +09:00
Damien Elmes
9b61d86096 place a minimum bound on average factor
Since SM2's grading has a bias towards starting high and going down (fail/hard
decrease the interval more than easy increases it), more conservative users
find their average interval reaches the minimum allowable interval and the
times given by hard/good start to converge. In the future, the whole concept
of using the average interval for new cards should be revisited to see if the
data supports it
2010-02-01 05:01:23 +09:00
Damien Elmes
d8ba9e1987 revert ease1 change
suspicious of the previous change, I had a look at the example pascal and
found the EF _was_ actually updated on a failure. The spec is misleading there.
2010-02-01 04:44:27 +09:00
Damien Elmes
87a0e087e5 tweak scheduler
- don't touch factor on fail, as per SM2 specs
- hard code no-punish-on-hard 'learning period' to 7 days so users who tweak
  the initial intervals aren't punished too early
2010-02-01 03:28:46 +09:00
Damien Elmes
a6a7782030 fix another windows timer resolution bug 2010-01-22 02:16:57 +09:00
Damien Elmes
33aede4d56 document 'features' reuse, add tool to get var as string 2010-01-19 01:51:35 +09:00
Damien Elmes
20da165b6e check backup integrity using existing db connection to avoid locking issues 2010-01-04 22:37:14 +09:00
Damien Elmes
ec9a7c3755 check db integrity on backup 2009-11-30 14:31:47 +09:00
Damien Elmes
6a8c19a889 use threadlocal for single user access 2009-11-30 08:34:31 +09:00
Damien Elmes
4bea904dc6 give the card id on cardAnswered hook, not old card 2009-11-27 15:59:58 +09:00
Damien Elmes
a50ec2649a fix undo of deck properties bug 2009-11-27 15:26:03 +09:00
Damien Elmes
feaedccc9a fix field ordinals on db check 2009-11-19 13:07:43 +09:00
Damien Elmes
9671d15371 rewrite expression to be clearer 2009-10-25 19:48:28 +09:00
Damien Elmes
4e83a67e00 lowercase is:foo searches 2009-10-04 19:30:21 +09:00
Damien Elmes
c786479268 timeout @ 60 2009-09-28 09:22:57 +09:00
Damien Elmes
1111cae80a mark everything updated on full db check 2009-09-26 23:13:28 +09:00
Damien Elmes
0863acc160 make pool an argument instead of progress handling; timeout=30 2009-09-25 18:08:53 +09:00
Damien Elmes
1028b04d9c default timeout of 90 seconds 2009-09-22 18:35:31 +09:00
Damien Elmes
2e2444f488 apsw -> nullpool 2009-09-21 20:48:04 +09:00
Damien Elmes
fa6d1f9528 set isolation_level=None when using apsw 2009-09-20 19:55:56 +09:00
Damien Elmes
dce35eda06 disable progress handler if apsw enabled 2009-09-17 01:33:29 +09:00
Damien Elmes
2a72a4dc70 apsw wants unicode 2009-09-17 01:08:19 +09:00
Damien Elmes
090529c4d7 add option to initialize via apsw 2009-09-17 00:25:53 +09:00
Damien Elmes
1b1b69e966 don't die on resetUndo() if undo disabled 2009-09-14 15:30:20 +09:00
Damien Elmes
a9f3e4dca7 don't throw a traceback with an invalid fid 2009-09-06 17:31:47 +09:00
Damien Elmes
5fed1f7f35 support rtl in html too 2009-08-17 07:42:19 +09:00
Damien Elmes
fd9ce1a876 random(0, time()) 2009-08-17 06:52:26 +09:00
Damien Elmes
c33c6318b2 handle text:field in rename & delete 2009-08-17 04:53:29 +09:00
Damien Elmes
2f2487e5b8 increase 5 year max scheduling time to 100 years 2009-07-09 23:07:38 +09:00
Damien Elmes
fdb9327864 fix locking in ubuntu 2009-07-08 14:38:40 +09:00
Damien Elmes
6dfaccaa5e reuse features as rtl marker, fix deck version 2009-07-05 02:19:13 +09:00
Damien Elmes
8f383db5d2 don't bump mod time on upgrade 2009-07-04 17:10:32 +09:00
Damien Elmes
6514c2a2a5 when previewing cards, use all available card models 2009-07-04 16:50:25 +09:00
Damien Elmes
e2ad8a7ce3 bump deck mod time on suspend/unsuspend 2009-07-02 23:42:05 +09:00
Damien Elmes
01cb3a4b7d when regenerating cards, use fact's creation date 2009-06-29 23:30:13 +09:00
Damien Elmes
5e9a68d4c7 fix problem upgrading shared decks 2009-06-28 22:23:40 +09:00
Damien Elmes
1cc077e1e7 make sure save as copies deck vars 2009-06-27 17:20:49 +09:00
Damien Elmes
35731d0cb3 move leech detection into libanki 2009-06-26 08:10:33 +09:00
Damien Elmes
5598bcbce4 make sure to set leech vars on create, fix recently created decks 2009-06-25 14:57:34 +09:00
Damien Elmes
1e7cae5202 add leech control 2009-06-25 05:24:02 +09:00
Damien Elmes
1a5d243520 reenable removal of suspended tag 2009-06-23 23:43:21 +09:00
Damien Elmes
2f93ca3d8f reuse features as media url, blank 2009-06-21 06:51:48 +09:00
Damien Elmes
f94104ed9f new backup-friendly backup handling 2009-06-20 02:05:11 +09:00
Damien Elmes
aca3ea2513 upgrade suspended, but don't mark cards dirty and don't delete from suspended 2009-06-19 10:26:54 +09:00
Damien Elmes
358b453906 always update buried/reviewEarly cards 2009-06-19 08:02:40 +09:00
Damien Elmes
3e2c150b17 only set lastDue if card is not new, hide due for new cards in stats 2009-06-19 07:46:26 +09:00
Damien Elmes
a1981cf220 strip suspended upgrade code, users will have to do it manually 2009-06-18 07:57:38 +09:00
Damien Elmes
0cd3b517b3 make sure to use unicode in suspended 2009-06-18 06:11:22 +09:00
Damien Elmes
b6a50db1c2 rebuild queue after upgrade mostly done 2009-06-18 04:25:45 +09:00
Damien Elmes
33c23bc082 add leech report to congrats, remove bold from less important items 2009-06-18 03:43:31 +09:00
Damien Elmes
285bf5a9a0 add search for inactive 2009-06-18 03:14:22 +09:00
Damien Elmes
5bca5bc0da make distinction between suspended/inactive 2009-06-18 03:13:58 +09:00
Damien Elmes
58c4e6eb27 fix error caused by upgrading deck without queue built 2009-06-18 02:40:18 +09:00
Damien Elmes
6a286d1eca obsolete suspended tag
- add suspendCards/unsuspendCards()
- set priority = -3 to manually suspend
- ignore cards with negative priorities when updating
- remove suspended from list of initial tags
2009-06-18 02:25:50 +09:00
Damien Elmes
09e002c8d6 when generating cards in ordered mode, set due = fact creation + ordinal 2009-06-15 11:57:25 +09:00
Damien Elmes
8d3678b9fb mark deck dirty on reset cards 2009-06-15 06:57:50 +09:00
Damien Elmes
2db2b65df0 set deck created time on download 2009-06-12 22:41:21 +09:00
Damien Elmes
d67b4b2ed9 remove obsolote newSpacedCount() 2009-06-11 22:49:15 +09:00
Damien Elmes
d2ac7fc13e don't dirty cards/fact on full check, rely on lastSync = 0 2009-06-11 03:49:16 +09:00
Damien Elmes
2d32e1aaa1 strip all chinese/japanese support out in favour of plugins 2009-06-10 22:58:28 +09:00
Damien Elmes
261c70b8c2 set first answered on reset 2009-06-10 21:23:30 +09:00
Damien Elmes
845aede221 if show failed cards at end, use maxFailed = 0 2009-06-08 12:36:23 +09:00
Damien Elmes
bd31fb4e69 numerous optimizations - cold cache start is much faster now
- fix priorityDue index order
- force correct index on checkDue() and spacedCardCount()
- don't check due again if reviewEarly & newEarly false
- optimize reviewEarly/buried unsuspend
2009-06-06 18:49:30 +09:00
Damien Elmes
c5cabb7e84 analyze after adding index 2009-06-06 17:37:48 +09:00
Damien Elmes
598b2e79e9 add index for average factor calculation 2009-06-06 17:32:51 +09:00
Damien Elmes
82e8555793 remove debugging from fixIntegrity 2009-06-06 03:42:01 +09:00
Damien Elmes
c6cddeb163 respect max failed cards with 'show failed cards at end', set to default 1000 2009-06-04 07:22:03 +09:00
Damien Elmes
4effec1c59 remove extra newline 2009-06-04 05:28:32 +09:00
Damien Elmes
3e40dc1557 return if numBackups = 0 2009-06-04 05:17:36 +09:00
Damien Elmes
5692c91855 add check for fields without field model 2009-06-04 04:19:53 +09:00
Damien Elmes
76b114f584 make sure to include type= when raising deck access error 2009-06-02 03:21:40 +09:00
Damien Elmes
22b086fbad better error report if deck is missing decks table 2009-05-31 01:22:06 +09:00
Damien Elmes
b237bcbdf0 support searching for fact ids 2009-05-30 18:22:55 +09:00
Damien Elmes
ddbe0b8657 make sure utcoffset defaults to -1 so initialized on first load 2009-05-27 00:30:29 +09:00
Damien Elmes
7588eb9650 don't need to mention views/indices 2009-05-16 05:12:44 +09:00
Damien Elmes
ea9ad13932 add support for alternative media dir and disabling media copy on export 2009-05-16 04:07:54 +09:00
Damien Elmes
6ccafcb996 optimize change model - much faster for large decks 2009-05-16 03:14:23 +09:00
Damien Elmes
2a9e88cb5d support quick db check, don't forget deletions, report deleted cards 2009-05-16 02:47:51 +09:00
Damien Elmes
ebf83d898e don't clobber deck modified when expired cards on open 2009-05-16 00:49:33 +09:00
Damien Elmes
57b659ca36 optimize updatePriorities(), get a 2-3x speedup 2009-05-09 05:58:42 +09:00
Damien Elmes
6893d01458 add back priorityDue index 2009-05-09 04:17:53 +09:00
Damien Elmes
2f4b853140 improve speed of unused tag deletion in updateCardTags() 2009-05-09 03:46:59 +09:00
Damien Elmes
19bc9768f1 delete unused tags on card delete, do it efficiently 2009-05-09 03:26:34 +09:00
Damien Elmes
d15dd71b68 speed up deleteDanglingFacts() 2009-05-09 03:25:46 +09:00
Damien Elmes
bc7bdc24c4 update all card priorities at once on add 2009-05-09 03:25:24 +09:00
Damien Elmes
9df4b3278f don't flushMod() unless modified 2009-05-07 17:26:29 +09:00
Damien Elmes
3de46f701b type->is 2009-05-06 16:40:03 +09:00
Damien Elmes
2550d3ec08 new 'learn more' handling 2009-05-06 15:45:15 +09:00
Damien Elmes
f8b6d18dff add search for delayed 2009-05-06 13:47:57 +09:00
Damien Elmes
eac428f6b3 fail>failed 2009-05-06 13:40:49 +09:00
Damien Elmes
0b9df42400 support searching for card type 2009-05-06 13:32:00 +09:00
Damien Elmes
992f7af50e make priorities sort better 2009-05-06 12:44:43 +09:00
Damien Elmes
f32f96fb53 if updating priorities results in a suspend, update due counts 2009-05-01 04:36:26 +09:00
Damien Elmes
143a78dd2a handle buried cards in deck load 2009-04-29 12:12:07 +09:00
Damien Elmes
32d5dccbc9 randomize after reset; refresh deck 2009-04-29 11:51:33 +09:00
Damien Elmes
33c59a3006 new review early handling so that we can recover on load 2009-04-28 17:12:50 +09:00
Damien Elmes
bc2e9d9593 fix adding cards while in random mode 2009-04-23 16:49:55 +09:00
Damien Elmes
2393775f80 add type to factid index 2009-04-23 04:05:37 +09:00
Damien Elmes
d1a44e308e handle randomize progress in ankiqt, add helper for updating facts 2009-04-23 01:57:54 +09:00
Damien Elmes
f4997f328c don't randomize on upgrade, will cause sync problems 2009-04-23 01:36:25 +09:00
Damien Elmes
35837ef213 mark cards modified when randomizing/ordering 2009-04-23 01:35:41 +09:00
Damien Elmes
ae7047f5af add progress dialogs 2009-04-23 01:33:59 +09:00
Damien Elmes
fbf31d60da new random handling 2009-04-23 01:25:42 +09:00
Damien Elmes
a6827b8dd7 check if modified in setvar() 2009-04-23 00:32:40 +09:00
Damien Elmes
cd87adbe71 fix new count where cards are suspended, highlight type in blue too 2009-04-22 21:37:42 +09:00
Damien Elmes
bc8b7f45da fix plural of suspended cards 2009-04-22 21:34:38 +09:00
Damien Elmes
09e158ac74 update card priorities after fact tags updated 2009-04-22 21:34:17 +09:00
Damien Elmes
3c9ad98a44 remove comma from delete tags 2009-04-22 18:10:54 +09:00
Damien Elmes
013f3d00a8 support * wildcard in normal text search too 2009-04-20 21:50:29 +09:00
Damien Elmes
c0b46ff994 mark cards modified when priority changed 2009-04-18 22:41:03 +09:00
Damien Elmes
e1f505b853 don't randomize field ids anymore 2009-04-18 22:00:49 +09:00
Damien Elmes
451c266591 make sure tag index is unique 2009-04-18 04:45:41 +09:00
Damien Elmes
19e597cbc9 don't update tag for each card, we do it for the fact 2009-04-18 02:32:03 +09:00
Damien Elmes
1d4710b6d6 flush after startProgress() in case a lost focus has been triggered 2009-04-17 23:18:05 +09:00
Damien Elmes
099202c28f trailing whitespace 2009-04-14 02:01:07 +09:00
Damien Elmes
06b1ee47f9 add support for turning off backups 2009-04-14 00:15:45 +09:00
Damien Elmes
b7a81f952c don't mark deck modified on upgrade, just commit 2009-04-11 02:15:52 +09:00
Damien Elmes
49089732c4 make sure to set progress handler envs before setting handler 2009-04-11 01:05:51 +09:00
Damien Elmes
51213784a8 init progress handle at start, tweaks for faster deck startup 2009-04-11 00:20:52 +09:00
Susanna Björverud
356d9365bb Clean up, removing commented out no longer needed lines 2009-04-10 14:45:27 +02:00
Susanna Björverud
87b4e72f47 Experimenting with selecting cards that are both new and spaced 2009-04-10 10:57:49 +02:00
Susanna Björverud
2738ee9100 Changed 'At the same time...' to 'At this time...' 2009-04-09 15:21:11 +02:00
Susanna Björverud
c4304fa195 Plural support for some strings 2009-04-07 08:56:35 +02:00
Damien Elmes
c7f9cec657 add deck vars 2009-04-07 11:55:08 +09:00
Damien Elmes
36825006d0 new search interface, support negating tags, use tag: not t: 2009-04-06 11:41:50 +09:00
Damien Elmes
62375e37a3 need to force a write lock even in explicit locking mode 2009-04-02 04:29:11 +09:00
Damien Elmes
78ee6884f5 make sure to account for failed cards not due yet 2009-03-30 08:23:21 +09:00
Damien Elmes
e25e8ff0ed fix rebuildCounts() 2009-03-30 07:45:13 +09:00
Susanna Björverud
f156a9a436 Remove extra <br> in next-day msg 2009-03-28 08:40:25 +01:00
Damien Elmes
c2fb704c52 assert undoLog primary key not null 2009-03-25 09:42:44 +09:00
Damien Elmes
0bf018fe02 update priorities when changing model 2009-03-23 11:51:43 +09:00
Damien Elmes
827afacaaa update tags on card gen, update card model on model, delete old tags 2009-03-23 11:47:02 +09:00
Damien Elmes
da4461d48d only split on space 2009-03-23 10:29:26 +09:00
Damien Elmes
80464ab4a5 delete unreferenced tags on update 2009-03-23 10:21:48 +09:00
Damien Elmes
c7022fd37d force a commit before integrity check 2009-03-23 09:54:45 +09:00
Damien Elmes
107217ca6f make sure to update priorities on upgrade 2009-03-21 12:15:30 +09:00
Damien Elmes
1be887872d use utc offset of -1 instead 2009-03-21 03:55:24 +09:00
Damien Elmes
cf459aee7d spaced cards > delayed cards 2009-03-20 14:20:06 +09:00
Damien Elmes
1f56bc3ec0 support limiting to single field in find and replace 2009-03-20 14:18:56 +09:00
Damien Elmes
cd44f3308b add support for updating tags for a given model 2009-03-19 11:26:33 +09:00
Damien Elmes
93ca931f01 improve progress handler 2009-03-19 10:42:12 +09:00
Damien Elmes
34be5b47a7 fix reviewHistory table by rebuilding it 2009-03-15 07:27:44 +09:00
Damien Elmes
dfd70ce4a1 commit before pragmas 2009-03-15 01:52:22 +09:00
Damien Elmes
11cd9af5ca commit before attempting to change page size 2009-03-15 01:48:51 +09:00
Damien Elmes
bc7b4e4d18 remove tag replace from find&replace 2009-03-14 11:11:02 +09:00
Damien Elmes
fc66e909ae make sure to copy tags on saveas 2009-03-14 10:19:29 +09:00
Damien Elmes
b4b01f9fc4 fix initial tag setting when adding cards 2009-03-14 10:06:22 +09:00
Damien Elmes
f14ad8521d update initial tag priorities when creating deck 2009-03-14 10:02:25 +09:00
Damien Elmes
9eca0221f1 reset undo on check db 2009-03-14 09:42:42 +09:00
Damien Elmes
440321459a take out an exclusive lock on the deck 2009-03-14 09:38:58 +09:00
Damien Elmes
52cfef6e6c remove trailing undo barrier on end 2009-03-14 05:23:59 +09:00
Damien Elmes
0743f87187 add progress information to deck upgrade, fix legacy file format = 1 2009-03-13 05:36:44 +09:00
Damien Elmes
b527d31499 fix the review history growing bug properly 2009-03-12 17:21:11 +09:00
Damien Elmes
004030af0d don't fail if progress handler unavailable or tags table existing 2009-03-10 23:38:29 +09:00
Damien Elmes
c266248edb fix review early bug, update indices on deck load 2009-03-10 12:28:36 +09:00
Damien Elmes
343b76da05 if utc offset is 24, set new utc offset and rebuild 2009-03-10 07:38:59 +09:00
Damien Elmes
fa513cab72 remove duplicates from review history 2009-03-04 12:10:50 +09:00
Damien Elmes
4763e41180 add/delete tags should update card ids, not fact ids 2009-03-04 11:59:34 +09:00
Damien Elmes
da3d25e2d6 bulk delete cards when template deleted, add progress info on field delete 2009-03-04 11:52:41 +09:00
Damien Elmes
9d16b89c7d refresh after add/remove tags, don't use comma 2009-03-04 11:45:54 +09:00
Damien Elmes
32c621de32 fix low priority support 2009-03-04 10:58:44 +09:00
Damien Elmes
1234420cb7 add tags based on user's priorities 2009-02-28 16:57:11 +09:00
Damien Elmes
83e27a12ce fix extra suspend tags 2009-02-26 00:49:54 +09:00
Damien Elmes
0ffc634094 update on openSession() 2009-02-26 00:11:37 +09:00
Damien Elmes
14bb30becb expire after delete 2009-02-24 13:03:27 +09:00
Damien Elmes
529ddef63a max=0 to progress support 2009-02-24 01:12:37 +09:00
Damien Elmes
7026ef9bd8 update card tags after model changed 2009-02-24 00:13:32 +09:00
Damien Elmes
7a12888eb2 report new cards as new always, make sure they come before vhp if 'show first' 2009-02-21 18:23:55 +09:00
Damien Elmes
12f73ef52a fix priority rebuild 2009-02-21 18:05:29 +09:00
Damien Elmes
3878a3eef2 allow partial priority rebulid for activeTags, speed up db with cache/page size 2009-02-20 17:25:41 +09:00
Damien Elmes
0d2429bee8 fix updatePriorities(), etc 2009-02-20 00:14:04 +09:00
Damien Elmes
780010ad68 fix unit tests, turn off some debugging 2009-02-19 17:27:13 +09:00
Damien Elmes
e4354181c4 db progress handler, work on tag cache 2009-02-19 16:01:04 +09:00
Damien Elmes
deffd752c5 fix failed card policy being set as custom 2009-02-17 23:20:05 +09:00
Damien Elmes
0dfe83cd85 refresh deck after model change 2009-02-15 20:33:07 +09:00
Damien Elmes
58fd0f253c add cloneFact() back, it's still used by previewing 2009-02-15 15:49:04 +09:00
Damien Elmes
e3805476af remove obsolete cardsDueSoon 2009-02-14 22:21:06 +09:00
Damien Elmes
deed322c53 only bump deck mod time if there were reviewed-ahead cards 2009-02-14 20:09:50 +09:00
Damien Elmes
c81098c037 check due after resetting early 2009-02-14 20:08:40 +09:00
Damien Elmes
724c1354a8 return number of changed facts in find&replace 2009-02-14 01:11:27 +09:00
Damien Elmes
8892ad9f90 expire instead of expunging 2009-02-14 00:12:28 +09:00
Damien Elmes
f6b24b6d9a find&replace 2009-02-13 21:38:11 +09:00
Damien Elmes
231b5fe9e7 only use failedcardmax with 'soon' failed card setting, fix tag unit test 2009-02-10 13:22:45 +09:00
Damien Elmes
55cf34e8ee make sure card model tags are included in allTags(), fix upgrade code 2009-02-09 20:21:34 +09:00
Damien Elmes
6d7ef66640 more upgrade fixes 2009-02-08 04:54:59 +09:00
Damien Elmes
fa1713e9ee fix upgrade code 2009-02-08 04:36:27 +09:00
Damien Elmes
9b4da171fe accept kwargs in tagslist 2009-02-08 03:21:16 +09:00
Damien Elmes
d127ae4175 separate tags with spaces 2009-02-08 03:13:37 +09:00
Damien Elmes
28f738f069 tweak order of failed card options 2009-02-07 21:34:46 +09:00
Damien Elmes
a342c73887 improve failed card handling 2009-02-07 21:31:44 +09:00
Damien Elmes
3b2ba252cd remove debugging code 2009-02-07 16:21:25 +09:00
Damien Elmes
50e9885c15 faster allTags() 2009-02-07 14:55:48 +09:00
Damien Elmes
d35320364a add progress bar for deleting cards 2009-02-06 19:30:39 +09:00
Damien Elmes
4d4e7afcff add undoredo hook 2009-02-06 19:12:03 +09:00
Damien Elmes
09dbbecf3a fix suspended card msg when review early term early, tweak fin msg 2009-02-06 15:59:35 +09:00
Damien Elmes
8c9803e638 dynamic index generation, sort new in rev order 2009-02-06 01:28:21 +09:00
Damien Elmes
b91b458c6d Reverting "add 'make due now' option" 2009-02-05 16:41:57 +09:00
Damien Elmes
45829f9acc add 'make due now' option 2009-02-05 11:58:10 +09:00
Damien Elmes
3a1c79e1ce only update priorities on due cards 2009-02-05 00:52:05 +09:00
Damien Elmes
608b899e58 bugfix for change model 2009-02-04 22:05:16 +09:00
Damien Elmes
e2676c238f tweak review order wording 2009-02-04 21:55:51 +09:00
Damien Elmes
ca8e592840 handle x->y & y->x in card model rename, big speed increase for update qa 2009-02-04 21:46:14 +09:00
Damien Elmes
d44c3792e9 model changing support 2009-02-04 20:43:54 +09:00
Damien Elmes
b2832b2363 get rid of spaces in congrats 2009-02-02 15:35:34 +09:00
Damien Elmes
40ed30b4ea don't show spaced cards notice if no new cards are left 2009-01-31 03:58:58 +09:00
Damien Elmes
479f38fab2 background colour, reduce default spacing to a minute, tweak finished msg 2009-01-31 02:18:46 +09:00
Damien Elmes
275d962cb4 make sure not to create undo log on new deck 2009-01-27 03:09:12 +09:00
Damien Elmes
c1e5e657b6 cards>interval in docs 2009-01-24 04:17:03 +09:00
Damien Elmes
a6b4252428 fix graph dividing, make sure to display 'x cards waiting' msg 2009-01-22 23:47:31 +09:00
Damien Elmes
94184cbdf5 unset typeanswer on upgrade 2009-01-21 21:23:08 +09:00
Damien Elmes
913fe96c07 ignore priority when reviewing early 2009-01-21 15:48:09 +09:00
Damien Elmes
222503ea8f store field to compare against in type answer 2009-01-21 01:43:23 +09:00
Damien Elmes
28b0a7b8d3 rescheduling support 2009-01-21 00:27:04 +09:00
Damien Elmes
098cc98471 translation patches from Piotr 2009-01-20 23:33:50 +09:00
Damien Elmes
bebac30811 hide status if deck integrity bad 2009-01-20 23:31:50 +09:00
Damien Elmes
1da037ba90 more polish translations and bugfixes from Piotr Kubowicz 2009-01-18 14:48:07 +09:00
Damien Elmes
835b4b5969 make sure learn ahead only looks at review cards 2009-01-17 19:04:26 +09:00
Damien Elmes
c1d778971f always fix current model problem 2009-01-17 16:41:10 +09:00
Damien Elmes
75d6123dc3 identify temp files as anki, quiet lame 2009-01-17 16:29:45 +09:00
Damien Elmes
334d126237 recording & noise profile support on linux 2009-01-17 01:05:39 +09:00
Damien Elmes
f515a6c5f9 more precision on undo progress 2009-01-16 21:24:26 +09:00
Damien Elmes
6015dbec04 add progress to export, speed up export, tweak undo progress 2009-01-16 19:23:23 +09:00
Damien Elmes
87fbd896fc fix undo bugs, add progress, improve progress of check media db 2009-01-16 18:54:32 +09:00
Damien Elmes
240d311ca0 optimize add/deleteTag(), add progress callbacks and check (media) db 2009-01-16 18:17:36 +09:00
Damien Elmes
8bd84d4dfe better learn-ahead handling 2009-01-16 16:24:38 +09:00
Damien Elmes
fe17d6c53e improve upgrade code 2009-01-16 13:14:40 +09:00
Damien Elmes
3670a0cb7b review early, learn more, tweak finished msg 2009-01-15 04:37:27 +09:00
Damien Elmes
93332079b5 add model copy support 2009-01-14 15:28:27 +09:00
Damien Elmes
8e71b5fbbf add change card model, fix bug in check db 2009-01-14 14:10:07 +09:00
Damien Elmes
6e63bdfc7c make sure runHook is imported 2009-01-07 18:49:12 +09:00
Damien Elmes
f87c02f7a4 run deck closed hook in libanki 2009-01-07 12:48:44 +09:00
Damien Elmes
8dfeb01de6 remove superfluous statement 2009-01-07 12:32:26 +09:00
Damien Elmes
7c764763d2 sqlalchemy 0.5 compat 2009-01-07 11:37:01 +09:00
Damien Elmes
afa9565d12 make sure to copy media table on saveas 2009-01-07 09:47:54 +09:00
Damien Elmes
57a49e9b08 fix ordering, add index 2009-01-07 09:25:42 +09:00
Damien Elmes
f60a536159 record last session start 2009-01-07 08:51:27 +09:00
Damien Elmes
7ad0e99b59 fix problem with null card model props 2009-01-06 12:16:32 +09:00
Damien Elmes
36ae6df933 default to a ten minute session 2009-01-06 09:15:57 +09:00
Damien Elmes
68b7991492 fix default session limits 2009-01-05 17:06:56 +09:00
Damien Elmes
36a715fd17 add type in answer support 2009-01-05 15:38:26 +09:00
Damien Elmes
2319cbcc71 timeboxing, delay lapsed 2009-01-05 13:41:19 +09:00
Damien Elmes
7e74fe3844 fix media dir problem on win32, fix unicode issues with media 2009-01-05 08:20:49 +09:00
Damien Elmes
2aecbffafe fix backup on win32 2009-01-05 06:51:47 +09:00
Damien Elmes
8750b9bbbb don't convert to system encoding prior to converting to utf8 2009-01-05 06:40:08 +09:00
Damien Elmes
91e90d8092 card model > card template 2009-01-05 06:10:10 +09:00
Damien Elmes
e3feff6ca6 revert undo log to temporary table, fix slowdown on big undo log 2009-01-04 13:48:48 +09:00
Damien Elmes
5efb6910ef fix name() on in-memory db 2009-01-04 08:05:42 +09:00
Damien Elmes
0f129f7aea fix saveas with no media dir 2009-01-04 07:43:45 +09:00
Damien Elmes
9765fdae73 support media for memory backed files 2009-01-04 07:40:32 +09:00
Damien Elmes
c973c1eb4f new decks now default to in-memory storage until saveas
- undo needs fixing
- media support needs to be changed to work with in-memory db
2009-01-04 07:13:30 +09:00
Damien Elmes
a5d64aaa7f make sure allowEmptyAnswer is a bool 2009-01-04 05:30:15 +09:00
Damien Elmes
ee71c66cdb document need to call refresh after merging models 2009-01-04 05:17:58 +09:00
Damien Elmes
429e4252cb delete undo log outside of session 2008-12-27 16:14:43 +09:00
Damien Elmes
c0f49f1373 delete undo log and vacuum on close 2008-12-27 15:57:30 +09:00
Damien Elmes
b3be3772fb change to media dir when it's created 2008-12-24 14:58:17 +09:00
Damien Elmes
95f1779130 make undo log permanent 2008-12-23 22:09:33 +09:00
Damien Elmes
ac15b666ef untitled>mydeck, don't remove on saveas 2008-12-23 20:38:19 +09:00
Damien Elmes
48257368cc make sure congrats screen is displayed using standard whitespace 2008-12-23 18:48:42 +09:00
Damien Elmes
3b3fef4ebc refactor latex into media support 2008-12-23 18:00:12 +09:00
Damien Elmes
41fe0c92be rename function 2008-12-23 15:44:29 +09:00
Samson Melamed
9a9082529b mass un/tagging now updates modified cards 2008-12-23 15:43:58 +09:00
Damien Elmes
75dd6d4420 update card models table earlier in deck open 2008-12-23 15:38:36 +09:00
Damien Elmes
f903288c59 add support for 'allow blank answer', default to allow 2008-12-23 13:42:22 +09:00
Damien Elmes
1ee40d0869 update new card order label 2008-12-20 15:41:01 +09:00
Damien Elmes
943e006322 support new cards first 2008-12-20 15:37:42 +09:00
Damien Elmes
cb765bcb72 deck stats should show all new cards, not just due 2008-12-17 00:41:13 +09:00
Damien Elmes
daeba6f78b fix a problem saving over a deck with an existing media folder 2008-12-13 16:44:59 +09:00
Damien Elmes
f1a2fc7feb new failed card eta from nick cook 2008-12-13 15:25:43 +09:00
Damien Elmes
33257c38bc close deck after copy in saveas 2008-12-11 01:14:02 +09:00
Damien Elmes
071d861c3e fix congrats new cards link 2008-12-11 00:37:55 +09:00
Damien Elmes
5dc05735c5 rename default deck to untitled, delete on saveas 2008-12-11 00:19:19 +09:00
Damien Elmes
e1aa79336c show only user tags by default, provide model and card model as options 2008-12-10 20:05:49 +09:00
Damien Elmes
2d5e58ac99 routines for determining current new/rev card order 2008-12-10 18:03:34 +09:00
Damien Elmes
78a15ab652 update priorities when adding/removing tags 2008-12-09 01:57:28 +09:00
Damien Elmes
c3c7c6e43c flush after delete 2008-12-09 01:23:49 +09:00
Damien Elmes
8c9f883e68 dupe fact on add to avoid session issues 2008-12-07 11:38:35 +09:00
Damien Elmes
02a124b66d thinko in last change 2008-12-06 17:17:55 +09:00
Damien Elmes
d480e42f55 rebuild counts after undo, rebuild counts more efficiently 2008-12-06 16:13:34 +09:00
Damien Elmes
4b19cff16b 30 backups, not 100 2008-12-05 18:57:47 +09:00
Damien Elmes
0c5f65c1ea after deleting a field, make sure to update card models 2008-12-05 18:51:38 +09:00
Damien Elmes
5e5381d66f make sure to update counts after addcards() 2008-12-04 01:50:52 +09:00
Damien Elmes
02e1fed2ef behave nicer if undo disabled 2008-12-04 01:14:11 +09:00
Damien Elmes
78f3c8b4ba refresh after undo 2008-12-04 00:55:51 +09:00
Damien Elmes
21b59408cd refactor features to use hooks, update stdmodels, update findTags()
- remove description from fields, cards and models
- remove features and use field names instead
2008-12-03 19:22:15 +09:00
Damien Elmes
e84c0072b0 don't commit deck on load if count hasn't changed 2008-12-03 02:06:58 +09:00
Damien Elmes
ada1cd04b7 check for null sources 2008-12-02 16:41:25 +09:00
Damien Elmes
0f8762c3fe forget deletions before deleting anything in fixIntegrity() 2008-12-01 12:51:35 +09:00
Damien Elmes
bf10f96cc2 python 2.4 compat 2008-12-01 01:37:54 +09:00
Damien Elmes
a7a40bd241 disable undo debugging 2008-12-01 01:07:34 +09:00
Damien Elmes
55df77e0d1 handle unique better 2008-12-01 01:00:01 +09:00
Damien Elmes
a83b41b939 add most of fieldmodels 2008-12-01 00:25:51 +09:00
Damien Elmes
0ff3b41745 don't add layers of undo barriers 2008-12-01 00:17:43 +09:00
Damien Elmes
320d1fa758 conditionally enable undo 2008-11-30 05:47:15 +09:00
Damien Elmes
373e161a6c undo/redo support 2008-11-30 05:40:36 +09:00
Damien Elmes
dff358383a consider failures when calculating eta 2008-11-28 20:01:48 +09:00
Damien Elmes
cd64b0db9e add user tags list, sort tags in canonify 2008-11-28 18:53:04 +09:00