Commit graph

1061 commits

Author SHA1 Message Date
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
8df9111b50 only copy used media on import/export 2010-10-16 10:29:39 +09:00
Damien Elmes
e010ef8062 add clock skew compensation again
this has the negative effect of causing multiple full syncs if syncing
multiple times within a 5 minute period of the previous full sync, but it
makes it much less likely that people's due counts will fall out of sync
2010-10-02 14:47:33 +09:00
Damien Elmes
99ba3f09c8 catch missing facts at end of sync 2010-09-12 12:21:39 +09:00
Damien Elmes
1f239c1e67 direct user to help page when file not in utf-8 2010-09-02 11:45:33 +09:00
Damien Elmes
ea32bce31c support escaped quotes in csv file, ignore bom marker 2010-08-30 20:40:28 +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
c916478868 bump version number 2010-08-19 13:42:19 +09:00
Damien Elmes
593a1e75b0 update unit test for new sync behaviour 2010-08-19 11:32:00 +09:00
Damien Elmes
cb533d9c02 don't die when filename case is borked in media check 2010-08-16 19:28:45 +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
1f90eceaec allow bsd license rather than requiring people to sign over copyright 2010-08-11 14:40:34 +09:00
Damien Elmes
ff60f105d9 add extra minor version number to ensure betas get upgraded 2010-08-02 13:26:48 +09:00
Damien Elmes
5e7c62bca5 don't compensate for clock skew 2010-07-30 18:15:24 +09:00
Damien Elmes
e956aa9afb remove obsolete function 2010-07-27 22:54:51 +09:00
Damien Elmes
d3fb189a72 improved lastSync/modified handling
- never bump deck mod while syncing
- set lastSync to current time, not deck modified time
- don't update lastSync until the final part of the sync
- lower clock skew allowance to ~5 minutes
- bump full sync threshold to 1000 modified items
2010-07-27 22:46:04 +09:00
Damien Elmes
ecb6dbe69a unicode in error messages 2010-07-26 20:59:56 +09:00
Damien Elmes
55194f8aa7 ensure cardmodel/fieldmodels work when given a string too 2010-07-26 17:15:05 +09:00
Damien Elmes
5fe42791c3 use relative path in latex generation 2010-07-26 17:14:49 +09:00
Damien Elmes
61a7d6d79e make sure we match a given model even when given a string 2010-07-24 14:28:24 +09:00
Damien Elmes
a68366b5c4 fix card ordering when generating cards by basing card creation off fact 2010-07-21 19:46:27 +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
6852b0acda bump mod time on full sync to server, ensure lastSync matches 2010-07-21 18:37:05 +09:00
Damien Elmes
f58651cf1b bump version number 2010-07-11 17:42:05 +09:00
Damien Elmes
b8401eff22 ignore parse errors due to invalid html on export 2010-06-28 11:52:25 +09:00
Damien Elmes
f03000d27b remove string exceptions for python2.6 2010-06-10 13:24:46 +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
fd1953bfb5 convert to a list, not tuples, so we can modify on the fly 2010-05-07 16:05:35 +09:00
Damien Elmes
f69d946f83 more sqlalchemy compat 2010-05-02 16:15:32 +09:00
Damien Elmes
554d7021e0 don't specify an input index by default 2010-04-21 13:31:59 +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
af66630f07 delay beautifulsoup import until export 2010-04-01 22:57:26 +09:00
Damien Elmes
7f75364fbe delete mediamissing tags before setting 2010-03-28 10:18:13 +09:00
Damien Elmes
465a890bcd don't add = as a delim 2010-03-16 00:39:41 +09:00
Albert Peschar
ed50fb20d9 auto-detect '=' as import delimiter, strip fields 2010-03-14 11:40:31 +01:00
Damien Elmes
c8d9bac5df clarify one way sync error 2010-03-05 09:27:11 +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
27694adf1a patch from Chris Burel, fix qt html rewriting on 4.6.1+ 2010-02-23 17:25:12 +09:00
Damien Elmes
7111b3b924 add attr to tell if fact was pulled from db 2010-02-22 18:00:23 +09:00