Commit graph

2027 commits

Author SHA1 Message Date
Damien Elmes
59754eacb2 improve id upgrade speed by a factor of 5 2011-04-28 09:23:53 +09:00
Damien Elmes
9c247f45bd remove q/a cache, tags in fields, rewrite remaining ids, more
Anki used random 64bit IDs for cards, facts and fields. This had some nice
properties:
- merging data in syncs and imports was simply a matter of copying each way,
  as conflicts were astronomically unlikely
- it made it easy to identify identical cards and prevent them from being
  reimported
But there were some negatives too:
- they're more expensive to store
- javascript can't handle numbers > 2**53, which means AnkiMobile, iAnki and
  so on have to treat the ids as strings, which is slow
- simply copying data in a sync or import can lead to corruption, as while a
  duplicate id indicates the data was originally the same, it may have
  diverged. A more intelligent approach is necessary.
- sqlite was sorting the fields table based on the id, which meant the fields
  were spread across the table, and costly to fetch

So instead, we'll move to incremental ids. In the case of model changes we'll
declare that a schema change and force a full sync to avoid having to deal
with conflicts, and in the case of cards and facts, we'll need to update the
ids on one end to merge. Identical cards can be detected by checking to see if
their id is the same and their creation time is the same.

Creation time has been added back to cards and facts because it's necessary
for sync conflict merging. That means facts.pos is not required.

The graves table has been removed. It's not necessary for schema related
changes, and dead cards/facts can be represented as a card with queue=-4 and
created=0. Because we will record schema modification time and can ensure a
full sync propagates to all endpoints, it means we can remove the dead
cards/facts on schema change.

Tags have been removed from the facts table and are represented as a field
with ord=-1 and fmid=0. Combined with the locality improvement for fields, it
means that fetching fields is not much more expensive than using the q/a
cache.

Because of the above, removing the q/a cache is a possibility now. The q and a
columns on cards has been dropped. It will still be necessary to render the
q/a on fact add/edit, since we need to record media references. It would be
nice to avoid this in the future. Perhaps one way would be the ability to
assign a type to fields, like "image", "audio", or "latex". LaTeX needs
special consider anyway, as it was being rendered into the q/a cache.
2011-04-28 09:23:53 +09:00
Damien Elmes
c24bb95b31 move models, templates and fields to incremental ids
any change to them is marked as a schema change anyway, and smaller ids mean
more compact css and a smaller fdata table
2011-04-28 09:23:53 +09:00
Damien Elmes
3cb4ade4a1 simplify bold/italic/underline tags from qt in upgrade 2011-04-28 09:23:53 +09:00
Damien Elmes
e21c944aeb fix a few upgrade/cache issues
- make sure we're actually stripping text in the field cache
- make sure a default group is added on upgrade
- make sure old style field references are upgrade
2011-04-28 09:23:53 +09:00
Damien Elmes
88469a4876 fix upgrade. GUI code should take care of progress handler now 2011-04-28 09:23:53 +09:00
Damien Elmes
2f27133705 drop sqlalchemy; massive refactor
SQLAlchemy is a great tool, but it wasn't a great fit for Anki:
- We often had to drop down to raw SQL for performance reasons.
- The DB cursors and results were wrapped, which incurred a
  sizable performance hit due to introspection. Operations like fetching 50k
  records from a hot cache were taking more than twice as long to complete.
- We take advantage of sqlite-specific features, so SQL language abstraction
  is useless to us.
- The anki schema is quite small, so manually saving and loading objects is
  not a big burden.

In the process of porting to DBAPI, I've refactored the database schema:
- App configuration data that we don't need in joins or bulk updates has been
  moved into JSON objects. This simplifies serializing, and means we won't
  need DB schema changes to store extra options in the future. This change
  obsoletes the deckVars table.
- Renamed tables:
-- fieldModels -> fields
-- cardModels -> templates
-- fields -> fdata
- a number of attribute names have been shortened

Classes like Card, Fact & Model remain. They maintain a reference to the deck.
To write their state to the DB, call .flush().

Objects no longer have their modification time manually updated. Instead, the
modification time is updated when they are flushed. This also applies to the
deck.

Decks will now save on close, because various operations that were done at
deck load will be moved into deck close instead. Operations like undoing
buried card are cheap on a hot cache, but expensive on startup.
Programmatically you can call .close(save=False) to avoid a save and a
modification bump. This will be useful for generating due counts.

Because of the new saving behaviour, the save and save as options will be
removed from the GUI in the future.

The q/a cache and field cache generating has been centralized. Facts will
automatically rebuild the cache on flush; models can do so with
model.updateCache().

Media handling has also been reworked. It has moved into a MediaRegistry
object, which the deck holds. Refcounting has been dropped - it meant we had
to compare old and new value every time facts or models were changed, and
existed for the sole purpose of not showing errors on a missing media
download. Instead we just media.registerText(q+a) when it's updated. The
download function will be expanded to ask the user if they want to continue
after a certain number of files have failed to download, which should be an
adequate alternative. And we now add the file into the media DB when it's
copied to th emedia directory, not when the card is commited. This fixes
duplicates a user would get if they added the same media to a card twice
without adding the card.

The old DeckStorage object had its upgrade code split in a previous commit;
the opening and upgrading code has been merged back together, and put in a
separate storage.py file. The correct way to open a deck now is import anki; d
= anki.Deck(path).

deck.getCard() -> deck.sched.getCard()
same with answerCard
deck.getCard(id) returns a Card object now.

And the DB wrapper has had a few changes:
- sql statements are a more standard DBAPI:
 - statement() -> execute()
 - statements() -> executemany()
- called like execute(sql, 1, 2, 3) or execute(sql, a=1, b=2, c=3)
- column0 -> list
2011-04-28 09:23:53 +09:00
Damien Elmes
8e40fdcb18 set the initial factor when card graduates, not when it's created 2011-04-28 09:23:29 +09:00
Damien Elmes
1d6dbf9900 rework tag handling and remove cardTags
The tags tables were initially added to speed up the loading of the browser by
speeding up two operations: gathering a list of all tags to show in the
dropdown box, and finding cards with a given tag. The former functionality is
provided by the tags table, and the latter functionality by the cardTags
table.

Selective study is handled by groups now, which perform better since they
don't require a join or subselect, and can be embedded in the index. So the
only remaining benefit of cardTags is for the browser.

Performance testing indicates that cardTags is not saving us a large amount.
It only takes us 30ms to search a 50k card table for matches with a hot cache.
On a cold cache it means the facts table has to be loaded into memory, which
roughly doubles the load time with the default settings (we need to load the
cards table too, as we're sorting the cards), but that startup time was
necessary with certain settings in the past too (sorting by fact created for
example). With groups implemented, the cost of maintaining a cache just for
initial browser load time is hard to justify.

Other changes:

- the tags table has any missing tags added to it when facts are added/edited.
  This means old tags will stick around even when no cards reference them, but
  is much cheaper than reference counting or a separate table, and simplifies
  updates and syncing.
- the tags table has a modified field now so we can can sync it instead of
  having to scan all facts coming across in a sync
- priority field removed
- we no longer put model names or card templates into the tags table. There
  were two reasons we did this in the past: so we could cram/selective study
  them, and for plugins. Selective study uses groups now, and plugins can
  check the model's name instead (and most already do). This also does away
  with the somewhat confusing behaviour of names also being tags.
- facts have their tags as _tags now. You can get a list with tags(), but
  editing operations should use add/deleteTags() instead of manually editing
  the string.
2011-04-28 09:23:29 +09:00
Damien Elmes
7c76058f4b add find+search code from ankiqt 2011-04-28 09:23:29 +09:00
Damien Elmes
a902ad0b5f move finding code into separate file 2011-04-28 09:23:28 +09:00
Damien Elmes
55f4b9b7d0 favour integers, change due representation, fact&card ordering, more
- removed 'created' column from various tables. We don't care when things like
  models are created, and card creation time didn't reflect the actual time a
  card was created
- facts were previously ordered by their creation date. The code would
  manually set the creation time for subsequent facts on import by 0.0001
  seconds, and then card due times were set by adding the fact time to the
  ordinal number*0.000001. This was prone to error, and the number of zeros used
  was actually different in different parts of the code. Instead of this, we
  replace it with a 'pos' column on facts, which increments for each new fact.
- importing should add new facts with a higher pos, but concurrent updates in
  a synced deck can have multiple facts with the same pos

- due times are completely different now, and depend on the card type
- new cards have due=fact.pos or random(0, 10000)
- reviews have due set to an integer representing days since deck
  creation/download
- cards in the learn queue use an integer timestamp in seconds

- many columns like modified, lastSync, factor, interval, etc have been converted to
  integer columns. They are cheaper to store (large decks can save 10s of
  megabytes) and faster to search for.

- cards have their group assigned on fact creation. In the future we'll add a
  per-template option for a default group.

- switch to due/random order for the review queue on upgrade. Users can still
  switch to the old behaviour if they want, but many people don't care what
  it's set to, and due is considerably faster, which may result in a better
  user experience
2011-04-28 09:23:28 +09:00
Damien Elmes
11a035e2f8 change the default rev sort order to daily random; add randomize 2011-04-28 09:23:28 +09:00
Damien Elmes
7694ff81c5 replace old selective study with new lists; fix upgrade
- instead of the old 4 settings, we move to just two, as there's no point
  having separate include and exclude options for a non-overlapping set of
  cards
- revGroups and newGroups are a list of groupIds to include in the queue. If
  all groups are enabled, the UI should set it to an empty list rather than a
  list of every available group, and groupLimit() will leave off the
  constraint completely
2011-04-28 09:23:28 +09:00
Damien Elmes
4c931e0ff4 move other queue variables into qconf; discard old selective study 2011-04-28 09:23:28 +09:00
Damien Elmes
b3ee91a9d5 add index for groupId, improve startup speed
- skip updating buried cards on startup; it's expensive and we'll do that on
  deck close in the future
- add an index for groupId. Initial profiling indicates that groupId-based
  selective study is considerably faster in certain scenarios

The 50k element deck I'm testing with now opens and builds the queue in 40ms
on a cold cache, of which 34ms is the initial deck startup and 6ms the queue
build. Adding back the undo log and backups will of course increase this, but
this is a big improvement for checking due times in the deck browser.
2011-04-28 09:23:28 +09:00
Damien Elmes
bb79b0e17c add new 'groups' concept, refactor deletions
Users who want to study small subsections at one time (eg, "lesson 14") are
currently best served by creating lots of little decks. This is because:
- selective study is a bit cumbersome to switch between
- the graphs and statitics are for the entire deck
- selective study can be slow on mobile devices - when the list of cards to
  hide/show is big, or when there are many due cards, performance can suffer
- scheduling can only be configured per deck

Groups are intended to address the above problems. All cards start off in the
same group, but they can have their group changed. Unlike tags, cards can only
be a member of a single group at once time. This allows us to divide the deck
up into a non-overlapping set of cards, which will make things like showing
due counts for a single category considerably cheaper. The user interface
might want to show something like a deck browser for decks that have more than
one group, showing due counts and allowing people to study each group
individually, or to study all at once.

Instead of storing the scheduling config in the deck or the model, we move the
scheduling into a separate config table, and link that to the groups table.
That way a user can have multiple groups that all share the same scheduling
information if they want.

And deletion tracking is now in a single table.
2011-04-28 09:23:28 +09:00
Damien Elmes
abd665e48f remove queue resetting from startup; we'll do it in deck close instead 2011-04-28 09:23:28 +09:00
Damien Elmes
2613143fe9 improve dynamic indices, implement new queue 2011-04-28 09:23:28 +09:00
Damien Elmes
d34a76d5a0 move deck config into json ala models
- limits are stored separately so we can access them quickly when checking
  deck counts
- data is used to store cssCache and hexCache; these may be refactored or go
  away in the future
2011-04-28 09:23:28 +09:00
Damien Elmes
b0b4074cbd start work on learn mode, change models, more
- model config is now stored as a json-serialized dict, which allows us to
  quickly gather the info and allows for adding extra options more easily in
  the future
- denormalize modelId into the cards table, so we can get the model scheduling
  information without having to hit the facts table
- remove position - since we will handle spacing differently we don't need a
  separate variable to due to define sort order
- remove lastInterval from cards; the new cram mode and review early shouldn't
  need it
- successive->streak
- add new columns for learn mode
- move cram mode into new file; learn more and review early need more thought
- initial work on learn mode
- initial unit tests
2011-04-28 09:23:28 +09:00
Damien Elmes
4e7e8b03bc moving scheduling code into separate file, some preliminary refactoring 2011-04-28 09:23:28 +09:00
Damien Elmes
8cbd3c9f3b change deck loading call 2011-04-28 09:23:28 +09:00
Damien Elmes
8a60ee0794 initial changes to models, deck, etc
- move most scheduling parameters from deck to models
- remove obsolete fields in deck and models
- decks->deck
- remove deck id reference in models
- move some deckVars into the deck table
- simplify deckstorage
- lock sessionhelper by default
- add models/currentModel as properties instead of ORM mappings
- remove models.tags
- remove remaining support for memory-backed databases
- use a blank string for syncName instead of null
- remove backup code; will handle in gui
- bump version to 100
- update unit tests
2011-04-28 09:23:28 +09:00
Damien Elmes
2d1d946504 refactor media
- created->modified
- size->refcnt
- originalPath->chksum
- remove description
2011-04-28 09:23:28 +09:00
Damien Elmes
edd8f79ab9 refactor facts table
- spaceUntil->cache
- remove obsolete lastCardId
2011-04-28 09:23:28 +09:00
Damien Elmes
d9c0fba171 refactor tags
- tags.tag -> tags.name
- priority reset to 0 for now; will be used differently in the future
- cardTags.id removed; (tagId, cardId) is the primary key now
- cardTags.src -> cardTags.type
2011-04-28 09:23:28 +09:00
Damien Elmes
80153c63cb forget old gravestones on schema change 2011-04-28 09:23:28 +09:00
Damien Elmes
467eb87a48 use dueCutoff, not current time for delay calculation 2011-04-28 09:23:28 +09:00
Damien Elmes
7547b395ea store revlog time in integer MS
using floats for the primary key causes sqlite to generate an extra index,
which is expensive for large histories
2011-04-28 09:23:28 +09:00
Damien Elmes
9aa2f8dc40 refactor cards
Cards had developed quite a lot of cruft from incremental changes, and a
number of important attributes were stored in names that had no bearing to
their actual use.

Added:

- position, which new cards will be sorted on in the future
- flags, which is reserved for future use

Renamed:

- type to queue
- relativeDelay to type
- noCount to lapses

Removed:

- all new/young/matureEase counts; the information is in the revlog
- firstAnswered, lastDue, lastFactor, averageTime and totalTime for the same
  reason
- isDue, spaceUntil and combinedDue, because they are no longer used. Spaced
  cards will be implemented differently in a coming commit.
- priority
- yesCount, because it can be inferred from reps & lapses
- tags; they've been stored in facts for a long time now

Also compatibility with deck versions less than 65 has been dropped, so decks
will need to be upgraded to 1.2 before they can be upgraded by the dev code.
All shared decks are on 1.2, so this should hopefully not be a problem.
2011-04-28 09:23:27 +09:00
Damien Elmes
f828393de3 rename deck.s to a more understable deck.db; keep s for compat 2011-04-28 09:21:07 +09:00
Damien Elmes
b9cf5ad85d fix timeForNewCard(), revlog sncing, priority index del 2011-04-28 09:21:07 +09:00
Damien Elmes
b6bb03025f new history table
- rename to revlog
- change the pk to time, as we want an index on time, and the old multi-column
  index was expensive and not useful
- remove yes/no count; they can be inferred from the ease
- remove lastFactor, as it's in the previous entry
- remove delay, it can be inferred from last entry
- remove 'next' from nextInterval and nextFactor
- rename 'thinkingTime' to 'userTime'
- rename reps to rep
- migrate old data to new table, and fix some problems in the process: ease0
  -> ease1, and limit thinking time to 60 seconds as it should have been
  previously
2011-04-28 09:21:07 +09:00
Damien Elmes
855de47ffe remove the stats table
The stats table was how the early non-SQL versions of Anki kept track of
statistics, before there was a revision log. It is being removed because:

- it's not possible to show the statistics for a subset of the deck
- it can't meaningfully be copied on import/export
- it makes it harder to implement sync merging

Implications:

- graphs and deck stats roughly 1.5-3x longer than before, but we'll have the
  ability to generate stats for subsections of the deck, and it's not time
  critical code
- people who've been using anki since the very early days may notice a drop in
  statistics, as early repetitions were recorded in the stats table but the
  revlog didn't exist at that point.
- due bugs in old syncs and imports/exports, the stats and revlog may not
  match numbers exactly

To remove it, the following changes have been made:

- the graphs and deck stats now generate their data entirely from the revlog
- there are no stats to keep track of how many cards we've answered, so we
  pull that information from the revlog in reset()
- we remove _globalStats and _dailyStats from the deck
- we check if a day rollover has occurred using failedCutoff instead
- we remove the getStats() routine
- the ETA code is currently disabled
- timeboxing routines use repsToday instead of stats
- remove stats delete from export
- remove stats table and index in upgrade
- remove stats syncing and globalStats refresh pre-sync
- remove stats count check in fullSync check, which was redundant anyway
- update unit tests

Also:

- newCountToday -> newCount, to bring it in line with revCount&failedCount
  which also reflect the currently due count
- newCount -> newAvail
- timeboxing routines renamed since the old names were confusingly similar to
  refreshSession() which does something different

Todo:

- update newSeenToday & repsToday when answering a card
- reimplement eta
2011-04-28 09:21:07 +09:00
Damien Elmes
9ce60d5e3a remove stats from graphs; use revlog 2011-04-28 09:21:07 +09:00
Damien Elmes
b837b92ef2 calculate correct counts via revlog 2011-04-28 09:21:07 +09:00
Damien Elmes
77029c4ee6 calculate # days studied using rev log instead 2011-04-28 09:21:07 +09:00
Damien Elmes
9421a037f6 remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
Damien Elmes
9f55c831c0 don't bother checking if temp suspended cards are modified or not 2011-04-28 09:21:07 +09:00
Damien Elmes
218f823037 default to dev server 2011-04-28 09:21:07 +09:00
Damien Elmes
1a09aa9f77 remove minimum average support
Calculating the average on startup is expensive on mobile devices. It might be
nice to provide it as a deck option or per-model setting in the future so that
people can specify how hard their material is and have it treated accordingly.
2011-04-28 09:21:06 +09:00
Damien Elmes
72a1cd73a9 move upgrade code into separate file 2011-04-28 09:21:06 +09:00
Damien Elmes
4302306fe9 use a checksum for field values; fixed import->update number
Previously we had an index on the value field, which was very expensive for
long fields. Instead we use a separate column and take the first 8 characters
of the field value's md5sum, and index that. In decks with lots of text in
fields, it can cut the deck size by 30% or more, and many decks improve by
10-20%. Decks with only a few characters in fields may increase in size
slightly, but this is offset by the fact that we only generate a checksum for
fields that have uniqueness checking on.

Also, fixed import->update reporting the total # of available facts instead of
the number of facts that were imported.
2011-04-28 09:21:06 +09:00
Damien Elmes
da48eb1e55 remove old relativeDelay compat fix in sync 2011-04-28 09:21:06 +09:00
Damien Elmes
feadce76f3 delete tombstones in integrity check as we can guarantee a full sync; optimize 2011-04-28 09:21:06 +09:00
Damien Elmes
1ddf1be747 abort the summary early if we're over the full sync threshold 2011-04-28 09:21:06 +09:00
Damien Elmes
d23a2bbe59 remove old alter table statements from long ago 2011-04-28 09:21:06 +09:00
Damien Elmes
a45dac36c4 remove some duplicate code in the upgrades 2011-04-28 09:21:06 +09:00
Damien Elmes
1a3c8c0c1e remove views and pre 0.9.9.8.6 upgrade code; upgrade test decks to 0.9.9.8.6 2011-04-28 09:21:06 +09:00
Damien Elmes
28604b9d29 remove priorities 2011-04-28 09:21:06 +09:00
Damien Elmes
73d83bc640 fixIntegrity() tweaks
- fix card ordinals too
- don't change modification time on cards, facts or models
- mark schema modified to force full sync
2011-04-28 09:21:06 +09:00
Damien Elmes
1b7ac91a2a force a full sync if there have been schema changes on either side 2011-04-28 09:21:06 +09:00
Damien Elmes
7c2b202163 timestamp schema changes 2011-04-28 09:21:06 +09:00
Damien Elmes
4bf334c6b3 strip some old code 2011-04-28 09:21:06 +09:00
Damien Elmes
1aafbd02f3 use env vars for host/port 2011-04-28 09:19:57 +09:00
Damien Elmes
f78abf2c34 bump version 2011-03-28 16:38:42 +09:00
Damien Elmes
c4e045463b set rd=2 in subscriptions 2011-03-04 14:32:17 +09:00
Damien Elmes
19a293cf74 don't return a negative delay for failed cards 2011-02-24 13:20:19 +09:00
Damien Elmes
5e23e168c0 bump version 2011-02-20 14:08:35 +09:00
Damien Elmes
0b82e1ab3a Merge branch 'master' of ../stable/lib 2011-02-20 13:47:56 +09:00
Damien Elmes
008c5904ca when calculating delay, compare against cutoff, not current time 2011-02-20 13:45:45 +09:00
Damien Elmes
c79db601c6 typo 2011-02-14 03:22:08 +09:00
Damien Elmes
e9ec7f3649 don't escape remote image links
thanks to mark (mhl) for the report
2011-02-14 03:13:16 +09:00
Damien Elmes
f156f81a84 don't add a mature bonus when cramming 2011-02-09 00:36:16 +09:00
Damien Elmes
8828027729 when calculating next interval ensure we don't have a negative delay 2011-02-09 00:23:45 +09:00
Damien Elmes
8a1df1728f rebuildTypes()
- ensure we're fixing relativeDelay for suspended cards
- remove priority compat code
2011-02-08 02:46:07 +09:00
Damien Elmes
07db17be88 off by one in relativeDelay sync code 2011-02-07 00:04:39 +09:00
Damien Elmes
ff38dad5b2 remove redundant code 2011-02-04 20:33:13 +09:00
Damien Elmes
1b027af439 bump version 2011-02-03 00:22:03 +09:00
Damien Elmes
340b5864c8 when deck is finished stop timeboxing timer 2011-02-03 00:18:42 +09:00
Damien Elmes
f3a336a4e4 when exporting a standard anki deck, don't put media in dropbox 2011-02-03 00:14:36 +09:00
Damien Elmes
b8e19d5506 don't copy media on export if disabled 2011-02-03 00:10:40 +09:00
Damien Elmes
1464394d58 when the day rolls over, update due cutoffs too, and rebuild queue 2011-02-02 23:52:34 +09:00
Damien Elmes
e49a9bb5ac relative sibling spacing for reviews
Anki 1.0 had a similar feature but we do things a bit differently now. The
relative spacing applies only to reviews, and spaces cards according to their
interval, instead of spacing all cards the same. Any delay < 1 full day is
treated as no delay, so with the default 10% setting, reviews with an interval
< 10 days are not spaced at all. This should hopefully cut down on support
queries for people wondering why many of their cards were delayed, allows the
two settings to be documented separately, and does away with the somewhat
confusing usage of non-integer new sibling values to disable review spacing.
2011-02-02 23:47:58 +09:00
Damien Elmes
66e44f494b don't update factor in cram, learn more, etc 2011-02-02 22:12:06 +09:00
Damien Elmes
338838583e more last interval preservation into cram scheduler code 2011-02-02 22:10:44 +09:00
Damien Elmes
09e6e1bd65 fix media db check freezing interface if no media folder 2011-02-02 22:04:12 +09:00
Damien Elmes
9bf850c701 don't allow & in filenames as qt tries to escape them in a string 2011-02-02 18:44:49 +09:00
Damien Elmes
80bb59024c utility for percent-escaping images 2011-02-02 18:36:58 +09:00
Damien Elmes
b426ad4271 fix html comments in translator's patch 2011-02-01 18:57:44 +09:00
Damien Elmes
04babfb102 if latex didn't run, prompt user to install 2011-01-31 13:00:11 +09:00
Damien Elmes
e0d5b9d69e never set lastSync=0 when toggling syncing
we should rely on needFullSync() to determine whether a full sync is actually
necessary.
2011-01-30 15:31:29 +09:00
Damien Elmes
d362decca2 Merge https://github.com/ymasory/libanki 2011-01-30 12:46:13 +09:00
Yuvi Masory
b0b9cd2ce3 suppress indentation 2011-01-29 22:40:29 -05:00
Damien Elmes
ab9451253c now all clients are updated, set delay1 = 0 if 600 2011-01-29 11:01:43 +09:00
Damien Elmes
eb0bb89f44 bump version 2011-01-27 08:13:10 +09:00
Damien Elmes
523adc468e allow user to disable review spacing 2011-01-27 07:45:45 +09:00
Damien Elmes
be8eec52bc make sure latex.py works indepent of gui 2011-01-26 15:06:51 +09:00
Damien Elmes
942307190e catch duplicate tags in upgrade 2011-01-26 15:04:32 +09:00
Damien Elmes
ed5a8b0e3e make sure created is reset 2011-01-26 14:36:45 +09:00
Damien Elmes
be3f32755e new option for tz reset without unpack 2011-01-26 14:32:53 +09:00
Damien Elmes
744cf3b16c don't create empty media folder in upgrade 2011-01-26 13:59:54 +09:00
Damien Elmes
6071f8e209 include latex in alt tags of generated image 2011-01-26 13:01:12 +09:00
Damien Elmes
b533c99375 typo in upgrade code 2011-01-24 09:07:47 +09:00
Damien Elmes
7a56e26be6 bump version 2011-01-22 07:36:10 +09:00
Damien Elmes
e042ef5e62 make the format upgrading smarter 2011-01-22 07:36:05 +09:00
Damien Elmes
c1d15b8a9e clearer message when facts missing after sync 2011-01-21 11:02:07 +09:00
Damien Elmes
6860bba0de ensure failed mature come at the start of the future day
- this fixes a state where cards failed on that future day could end up
  with an earlier due date that the rest of the failed mature cards, leading
  to the newly failed cards being repeated prematurely
- this leads to non-deterministic scheduling of the mature bonus fails, so
  they are effectively randomized which is probably what most users want
2011-01-21 09:36:04 +09:00
Damien Elmes
4859778d2c preserve old default card-level formatting 2011-01-21 06:41:34 +09:00
Damien Elmes
0e08092f65 disable callable replacement which isn't supported on older pythons 2011-01-20 05:32:30 +09:00
Damien Elmes
f945e60d6d when renaming fields, look for the non-space version instead 2011-01-19 05:17:39 +09:00
Damien Elmes
0fc662a919 don't try to delete normalized version 2011-01-19 02:34:13 +09:00
Damien Elmes
bd7f5787cc fix a bug with relativeDelay not being set on card answer 2011-01-19 01:18:27 +09:00
Damien Elmes
d57a371ca5 bump version 2011-01-18 04:33:16 +09:00
Damien Elmes
b8711fe853 fix win32 audio issue when temp dir has foreign chars 2011-01-18 02:22:55 +09:00
Damien Elmes
e55d4768a3 normalize for check, but not for db 2011-01-18 01:18:29 +09:00
Damien Elmes
98fb0f5bb9 apply selective study to review early 2011-01-17 01:36:19 +09:00
Damien Elmes
3d5a427f85 fix include&exclude tags case 2011-01-14 23:08:09 +09:00
Damien Elmes
0a9c498cbd fix media db check on non-unicode dir 2011-01-14 22:50:03 +09:00
Damien Elmes
276ec634b9 ignore new cards in hiddenCards() 2011-01-14 19:03:02 +09:00
Damien Elmes
f7a813831c don't error out if sound is missing on win32 2011-01-14 05:28:32 +09:00
Damien Elmes
ab5c1621e3 bump version 2011-01-14 02:54:53 +09:00
Damien Elmes
29a53b268f strip qt's rtl marker 2011-01-14 00:31:07 +09:00
Damien Elmes
31df2fac01 work around osx decomposing files on HFS+ partitions. sigh. 2011-01-13 23:32:25 +09:00
Damien Elmes
eec317bfc3 work around mplayer on win32 not handling foreign characters 2011-01-13 21:27:35 +09:00
Damien Elmes
149fbee33e fix new-style template replacement; support cond rendering 2011-01-13 20:00:35 +09:00
Damien Elmes
cdcde2f2d3 fix unicode warning when invalid template message given 2011-01-13 19:43:38 +09:00
Damien Elmes
9b7a55d964 remove some old indices 2011-01-13 19:21:40 +09:00
Damien Elmes
0b07707e68 make sure we don't try to send the queues when bundling deck 2011-01-13 07:55:39 +09:00
Damien Elmes
bef86bdbf3 make sure default font sizes are set on upgrade 2011-01-13 06:21:23 +09:00
Damien Elmes
5c0421b6e0 bump version 2011-01-13 05:54:41 +09:00
Damien Elmes
3fe6167d7f Revert "temp hack to prevent latex generation on ankiweb"
This reverts commit a334f839b8.

fixed on the server side now
2011-01-13 05:25:20 +09:00
Damien Elmes
fdd88080c8 work around ankidroid getbool bug 2011-01-13 05:25:05 +09:00
Damien Elmes
3f5befc2e7 don't alter lastSync on upgrade 2011-01-13 04:20:37 +09:00
Damien Elmes
a334f839b8 temp hack to prevent latex generation on ankiweb 2011-01-12 20:36:12 +09:00
Damien Elmes
175f3f0a0e bump version 2011-01-12 16:31:02 +09:00
Damien Elmes
46a441fc0b remove obsolete bulk fetching 2011-01-10 19:26:43 +09:00
Damien Elmes
c534362071 bump version 2011-01-10 19:02:33 +09:00
Damien Elmes
9af5d4d5ed apply limit to new card count 2011-01-10 18:58:59 +09:00
Damien Elmes
87ffbedf16 remove unused clause in earliestTime() 2011-01-09 15:23:09 +09:00
Damien Elmes
2ca1627add use cardLimit() in cardsDueBy(), not just earliestTime() 2011-01-09 15:13:33 +09:00
Damien Elmes
82231a71b2 bump version 2011-01-07 21:43:13 +09:00
Damien Elmes
7cb17e6e8d restart mplayer if it's died 2011-01-07 21:42:24 +09:00
Damien Elmes
2ca27d389f fix local syncing 2011-01-07 13:35:15 +09:00
Damien Elmes
2e2d93649e bump version 2011-01-06 14:24:30 +09:00
Damien Elmes
1f34abc003 more fixes for skewed clocks
if a client with a clock greater than server time synced a deck, the modified
time ended up higher than lastSync when the deck was modified on the server.
instead we force the modified time to be <= the server time, which is known
correct.
2011-01-04 15:51:24 +09:00
Damien Elmes
d717be8849 move to a thread event to fix race condition
The old conditional objects had a problem where the calling code was
notifyAll()ing before the helper threads had started waiting.
2011-01-04 12:32:33 +09:00
Damien Elmes
3a7f8fdc7a change win32 mplayer testing location 2011-01-04 11:59:24 +09:00
Damien Elmes
33cbbdc368 bump version number 2011-01-03 13:46:27 +09:00
Damien Elmes
5a9c75dfe4 don't stop audio playing on clear 2011-01-03 13:01:05 +09:00
Damien Elmes
a4df210667 add group_concat compat code from wm port 2011-01-02 22:17:34 +09:00
Damien Elmes
545c2cddcd bump version 2011-01-02 19:25:27 +09:00
Damien Elmes
b235461d8b space cards to next session if per-day off 2011-01-02 17:43:53 +09:00
Damien Elmes
b45f071581 option to limit graphs to selective study 2011-01-02 17:36:11 +09:00
Damien Elmes
329ab99ff7 add seen card count back for plugins 2011-01-02 13:05:18 +09:00
Damien Elmes
d56bddea2d refactor sound code
this addresses a bug where mplayer was sometimes not being restarted when
opening a new deck, and should remove the need for atexit or hacks in the GUI
code to make sure mplayer is closed
2010-12-28 03:53:30 +09:00
Damien Elmes
ece9b2eccd don't limit failed cards to 0 when cramming 2010-12-27 21:39:20 +09:00
Damien Elmes
a18abb0f97 add timestamp to recording files 2010-12-27 04:32:25 +09:00
Damien Elmes
6f10c588f6 bump version number 2010-12-27 03:01:39 +09:00
Damien Elmes
a2606dd70a remove some unused calls 2010-12-26 07:35:20 +09:00
Damien Elmes
9890c77514 update finished screen to use blanket inactive/suspended msg 2010-12-26 07:29:31 +09:00
Damien Elmes
856839e055 include reviews in spaced card count; bold text 2010-12-26 06:01:24 +09:00
Damien Elmes
63106578cd don't decrement due counts when spacing
This works fine if the user is showing all cards, but if they have limited
reviews to certain categories, it can result in the counts going negative
because we decremented for cards which weren't actually due. Determining if a
card was actually due or not is an expensive operation, so instead we leave
the counts alone and make sure reviews will finish early if the new/rev counts
are non-zero but the queue is empty.
2010-12-26 05:54:05 +09:00
Damien Elmes
93a67931da bump version number 2010-12-25 12:49:31 +09:00
Damien Elmes
ff5bc72121 pass in a 0 timediff if using stock sync() 2010-12-25 12:43:35 +09:00
Damien Elmes
f0bf1989bc new code to download remote links and replace with local ones 2010-12-25 12:42:28 +09:00
Damien Elmes
50622a3127 encode latex after everything else 2010-12-22 08:06:44 +09:00
Damien Elmes
61812b173d mention syncing disabled case 2010-12-21 23:58:36 +09:00
Damien Elmes
ee7da2bd65 update comment 2010-12-21 06:41:42 +09:00
Damien Elmes
afa34d9d39 bump version 2010-12-21 01:45:17 +09:00
Damien Elmes
425789535f don't trim whitespace in sections 2010-12-20 00:37:16 +09:00
Damien Elmes
5c4d7b1789 don't include http/ftp links in media db 2010-12-17 21:29:48 +09:00
Damien Elmes
7c45bab35a rate-limit sync progress messages for win32 installs with huge net bufs 2010-12-17 21:04:47 +09:00
Damien Elmes
ca07cb8f26 don't dump upgrade notices on stderr if not attached to gui 2010-12-17 04:27:12 +09:00
Damien Elmes
400ca9a8a2 factor in time difference when determining common point 2010-12-17 03:55:04 +09:00
Damien Elmes
6860f64f28 try to recover tags of card, too 2010-12-17 02:03:35 +09:00
Damien Elmes
1b219679b6 bump version 2010-12-17 01:48:01 +09:00
Damien Elmes
5eb00296d5 always space rev cards to the next day 2010-12-17 01:46:14 +09:00
Damien Elmes
7065abcf4f only collapse failed cards after cutoff updated 2010-12-16 22:23:51 +09:00
Damien Elmes
e4447818ff make sure learn more considers inactive cards 2010-12-16 04:28:31 +09:00
Damien Elmes
acb72327b2 don't leave stale entries in media db if just scanning 2010-12-16 01:42:12 +09:00
Damien Elmes
4e5b725166 and make sure xhtml syntax works too 2010-12-16 01:22:23 +09:00
Damien Elmes
2a629a179d add missing trailing > to img regexp 2010-12-16 01:12:45 +09:00
Damien Elmes
907fa5c80e tweak spaceCards() 2010-12-15 04:46:40 +09:00
Damien Elmes
d2e3d7932d bump version 2010-12-15 03:53:02 +09:00
Damien Elmes
0363cc70f4 preserve more of the old formatting on upgrade
because field formatting is always on now, users with custom font
sizes/families set only on the card will still have to alter their templates
and either configure the fields or replace the references with triple
curly braces
2010-12-15 03:52:18 +09:00
Damien Elmes
09b017bb24 not sorting on combinedDue anymore, so don't bother with that upgrade step 2010-12-15 02:03:12 +09:00
Damien Elmes
9ed9ec79cc make them case-insensitive too 2010-12-13 06:56:04 +09:00
Damien Elmes
525f44c9c5 more robust img regexp 2010-12-13 06:54:40 +09:00
Damien Elmes
7ce661ac63 place cards with corrupt/missing facts into new fact instead of deleting 2010-12-13 06:46:20 +09:00
Damien Elmes
154bf0cef4 bump version 2010-12-13 04:09:55 +09:00
Damien Elmes
0a01d9f867 make latex preamble easier to read 2010-12-13 03:21:05 +09:00
Damien Elmes
d0c6db0d62 only regenerate indices once during upgrade from 1.0 2010-12-13 02:29:21 +09:00
Damien Elmes
d14761b428 sort new cards by due not combinedDue; index optimizations
- ensure queue filling selects can be satisfied by index alone
- sort by due instead of combinedDue so we can decouple card order from
  new spacing
2010-12-13 02:25:39 +09:00
Damien Elmes
5de6bb57ed auto-analyze when we've updated a dynamic index 2010-12-13 00:26:34 +09:00
Damien Elmes
902800de99 answers exceeding 60 seconds now log the full 60 instead of 0 2010-12-12 02:00:06 +09:00
Damien Elmes
cc8dbccf38 don't set combinedDue twice in answerCard 2010-12-12 00:09:40 +09:00
Damien Elmes
49b744f77d limit plugin warning to once a session 2010-12-11 22:04:24 +09:00
Damien Elmes
98597dd56d bump version 2010-12-11 22:01:07 +09:00
Damien Elmes
58b20b0626 make sure subprocess is available so we can set startupinfo 2010-12-11 18:36:01 +09:00
Damien Elmes
7ab5a53e38 remove superfluous 0 2010-12-11 17:02:51 +09:00
Damien Elmes
98304accb0 return actual checksum, or sqlite tries to treat it like an int 2010-12-11 16:30:26 +09:00
Damien Elmes
35fd3de6fb reset if there were buried cards, since updatePriorities() doesn't 2010-12-11 15:55:22 +09:00
Damien Elmes
59df94ff74 add compat code for fact.setModified() 2010-12-11 12:54:30 +09:00
Damien Elmes
9f276e3163 bump version 2010-12-11 02:33:25 +09:00
Damien Elmes
e3838464a2 use rec instead of tmp for recording name 2010-12-11 02:20:36 +09:00
Damien Elmes
f42a2e4a00 rebuild q/a cache to include latex 2010-12-11 02:17:00 +09:00
Damien Elmes
7a196b3747 don't bother to return used media 2010-12-11 02:13:37 +09:00
Damien Elmes
70eb44bce2 latex improvements
- move latex preamble into a deck var and include amsmath by default
- include the pre/postamble in the hash, so changes to the preamble result in
  newly generated images
2010-12-11 02:05:00 +09:00
Damien Elmes
b0f300bb74 fix latex generation bug caused my mediaDir() always chdiring now 2010-12-11 01:46:29 +09:00
Damien Elmes
4d2d9eab81 generate latex at fact modification, not review
- latex now slots in to the formatQA hook to render images in the q/a
- moved call() to utils
- cache/uncache latex have been obsoleted. User can delete manually, and
  images will be regenerated with a DB check
2010-12-11 01:40:49 +09:00
Damien Elmes
0c9672e7b8 rewrite media support
- media is no longer hashed, and instead stored in the db using its original
  name
- when adding media, its checksum is calculated and used to look for
  duplicates
- duplicate filenames will result in a number tacked on the file
- the size column is used to count card references to media. If media is
  referenced in a fact but not the question or answer, the count will be zero.
- there is no guarantee media will be listed in the media db if it is unused
  on the question & answer
- if rebuildMediaDir(delete=True), then entries with zero references are
  deleted, along with any unused files in the media dir.
- rebuildMediaDir() will update the internal checksums, and set the checksum
  to "" if a file can't be found
- rebuildMediaDir() is a lot less destructive now, and will leave alone
  directories it finds in the media folder (but not look in them either)
- rebuildMediaDir() returns more information about the state of media now
- the online and mobile clients will need to to make sure that when
  downloading media, entries with no checksum are non-fatal and should not
  abort the download process.
- the ref count is updated every time the q/a is updated - so the db should be
  up to date after every add/edit/import
- since we look for media on the q/a now, card templates like '<img
  src="{{{field}}}">' will work now
- export original files as gone as it is not needed anymore
- move from per-model media URL to deckVar. downloadMissingMedia() uses this
  now. Deck subscriptions will have to be updated to share media another way.
- pass deck in formatQA, as latex support is going to change
2010-12-11 01:19:31 +09:00
Damien Elmes
75da977026 bump version 2010-12-09 18:01:16 +09:00
Damien Elmes
27ca04fab6 support a media prefix 2010-12-09 15:34:01 +09:00
Damien Elmes
84a98550f0 always change cwd to media dir 2010-12-09 12:55:00 +09:00
Damien Elmes
1bbffec0d6 abort download missing media early; remove obsolete forceMediaDir 2010-12-09 12:53:01 +09:00
Damien Elmes
e5d9697d28 don't break older clients with new delay1 setting 2010-12-09 12:00:00 +09:00
Damien Elmes
cdac2bf8d7 workaround card ordering bug from older versions 2010-12-09 10:43:45 +09:00
Damien Elmes
7fc593a2ce fix tag update 2010-12-08 17:05:19 +09:00
Damien Elmes
3491a5e378 add an index for modified to speed up sync.summary()
testing indicates this can produce a 2x performance improvement on lastSync=0,
and much more for partial syncs
2010-12-08 15:59:16 +09:00
Damien Elmes
fe97616ecd add temporary index for priority 2010-12-08 15:38:06 +09:00
Damien Elmes
05f60c49c8 add rebuild arg for minimal startup
this bypasses rebuilding the queue and other startup initialization and thus
loads the deck considerably faster. This is useful when you want to perform
operations on the deck like syncing, but don't need the ability to review
cards
2010-12-08 15:28:28 +09:00
Damien Elmes
878c9abb83 bump version 2010-12-07 18:04:53 +09:00
Damien Elmes
9f91e904b2 re-enable locked check 2010-12-07 17:18:17 +09:00
Damien Elmes
1a5c8d2435 fix from marcus for "field":value search 2010-12-07 17:13:25 +09:00
Damien Elmes
0194296839 failed cards at end if !delay0 && !failedCardMax 2010-12-07 16:55:03 +09:00
Damien Elmes
a383223e02 provide more info in sync error messages; catch zlib decode errors 2010-12-07 16:48:49 +09:00
Damien Elmes
2013e7e4ff conditional delete of css 2010-12-07 14:35:16 +09:00
Damien Elmes
15763f8f3c make sure we don't commit during a sync
updateDynamicIndices() is done on next deck load anyway
2010-12-07 11:59:02 +09:00
Damien Elmes
039af66a9d don't rebuild counts in applyPayload(), as the deck will be reopened 2010-12-07 11:56:43 +09:00
Damien Elmes
4c8f2d3b47 add finish() command to sync protocol 2010-12-07 11:02:23 +09:00
Damien Elmes
0af8da9cb8 sync updates
- set lastSync on successful upload, not before it
- make sure source file is closed
- use v2 sync protocol
2010-12-07 09:20:31 +09:00
Damien Elmes
da97701b2d disable lastSync fudging again 2010-12-07 09:19:09 +09:00
Damien Elmes
2a8ef89ee5 remove unused binding 2010-12-07 07:26:33 +09:00
Damien Elmes
a2cd19f49a tell users how they can disable the move check 2010-12-05 17:43:54 +09:00
Damien Elmes
458357548f more sqlalchemy workarounds 2010-12-02 23:38:06 +09:00
Damien Elmes
a23098c92c bump version 2010-12-02 09:55:06 +09:00
Damien Elmes
9259718fd5 set syncName after full download 2010-12-02 07:23:54 +09:00
Damien Elmes
7dd57887d0 update learn more for new spacing 2010-12-02 06:48:45 +09:00
Damien Elmes
b5dd8a9f4b update cram code for new spacing 2010-12-02 06:47:16 +09:00
Damien Elmes
bac4acdaa8 reworked handling of spaced cards; add cms argument to previewFact()
- obsolete spaceUntil - it serves no useful purpose
- the old per-model spacing variables are obsolete, as the new approach
  requires uniform spacing across all models for new cards
- introduce a new per-deck variable: newSpacing
- don't fill new queue if we've done today's cards
- still need to check cramming / review early

newSpacing is a time in seconds to delay introduction of sibling new cards.
It can be applied as many times as necessary as there is no harm in new cards
being delayed repeatedly. Because the default queue length is 200 and it can
take quite some time for the spaced cards to be placed in the queue again, we
use a separate array to track spaced new cards provided the configured delay
is less than 20 minutes. At times under 20 minutes this number is not a
guaranteed minimum spacing - if the new card queue is empty the spaced cards
will be flushed before checking the new queue again, as otherwise we end up
trying to fill on every repetition. The due counts no longer decrease by more
than one if the spacing is less than the due cutoff, since that confused some
users.

Review cards are now placed at the end of the current review queue, and will
never be rescheduled to a different day. The old approach had a number of
problems:

- the more card models you had, the more likely a card would be spaced
  multiple times, resulting in you forgetting the card before you get a chance
  to review it
- spacing was applied even if the due card was already late
- repeatedly failing one card over a period of days or weeks would also stave
  the other cards of attention
2010-12-02 06:33:40 +09:00
Damien Elmes
53fbc9b3ee if spacing is disabled, don't decrement counts 2010-12-01 02:54:21 +09:00
Damien Elmes
bb901dfa16 make sure all fields have a font set 2010-12-01 02:42:13 +09:00
Damien Elmes
9fed5e2bc1 work around sqlalchemy problem 2010-12-01 01:21:05 +09:00
Damien Elmes
2352502807 bump version 2010-11-30 03:35:45 +09:00
Damien Elmes
ae388595da add whitespace preservation flag; only show active card models when previewing 2010-11-30 03:28:08 +09:00
Damien Elmes
a5af8fb8e9 convert pystache to private library since it doesn't behave like upstream 2010-11-29 22:51:55 +09:00
Damien Elmes
da1cfa52b1 mention editFontFamily unused 2010-11-29 22:33:05 +09:00
Damien Elmes
b349a96fa5 drop most of the per-card formatting 2010-11-29 22:27:19 +09:00
Damien Elmes
74a0998a36 bump version 2010-11-28 18:21:00 +09:00
Damien Elmes
255deb9e9e elaborate on debug msg 2010-11-28 18:14:09 +09:00
Damien Elmes
689a744266 bump version 2010-11-28 02:32:59 +09:00
Damien Elmes
850d883ab4 update rest of code to recognize&use new rendering 2010-11-28 02:26:53 +09:00
Damien Elmes
ac8f613aca use pystache for template rendering; autoconvert old style for now 2010-11-28 02:06:54 +09:00
Damien Elmes
f247133ed8 make syncName work with foreign chars 2010-11-27 13:14:16 +09:00
Damien Elmes
ca9aeaa086 don't allow mature delay over a week for now; fix delay being reset to 0 2010-11-26 23:35:26 +09:00
Damien Elmes
386de21f87 don't fudge matplotlib path on win32 2010-11-26 21:59:09 +09:00
Damien Elmes
e58d7f8dac bump version 2010-11-26 04:20:40 +09:00
Damien Elmes
84b99b1ae5 don't allow tags to be prefixed with a colon, as this breaks sqlite 2010-11-26 03:49:01 +09:00
Damien Elmes
3aa787a146 remove print statement 2010-11-26 03:39:58 +09:00
Damien Elmes
00087ed101 find duplicates support 2010-11-26 03:26:02 +09:00
Damien Elmes
d539018137 support multiple facts in fid: query 2010-11-26 03:25:32 +09:00
Damien Elmes
367143f4f3 make sure to set cards as not due when resetting/rescheduling for old clients 2010-11-26 01:49:10 +09:00
Damien Elmes
f4a35e9b03 support tags: at the top of file to import; fix comment stripping 2010-11-26 01:48:54 +09:00
Damien Elmes
e3dd736460 add ability to update fields when importing 2010-11-26 01:36:24 +09:00
Damien Elmes
dd00d1a5e1 when rebuilding tag priorities, don't include obsolote suspended 2010-11-25 21:56:08 +09:00
Damien Elmes
8f18299cc5 typo 2010-11-24 05:39:06 +09:00
Damien Elmes
f698481c19 don't keep changing the hard interval on load
only adjust it if it looks like the defaults haven't been changed
2010-11-24 05:32:09 +09:00
Damien Elmes
6bdca8b3c6 fix available card limiting when using %(tags)s, %(cardModel), etc 2010-11-24 05:14:07 +09:00
Damien Elmes
45dfc97e9f add axis labels to graphs
note that due to limitations in the graphing library, these can't be
translated at the moment.
2010-11-24 05:09:00 +09:00
Damien Elmes
33567edb3e numerous graph changes
- use bar graphs instead of line graphs for 3 months or less
- easier to read shades of blue for reps graph
- simplify day cutoff calculation
- fix off by one bug in work done data
- add missing entries when calculating cumulative due
2010-11-24 04:30:55 +09:00
Damien Elmes
7491cfc521 new syncName handling
- the local deck name must now match the online deck
- syncName is a hash of the current deck's path or None
- the hash is checked on deck load, and if it is different (because the deck
  was copied or moved), syncing is disabled. This should prevent people from
  accidentally clobbering their online decks
2010-11-23 23:12:34 +09:00
Damien Elmes
6ec898ca4b Require explicit reset for most queue-modifying functions
When you call operations like deleteCards(), suspendCards() and so on, it is
now necessary to call deck.reset() afterwards. This allows the calling code to
delay a reset if necessary. If the calling code calls a function that says the
caller must reset, the caller should be sure to call .reset() and fetch the
current card again. Failure to do the latter will result in answerCard()
attempting to remove the card from the queue, when the queue has been cleared.
2010-11-23 17:41:36 +09:00
Damien Elmes
943c9a0e5f make sure the finished message displays cards due tomorrow 2010-11-23 15:33:54 +09:00
Damien Elmes
03503cd9b9 fix cram from ids case 2010-11-22 08:09:20 +09:00
Damien Elmes
b03f30c279 no need to adjust hardInterval in upgrade; handled in deck open 2010-11-21 14:24:46 +09:00
Damien Elmes
76135dc8be updated failed card handling when cramming
- temp suspend all answered cards, regardless of type
- fails influence the standard scheduling too
2010-11-21 13:39:28 +09:00
Damien Elmes
37e269ab81 bump version for coming development release 2010-11-21 12:58:14 +09:00
Damien Elmes
937d6a6513 update earliestTime() for new failed cards handling 2010-11-21 12:32:58 +09:00
Damien Elmes
b4493f0ec8 user may set young delay to more than a day 2010-11-21 12:25:54 +09:00
Damien Elmes
8e9d14a0fd avoid passing the second fade argument, as it seems to be more robust 2010-11-16 18:04:04 +09:00
Damien Elmes
c2f2225b7f update combinedDue for the current card object, not just for the db 2010-11-16 11:27:27 +09:00
Damien Elmes
0afec850c0 on second thought, avoid suspended cards or this will bite us in the future 2010-11-15 14:29:52 +09:00
Damien Elmes
1cd5125d4e remove the rest of the obsolote rebuildTypes() code 2010-11-15 14:27:52 +09:00
Damien Elmes
26470c997e remove unused where clause from rebuildTypes() 2010-11-15 14:07:13 +09:00
Damien Elmes
6d2e32e2df finished message should use cutoff + 24hrs 2010-11-14 08:16:07 +09:00
Damien Elmes
6f8a5d6a24 fix wrong priority code in rebuildTypes() 2010-11-14 08:11:28 +09:00
Damien Elmes
aa753d35a5 don't include suspended cards in graphs 2010-11-14 07:37:51 +09:00
Damien Elmes
1f8adc791a a few failed cards related fixes
- make sure cardLimit() matches on sql statements that are broken over lines
- fix logic in getCardId()
- don't increment failed count if delay1>0 and card was mature
2010-11-13 21:39:52 +09:00
Damien Elmes
7502fba5ce change failed card handling
The old delay1 behaviour isn't easy to achieve with the queue code, as we only
refresh the queue when it's emptied, and if the user has delay1 set to say 9
hours, failed mature cards sitting in the queue could prevent subsequent young
failures from being displayed. Instead we convert delay1 to a count in days in
which to offset failed mature cards. 0 means the same time as delay0, 1 means
show the card a day later, and so on. This means users will lose the ability
to delay mature cards for x number of minutes more than young cards, but a
scan of AnkiOnline decks indicates that's not often done.

We also need to use a separate cutoff for failed cards, since we need to be
able to display them as they expire if the user has disabled per-day
scheduling.

And instead of marking cards as due in the future, we set their due time to
the current time, and move the delay0 calculation to getCardId(). This means
that if the user changes their failed card settings from say 1 hour to 10
minutes, the changes apply to the currently failed cards and not just cards
failed in the future.
2010-11-13 21:15:41 +09:00
Damien Elmes
b69fd48768 more type handling updates; don't munge counts on sync
In various parts of the code we need to get all cards of a given category
(new, failed, etc) regardless of whether they're suspended, buried, etc. So we
store the true type in the obsolete relativeDelay column and add in index for
it, because it's cheaper than putting indices on reps & successive.
2010-11-13 18:39:24 +09:00
Damien Elmes
268d2645fd delete cards that have the wrong card model 2010-11-13 16:33:39 +09:00
Damien Elmes
274017036a add sanity limits to cutoff calculation 2010-11-13 12:00:01 +09:00
Damien Elmes
4a35dbe6b2 python2.7/win32 fix for latex 2010-11-12 13:05:43 +09:00
Damien Elmes
919353c57d only require due to be past cutoff if the card was passed 2010-11-12 12:51:53 +09:00
Damien Elmes
3a7f343464 fix typo - been writing too much javascript lately! 2010-11-12 12:50:07 +09:00
Damien Elmes
1b411938bf add inactive argument to cramCardTags() so it performs like standard 2010-11-12 12:49:30 +09:00
Damien Elmes
6ed0bc91bb update sync url 2010-11-08 09:22:36 +09:00
Damien Elmes
9d6b0f35f4 ensure cards are scheduled past cutoff, more
- because the cutoff adds a few hours past midnight, it's possible for a card
  that's scheduled for 1.0 days ahead to fall within the current cutoff, so we
  need to make sure that doesn't happen
- set spaceUntil=0 when answering card again
- fix randomizeNewCards() query. the whole codebase needs auditing for type
  references which need updating
2010-11-07 06:48:35 +09:00
Damien Elmes
61610d8351 adjust some queries so sqlite uses the correct index 2010-11-06 08:57:47 +09:00
Damien Elmes
e0d46f0f12 be resilient if spaceUntil sent wrong 2010-11-06 07:50:05 +09:00
Damien Elmes
328a1a86a4 make sure we reset rev early cards too on deck load 2010-11-06 06:03:34 +09:00
Damien Elmes
172505a707 fix broken card type calculation in error msg 2010-11-05 02:40:30 +09:00
Damien Elmes
4c50729946 temp debug info for requeueCard() 2010-11-04 02:32:37 +09:00
Damien Elmes
b766a9164e fix thinko in previous answerCard() update 2010-11-04 02:28:08 +09:00
Damien Elmes
4524fd84fe collapse spacing when cramming 2010-11-04 02:23:15 +09:00
Damien Elmes
cc12c8c573 need to rebuild counts when cutoff updated 2010-11-04 01:51:16 +09:00
Damien Elmes
0535f0561c redundant code in answerCard() 2010-11-03 23:45:44 +09:00
Damien Elmes
3f3f797348 don't space failed cards; make sure card type is calculated after stats update 2010-11-03 00:29:56 +09:00
Damien Elmes
46790f2e92 remove (incorrect) code in sync, is covered on deck load anyway 2010-11-02 22:34:10 +09:00
Damien Elmes
a68334220a fix suspensions 2010-11-02 22:30:57 +09:00
Damien Elmes
73119c93cf restore inactive tags with a more efficient query 2010-11-02 02:33:13 +09:00
Damien Elmes
37c15a320e make sure we don't fail if attempting to reset revearly cards before upgrade 2010-11-02 02:04:54 +09:00
Damien Elmes
2c5ac66083 type/priority changes, cram/rev early refactor, more
* Adjust type to remove cards from the queues, so we don't have to rebuild
  priorities to restore them:

Type -= 3 when suspending
Type += 3 when burying
Type += 6 when cramming / reviewing early

We still need to adjust priorities for backwards compatibility, but this can
be removed in the future.

* Factor out scheduler-specific code in answerCard(), so the different
  schedulers are now fully modular

* Differentiate between a card's current queue and its type

* Make sure dueCutoff cuts off at the chosen offset instead of midnight
2010-11-02 01:59:20 +09:00
Damien Elmes
785ddc3786 make sure to set card limit on scheduler change 2010-10-31 18:59:49 +09:00
Damien Elmes
ce82861357 make sure to update field cache when adding fact 2010-10-31 18:17:49 +09:00
Damien Elmes
c4a1f807ec update cram for new cardActive() handling 2010-10-31 18:12:16 +09:00
Damien Elmes
cc8f619458 remove support for inactive tags
Unlike active tags, they are not able to be implemented efficiently, and they
duplicate the functionality of manually suspending cards
2010-10-29 21:31:40 +09:00
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
34d6efe1df marcus: handle html entities properly when stripping html 2010-10-27 20:12:00 +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
ea3bf14019 if using no points of precision, take the floor 2010-10-26 12:54:58 +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
1f20442921 require dingsbums decks to use a different name so we don't conflict 2010-10-24 13:26:51 +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
d1f1f914ad python2.7 win32 compat fix 2010-10-23 13:58:03 +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
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
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
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
Damien Elmes
8a28df1a80 patch from Piotr Kubowicz, fix some translations 2010-02-22 17:07:46 +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
7c8e612704 use a constant for chunk size 2010-02-18 17:36:54 +09:00
Damien Elmes
4769bfa7a5 another hack for w32's low timer resolution 2010-02-12 16:03:48 +09:00
Damien Elmes
6857233eef bump version 2010-02-12 14:40:45 +09:00
Damien Elmes
4a1dd99cc9 bump version 2010-02-09 01:55:01 +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
715c82aba9 remove debugging line in exporting 2010-02-09 01:31:05 +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
582a9dd290 don't create empty tags on export 2010-02-05 12:27:32 +09:00
Damien Elmes
187caa874b make sure to remove deck if exists before exporting into it 2010-02-02 00:28:15 +09:00
Damien Elmes
04ba9c9a4e strip elements out of range in review time graph 2010-02-01 07:16:40 +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
3106ecd80d change location of matplotlibrc file in frozen distrib 2010-02-01 04:44:39 +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
095ac330b5 fix first-time latex generation in a deck with no media dir 2010-02-01 03:33:13 +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
863d3d8319 add stripMedia() 2010-01-29 20:20:00 +09:00
Damien Elmes
ec263d0d63 if there is a period, always use the plural 2010-01-29 20:05:04 +09:00
Damien Elmes
9172c9b697 remove obsolete time span pair code 2010-01-29 19:28:38 +09:00
Damien Elmes
c90828349c remove obsolete reference to card tags, don't store card tags on import 2010-01-23 10:59:40 +09:00
Damien Elmes
ea2fa24fed add progress info to card/fact export 2010-01-23 10:51:02 +09:00
Damien Elmes
b4f1d6622a use html parser on text export instead of fragile regex 2010-01-23 08:13:43 +09:00
Damien Elmes
28ff71a031 fix dingsbums tests 2010-01-23 06:42:02 +09:00
Damien Elmes
1ae05a8bc7 limit auto-detected delimiter to a known-good set 2010-01-23 06:00:06 +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
bf35112bd0 improve latex error message 2010-01-12 04:38:44 +09:00
Damien Elmes
c7340edd6f strip html for text: fields 2010-01-08 22:02:16 +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
33ec7ce133 clarify comment 2009-12-02 03:38:46 +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
d44cbd5518 remove logging hack 2009-11-30 08:11:34 +09:00
Damien Elmes
e2f306ae3b fix cards/day amount 2009-11-29 19:47:53 +09:00
Damien Elmes
84b88507a2 tweak importing message 2009-11-27 19:53:24 +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
17630fa339 close text file after import 2009-11-27 15:27:01 +09:00
Damien Elmes
a50ec2649a fix undo of deck properties bug 2009-11-27 15:26:03 +09:00
Damien Elmes
093395b9e0 Revert "add 30 second timeout to all sync ops"
This reverts commit cbc23e5231.
2009-11-24 23:35:34 +09:00
Damien Elmes
feaedccc9a fix field ordinals on db check 2009-11-19 13:07:43 +09:00
Damien Elmes
c3833a6a10 quote loadfile cmd 2009-11-08 14:47:17 +09:00
Rick Gruber-Riemer
4971069856 Added importing for DingsBums?! decks 2009-11-08 14:39:09 +09:00
Damien Elmes
7e2fd90963 Merge git://github.com/jmazon/libanki 2009-10-31 15:50:56 +09:00
Jean-Baptiste Mazon
fe19dd806d rewrite field names as tags when importing with tagDuplicates 2009-10-31 00:35:46 +01:00
Damien Elmes
9671d15371 rewrite expression to be clearer 2009-10-25 19:48:28 +09:00
Damien Elmes
cbc23e5231 add 30 second timeout to all sync ops 2009-10-04 19:53:12 +09:00
Damien Elmes
164b0583c3 unlink tmp file after full up 2009-10-04 19:33:18 +09:00
Damien Elmes
4e83a67e00 lowercase is:foo searches 2009-10-04 19:30:21 +09:00
Damien Elmes
7d8904a65d factor spacing into due time 2009-10-01 20:17:31 +09:00
Damien Elmes
9f182b4d61 new stats 2009-10-01 17:44:43 +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
76376d9040 move the simple player code into a plugin 2009-09-26 23:05:30 +09:00
Damien Elmes
ebac830248 don't define MATPLOTLIBDATA on osx 2009-09-26 20:54:08 +09:00
Damien Elmes
faea67e14b add primitive player back, and fall back to it on osx 10.3 2009-09-26 08:57:36 +09:00
Damien Elmes
1906741e11 give a more intuitive error when trying to import utf16 2009-09-26 06:02:25 +09:00
Damien Elmes
75f56d13e2 decrease chunk size to 32k due to crappy win32 network cards 2009-09-26 05:51:22 +09:00
Damien Elmes
11c1e7799b use relative paths in latex as the path may contain foreign chars 2009-09-26 05:47:52 +09:00
Damien Elmes
e687b1d033 don't translate graphs, as agg can't cope 2009-09-26 05:14:16 +09:00
Damien Elmes
029390f73b mark version as snapshot 2009-09-26 04:21:50 +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
d02c1fb70a add nullpool to db, crop newlines in logs 2009-09-21 20:41:58 +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
03ae1d6ca7 patch from saturnien to make mp3 encoding optional 2009-09-06 17:16:02 +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
52be4b059d make short times i18n 2009-08-17 06:52:14 +09:00
Damien Elmes
8bc7e0c945 enforce ordinal ordering when importing 2009-08-17 05:05:50 +09:00
Damien Elmes
c33c6318b2 handle text:field in rename & delete 2009-08-17 04:53:29 +09:00
Damien Elmes
1006943d8e SuperMemo import fix from Petr
Fix supermemo import of Q&A part in escaped html. Supermemo 2004/2006 export
can contain unescaped chars > or < that confuse beautifulsoap library. Switch
autocreation of tags from all titles to True.
2009-07-26 12:38:36 +09:00
Damien Elmes
4be3de322c tweak pyaudio error message 2009-07-18 18:11:57 +09:00
Damien Elmes
d96b46887e make stat formatting consistent 2009-07-18 18:09:52 +09:00
Damien Elmes
b80fc40aee lazy-load beautifulsoup 2009-07-10 00:37:06 +09:00
Damien Elmes
2f2487e5b8 increase 5 year max scheduling time to 100 years 2009-07-09 23:07:38 +09:00
Damien Elmes
fe99ff7518 add supermemo importer from Petr Michalec 2009-07-09 23:03:23 +09:00
Damien Elmes
fdb9327864 fix locking in ubuntu 2009-07-08 14:38:40 +09:00
Damien Elmes
13a14e498c increase mod in delete 2009-07-08 12:29:09 +09:00
Damien Elmes
50103693d1 add progress to cache/uncache 2009-07-08 12:28:48 +09:00
Damien Elmes
95d6ba64ab fix uncache latex 2009-07-08 12:24:25 +09:00
Damien Elmes
6f27ae52cc revert to old style file-only latex handling 2009-07-08 12:20:56 +09:00
Damien Elmes
0011489220 improve error message when utf16 file passed in 2009-07-06 21:26:46 +09:00
Damien Elmes
b4a330a946 add hook for deck stats 2009-07-05 16:53:12 +09:00
Damien Elmes
7612259a72 add card ease stats 2009-07-05 16:41:18 +09:00
Damien Elmes
6dfaccaa5e reuse features as rtl marker, fix deck version 2009-07-05 02:19:13 +09:00
Damien Elmes
2579bebbda bump version 2009-07-04 18:10:52 +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
1d5ee36314 add a filter for formatQA() 2009-07-04 15:40:42 +09:00
Damien Elmes
0d0b9fc81e make sure card count is properly updated in importing 2009-07-04 15:40:36 +09:00
Damien Elmes
932440165a when files have been modified, make sure to retain originalPath 2009-07-04 15:17:49 +09:00
Damien Elmes
670439c805 support for exporting original filenames 2009-07-04 14:56:25 +09:00
Damien Elmes
e2ad8a7ce3 bump deck mod time on suspend/unsuspend 2009-07-02 23:42:05 +09:00
Damien Elmes
a73e4757ad universal newlines when importing 2009-07-02 23:23:05 +09:00
Damien Elmes
a9bb1639c0 remove locales 2009-06-30 11:32:15 +09:00
Damien Elmes
01cb3a4b7d when regenerating cards, use fact's creation date 2009-06-29 23:30:13 +09:00
Damien Elmes
e1c3cc7b5c honour card/fact creation order when exporting as text 2009-06-29 23:26:35 +09:00
Damien Elmes
5e9a68d4c7 fix problem upgrading shared decks 2009-06-28 22:23:40 +09:00
Damien Elmes
b1f213644e tweak deck stats 2009-06-28 10:54:05 +09:00
Damien Elmes
1cc077e1e7 make sure save as copies deck vars 2009-06-27 17:20:49 +09:00
Damien Elmes
f0c5833bf5 bump version number for beta 2009-06-26 15:47:13 +09:00
Damien Elmes
a12878347a force always on top for the video window, add a hook to fix an osx issue 2009-06-26 10:51:22 +09:00
Damien Elmes
b23dc8053d updated translations from jarvik 2009-06-26 09:47:34 +09:00
Damien Elmes
0d40fb6743 Merge branch 'master' of git://github.com/sanna/libanki 2009-06-26 09:43:30 +09:00
Damien Elmes
35731d0cb3 move leech detection into libanki 2009-06-26 08:10:33 +09:00
Damien Elmes
2b86cd6b33 add ability to customize separato in csv import 2009-06-26 07:13:14 +09:00
Susanna Björverud
f90a15acb4 Updated version string to 0.9.9.8.3 for Swedish translation and reran translation.sh 2009-06-25 10:42:42 +02: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
fd6ea460ae bump version 2009-06-25 06:49:48 +09:00
Damien Elmes
27732e3553 catch large # of reviews in full sync, reduce limit to 500 2009-06-25 05:47:14 +09:00
Damien Elmes
1e7cae5202 add leech control 2009-06-25 05:24:02 +09:00
Damien Elmes
1bd5c988b1 create mplayer threads lazily on play, make sure not to deadlock 2009-06-25 04:35:58 +09:00
Susanna Björverud
b5b3f9fd8c Updated version number in Swedish translation and reran translation.sh 2009-06-23 16:49:50 +02:00
Damien Elmes
1a5d243520 reenable removal of suspended tag 2009-06-23 23:43:21 +09:00
Damien Elmes
3270417cfd bump version number 2009-06-23 23:29:09 +09:00
Susanna Björverud
19327c317b Updated Swedish translation and reran translation.sh 2009-06-23 09:05:32 +02:00
Damien Elmes
03dff653ab handle latex too 2009-06-23 06:41:19 +09:00
Damien Elmes
28a45a4f4c add support for downloading missing media 2009-06-23 06:30:14 +09:00
Damien Elmes
a4d1c55d4f if mplayerCond is none, finish thread 2009-06-23 06:29:52 +09:00
Susanna Björverud
ea5a867397 Updated Swedish translation and reran translation.sh 2009-06-21 20:07:29 +02:00
Damien Elmes
2f93ca3d8f reuse features as media url, blank 2009-06-21 06:51:48 +09:00
Damien Elmes
6b7c0d7997 fix missing media problem, fix json decode float 2009-06-21 04:36:36 +09:00
Damien Elmes
31f6b83b88 rebuild translations 2009-06-21 03:34:02 +09:00
Damien Elmes
88acd65858 updated German from Michael Jürges 2009-06-21 03:33:18 +09:00
Damien Elmes
2b9220e5bd Merge branch 'master' of git://github.com/sanna/libanki 2009-06-21 03:18:43 +09:00
Damien Elmes
f94104ed9f new backup-friendly backup handling 2009-06-20 02:05:11 +09:00
Damien Elmes
1f0a8edfa4 strip out mediaSupported 2009-06-20 01:32:20 +09:00
Damien Elmes
3d81181323 bulk media support -> local media copy, always send media table 2009-06-19 11:50:31 +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
f96a7a7c5b Reverting "suspend/unsuspend noweb on full sync"; obsolete 2009-06-19 10:10:37 +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
Susanna Björverud
98be8e1c47 Fixed error in Swedish translation and reran translation.sh 2009-06-18 10:36:39 +02:00
Susanna Björverud
6a8e3effe8 Updated Swedish translation and reran translation.sh 2009-06-18 09:54:08 +02: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
b079df2a13 don't use communicate(), catch win32 error 2009-06-18 07:11:39 +09:00
Damien Elmes
e6b207f7af force media sync to go in one direction 2009-06-18 06:48:41 +09:00
Damien Elmes
d0653f2f7a make mplayer threads daemons 2009-06-18 06:43:12 +09:00
Damien Elmes
22efbaaf81 fix mplayer blocking on debug output 2009-06-18 06:39:21 +09:00
Damien Elmes
0cd3b517b3 make sure to use unicode in suspended 2009-06-18 06:11:22 +09:00
Damien Elmes
9cab497217 remove obsolete methods in csvfile 2009-06-18 05:52:03 +09:00
Damien Elmes
ad5a7c8bf7 close mplayer on deck close as media path may change 2009-06-18 05:49:08 +09:00
Damien Elmes
8c8a76d08d updated japanese translation from jarvik 2009-06-18 05:39:03 +09:00
Damien Elmes
5eb1a69735 catch unicode decode errors in csv import 2009-06-18 05:37:56 +09:00
Damien Elmes
e62967ecb1 switch to python csv 2009-06-18 05:21:47 +09:00
Damien Elmes
b6a50db1c2 rebuild queue after upgrade mostly done 2009-06-18 04:25:45 +09:00
Damien Elmes
093fb4695b suspend/unsuspend noweb on full sync 2009-06-18 04:04:50 +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
03369658ee remove sleep debugging 2009-06-16 04:01:13 +09:00
Damien Elmes
717044dcad add progress handler back to full sync upload 2009-06-16 03:59:54 +09:00
Susanna Björverud
88dab64bfc Updated Swedish translation and reran translation.sh 2009-06-15 20:06:48 +02:00
Damien Elmes
aca7962fe3 updated polish translation from piotr 2009-06-16 02:25:11 +09:00
Damien Elmes
cffa1e50c3 Merge branch 'master' of git://github.com/sanna/libanki 2009-06-16 02:24:49 +09:00
Damien Elmes
a478e9af6b apply translation patch from piotr 2009-06-16 02:23:56 +09:00
Susanna Björverud
0402c2b8e2 Updated Swedish translation 2009-06-15 17:46:56 +02:00
Susanna Björverud
7d34b35b75 Merge branch 'master' of git://ichi2.net/libanki 2009-06-15 17:37:03 +02:00
Damien Elmes
5b8832402a fix close post sync 2009-06-16 00:02:26 +09:00
Damien Elmes
3b99232f7a switch to urllib2 to pick up proxy, monkey-patch httplib to incrementally send 2009-06-15 23:01:43 +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
8e92a4dfc8 don't poll empty mplayer 2009-06-15 11:45:11 +09:00
Damien Elmes
e66e66c614 don't catch all osx errors 2009-06-15 11:37:02 +09:00
Damien Elmes
7cac17a543 restart mplayer if it has stopped 2009-06-15 11:26:42 +09:00
Damien Elmes
8d3678b9fb mark deck dirty on reset cards 2009-06-15 06:57:50 +09:00
Damien Elmes
fb8f2bd09f handle interrupted system call errors on mplayer shutdown 2009-06-15 06:57:36 +09:00
Damien Elmes
e578ffc721 map all file descriptors to work with py2exe 2009-06-13 16:01:58 +09:00
Damien Elmes
efb71c754c bump protocol version 2009-06-13 01:14:54 +09:00
Damien Elmes
2db2b65df0 set deck created time on download 2009-06-12 22:41:21 +09:00
Damien Elmes
b5da38474f allow arbitrary number of args in filters 2009-06-12 22:21:57 +09:00
Damien Elmes
9d8df81e11 cleanup mplayer slave on exit 2009-06-12 20:26:00 +09:00
Susanna Björverud
79aada5288 Bump version number, no string changes, for Swedish translation 2009-06-12 08:42:30 +02: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
3085ce7328 use mplayer slave mode 2009-06-11 03:29:07 +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
28f6df93cb assert response ok 2009-06-10 22:33:20 +09:00
Damien Elmes
261c70b8c2 set first answered on reset 2009-06-10 21:23:30 +09:00
Damien Elmes
0dc07bcfd1 support get(x, default) in facts 2009-06-10 21:22:29 +09:00
Damien Elmes
fe6fb005b6 do partial tag update on sync 2009-06-10 20:58:54 +09:00
Damien Elmes
cc50a5fdae updated spanish translations 2009-06-09 04:09:55 +09:00
Damien Elmes
abbd7f1d3c Merge branch 'master' of git://github.com/sanna/libanki 2009-06-09 01:40:43 +09:00
Damien Elmes
8a40dbc35c bump version number 2009-06-09 01:31:38 +09:00
Damien Elmes
5cb85176e6 include all jinmei in missing/seen 2009-06-08 21:44:21 +09:00
Damien Elmes
c9f78cb7b6 add class to question/answer 2009-06-08 13:39:17 +09:00
Damien Elmes
845aede221 if show failed cards at end, use maxFailed = 0 2009-06-08 12:36:23 +09:00
Susanna Björverud
4e023797d7 Updated Swedish translation and reran translation.sh 2009-06-07 18:59:05 +02:00
Damien Elmes
bf59bcd1d7 remap mnemosyne latex tags 2009-06-07 02:50:09 +09:00
Damien Elmes
6ffa8cd191 make kakasi cmd more easily customizable 2009-06-06 23:51:58 +09:00
Damien Elmes
f47afc3ebf bump version 2009-06-06 22:36:34 +09:00
Damien Elmes
1ec8baa459 add filter support 2009-06-06 21:56:44 +09:00
Damien Elmes
40a7278aa5 include kanji in reading generation 2009-06-06 21:24:20 +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
06780e56fd Merge branch 'master' of git://github.com/sanna/libanki 2009-06-06 17:37:56 +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
Susanna Björverud
eaf63612a8 Updated Swedish translation and reran translation.sh 2009-06-05 20:37:12 +02:00
Damien Elmes
d1c73cb002 don't use full sync in local sync 2009-06-06 01:11:14 +09:00
Damien Elmes
d7961413b4 make sure to set card model id when creating cards, tweak code formatting 2009-06-06 01:09:08 +09:00
Damien Elmes
f5facee398 make sure to close temp file fds, add full sync to sync() 2009-06-05 15:16:11 +09:00
Damien Elmes
dd9ba0e833 support htmlquestion/answer without orm 2009-06-04 17:17:09 +09:00
Damien Elmes
15b5e3b6c0 hack for race condition with queue clearing 2009-06-04 09:37:59 +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
b136e505b0 strip <style> tags as well 2009-06-04 07:07:49 +09:00
Damien Elmes
91afe651b3 randomize after .anki import 2009-06-04 06:59:07 +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
4d1ea887dd rename rather than copy file if same name but different case in media check 2009-06-04 04:20:19 +09:00
Damien Elmes
5692c91855 add check for fields without field model 2009-06-04 04:19:53 +09:00
Damien Elmes
feac19941d updated polish translations 2009-06-02 15:59:16 +09:00
Damien Elmes
4b883e2c16 don't clobber original deck if failure in sync 2009-06-02 15:41:30 +09:00
Damien Elmes
d35ef18889 make sure to set host header 2009-06-02 04:16:49 +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
a1166215fd implement full sync downloading 2009-06-02 03:19:16 +09:00
Damien Elmes
8a19bd4c57 implement full sync uploading 2009-05-31 01:23:31 +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
Emilio Wuerges
d9d7fff820 fixed jinmei (reg) and jinmei (var) lists 2009-05-29 02:27:23 +09:00
Damien Elmes
bb21a0a517 update jinmeiyou and tweak formatting 2009-05-28 00:54:45 +09:00
Damien Elmes
c681159951 strip trailing whitespace, joyo->jouyou 2009-05-28 00:39:26 +09:00
Emilio Wuerges
1add5e4ca8 Added New Joyo Kanji list to kanji statistics 2009-05-28 00:31:22 +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
df0e4d2446 ensure tags are synced properly in one way sync 2009-05-21 02:11:33 +09:00
Damien Elmes
423974934c unify decks/deck -> Deck, fix & build translatations 2009-05-21 01:04:15 +09:00
Damien Elmes
a9044a4d8c Merge branch 'master' of git://github.com/sanna/libanki 2009-05-21 01:00:10 +09:00
Damien Elmes
b8e4358b7b Norwegian translations from Lars Lem 2009-05-21 00:59:54 +09:00
Susanna Björverud
b9e30cb9ba Updated version string in Swedish translation and reran translation.sh 2009-05-17 19:06:42 +02:00
Damien Elmes
7588eb9650 don't need to mention views/indices 2009-05-16 05:12:44 +09:00
Damien Elmes
936106e4c9 Merge branch 'master' of git://github.com/sanna/libanki 2009-05-16 05:12:13 +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
Susanna Björverud
dd8f7c4c43 Updated Swedish translation 2009-05-15 20:17:12 +02: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
d091166fe5 bump version 2009-05-16 00:50:30 +09:00
Damien Elmes
876fac87b3 Merge branch 'master' of git://github.com/sanna/libanki 2009-05-16 00:49:51 +09:00
Damien Elmes
ebf83d898e don't clobber deck modified when expired cards on open 2009-05-16 00:49:33 +09:00
Susanna Björverud
1c6cc5dbf2 Updated Swedish translation and reran translation.sh 2009-05-14 14:45:34 +02:00
Damien Elmes
1e275db81d add stats sync direction to make it clearer 2009-05-13 15:41:31 +09:00
Damien Elmes
2b5f2fa896 if the time is over a minute, cap to a minute instead of assuming avg 2009-05-11 18:57:35 +09:00
Damien Elmes
6e58308370 bump version again 2009-05-09 06:53:28 +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
b653d4dba9 bump version 2009-05-09 04:13:45 +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
29cd8aefc9 bump version 2009-05-06 16:07:24 +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
91f06b31d6 updated Polish and German from Piotr Kubowicz 2009-05-06 12:45:55 +09:00
Damien Elmes
992f7af50e make priorities sort better 2009-05-06 12:44:43 +09:00
Damien Elmes
3b7bf1f573 updated mongolian translations from Charlene Barina 2009-05-06 12:34:13 +09:00
Damien Elmes
ac5a92214e don't include new cards in workload calculation 2009-05-04 01:50:09 +09:00
Damien Elmes
f32f96fb53 if updating priorities results in a suspend, update due counts 2009-05-01 04:36:26 +09:00
Susanna Björverud
961db76e63 Updated Swedish translation and reran translation.sh 2009-04-30 10:36:10 +02:00
Damien Elmes
4a59e9d5ae patch to fix sync translation from piotr 2009-04-30 05:21:52 +09:00
Damien Elmes
2424151c9f update polish translations from piotr 2009-04-30 05:21:43 +09:00
Damien Elmes
9692041087 bump version 2009-04-30 05:14:05 +09:00
Damien Elmes
796ad5962b rename instance var to avoid deprecation warning 2009-04-29 15:28:13 +09:00
Damien Elmes
1d24158f90 bump version 2009-04-29 12:44:28 +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
54252afaf1 more chinese translations from GUO Siliang 2009-04-28 17:59:59 +09:00
Damien Elmes
de693dbc91 Merge branch 'master' of git://github.com/sanna/libanki 2009-04-28 17:59:27 +09:00
Damien Elmes
33c59a3006 new review early handling so that we can recover on load 2009-04-28 17:12:50 +09:00
Susanna Björverud
5d0fb5579f Updated Swedish translation and reran translation.sh 2009-04-27 20:11:16 +02:00
Damien Elmes
c89d75b01c bump version 2009-04-25 21:41:13 +09:00
Damien Elmes
90f726e634 remove version numbers from import, as osx gets confused 2009-04-25 03:57:56 +09:00
Damien Elmes
e51fec907b bump version 2009-04-25 03:28:21 +09:00
Damien Elmes
169dc16ced remove deprecated popen call 2009-04-25 03:27:46 +09:00
Damien Elmes
61fc7b4430 lower tags in python, as sqlite doesn't have full unicode tables 2009-04-25 03:04:52 +09:00
Damien Elmes
2944b8194b if audio player fails to start, give better error 2009-04-25 02:38:48 +09:00
Damien Elmes
c0c969d686 Merge branch 'master' of git://github.com/sanna/libanki 2009-04-25 01:10:37 +09:00
Damien Elmes
2c60151a45 ignore console input in mplayer 2009-04-24 02:16:54 +09:00
Susanna Björverud
87d8656f49 Updated Swedish translation and reran translation.sh 2009-04-23 18:13:32 +02: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
94df742a59 fix bug with zero imports, improve speed with zero imports 2009-04-23 02:00:52 +09:00
Damien Elmes
155de15101 greatly improve import speed on large decks, randomize too 2009-04-23 01:58:40 +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
19584bd642 don't dirty cards on sync 2009-04-22 21:57:25 +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
c8731bc49c add mongolian translation from Charlene Barina 2009-04-20 23:46:43 +09:00
Damien Elmes
013f3d00a8 support * wildcard in normal text search too 2009-04-20 21:50:29 +09:00
Damien Elmes
5be89d13d7 bump version 2009-04-18 23:44:55 +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
541dd3e38e improve speed of tagIds() 2009-04-18 02:39:18 +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
5a912faeab escape tags on mnemosyne import 2009-04-13 12:40:51 +09:00
Damien Elmes
b9789cbd50 Chinese translation from Siliang GUO 2009-04-11 23:17:50 +09:00
Damien Elmes
3cb299a1d5 bump version, remove debugging code 2009-04-11 02:35:55 +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
d4235aaa34 parse lastSync as a float to fix problem with latest simplejson 2009-04-11 01:05:35 +09:00
Damien Elmes
51213784a8 init progress handle at start, tweaks for faster deck startup 2009-04-11 00:20:52 +09:00
Damien Elmes
0959689463 use external player on mac too 2009-04-10 22:23:41 +09:00
Susanna Björverud
56098f18a8 Updated Swedish translation and reran translation.sh 2009-04-10 14:46:29 +02: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
f2db5c27d6 Merge branch 'newSpaced' 2009-04-10 14:43:21 +02:00
Susanna Björverud
87b4e72f47 Experimenting with selecting cards that are both new and spaced 2009-04-10 10:57:49 +02:00
Damien Elmes
c3d67c9818 add mark's latest taiwanese translations, run translate.sh 2009-04-10 16:00:22 +09:00
Susanna Björverud
426eb204a4 Updated Swedish translation and reran translation.sh 2009-04-09 15:22:27 +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
6715f32237 Updated Swedish translation and reran translation.sh 2009-04-07 11:14:41 +02:00
Susanna Björverud
8d9c1cf191 Adding html comments to strings to allow them to be translated differently 2009-04-07 11:14:10 +02:00
Susanna Björverud
ac2213b89b Updated Swedish translation and reran translation.sh 2009-04-07 08:57:00 +02:00
Susanna Björverud
c4304fa195 Plural support for some strings 2009-04-07 08:56:35 +02:00
Damien Elmes
ba716e2066 conditionally apply meta 2009-04-07 12:22:35 +09:00
Damien Elmes
d9aa62d370 bump version number 2009-04-07 11:57:49 +09:00
Damien Elmes
c7f9cec657 add deck vars 2009-04-07 11:55:08 +09:00
Damien Elmes
aed9fb1c61 update tag priorities when deck is bundled 2009-04-06 23:53:04 +09:00
Damien Elmes
1d6e3f0b97 bump version number 2009-04-06 13:49:00 +09:00
Damien Elmes
4e3e6d3148 update translations 2009-04-06 13:30:28 +09:00
Damien Elmes
d09709fb50 use tag cache for great speed increase in cram, allow card id limit 2009-04-06 12:16:09 +09:00
Damien Elmes
085fbf3bcc add hack to prevent qt movie for now 2009-04-06 11:47:14 +09:00
Damien Elmes
10816ee5d7 Merge branch 'master' of git://github.com/sanna/libanki 2009-04-06 11:43:32 +09:00
Damien Elmes
7e9453a43a new german translation 2009-04-06 11:42:48 +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
Susanna Björverud
78265fdc24 Added back lost space in string 2009-03-30 10:43:44 +02: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
Damien Elmes
5ca9afa0da update priorities on export 2009-03-29 11:53:44 +09:00
Damien Elmes
58044f8586 bump version number 2009-03-29 11:33:40 +09:00
Damien Elmes
4b3532f3eb on python2.4, fall back to non-localized strings 2009-03-29 03:52:49 +09:00
Damien Elmes
a958734f8b strip trailing whitespace and wrap lines in stats 2009-03-29 03:51:06 +09:00
Damien Elmes
08eb6ac063 Merge branch 'master' of git://github.com/sanna/libanki 2009-03-29 03:45:39 +09:00
Susanna Björverud
4e81717326 Reverting messed up german po-file 2009-03-28 09:08:02 +01:00
Susanna Björverud
ba42e3d3c1 Updated Swedish translation and ran translation.sh 2009-03-28 08:45:46 +01:00
Susanna Björverud
f156a9a436 Remove extra <br> in next-day msg 2009-03-28 08:40:25 +01:00
Damien Elmes
e9e5994248 make sure cards are tagged correctly when importing tags 2009-03-28 14:32:38 +09:00
Damien Elmes
19698d6256 only warn on a mac, include \n 2009-03-28 10:14:43 +09:00
Damien Elmes
7886d498bd warn about audio fallback 2009-03-28 08:33:16 +09:00
Susanna Björverud
9fe5d88c0c Minor tweaks to Swedish translation and ran translation.sh 2009-03-25 17:34:06 +01:00
Susanna Björverud
c442e1f460 Updated Swedish translation 2009-03-25 11:21:09 +01:00
Susanna Björverud
f4adc657bd Added fmtFloat def 2009-03-25 11:20:42 +01:00
Susanna Björverud
57ca74ce34 Use locale decimal point 2009-03-25 11:15:04 +01:00
Susanna Björverud
7bbbc3bd65 Revert "taiwanese from mark"
reverting binary update
This reverts commit 4370606fc1.
2009-03-25 10:32:26 +01:00
Susanna Björverud
e1379eba5d Updated Swedish libanki translation 2009-03-25 11:02:57 +09:00
Susanna Björverud
dfb477ec4b new def to format percentages with current locale decimal point 2009-03-25 11:02:50 +09:00
Damien Elmes
4370606fc1 taiwanese from mark 2009-03-25 10:38:13 +09:00
Damien Elmes
c2fb704c52 assert undoLog primary key not null 2009-03-25 09:42:44 +09:00
Damien Elmes
eed5df1038 use format_string() 2009-03-24 09:05:35 +09:00
Damien Elmes
9fba248489 fix locale.format location 2009-03-24 08:52:53 +09:00
Damien Elmes
1648d254d6 format decimals using locale 2009-03-24 08:38:29 +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
1098bb1c5c make fmtTimeSpan strings translatable 2009-03-23 10:48:28 +09:00
Damien Elmes
caf91b287e update finish translation, support importing/* 2009-03-23 10:45:20 +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
aa430f15e0 bump version 2009-03-22 14:22:21 +09:00
Damien Elmes
be3fabeee7 update translations 2009-03-21 13:36:02 +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
0bf59fa00b make sure to close cursor for first() 2009-03-21 03:50:43 +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
6af560da9a make sure to set ret if wait=False 2009-03-19 11:06:53 +09:00
Damien Elmes
93ca931f01 improve progress handler 2009-03-19 10:42:12 +09:00
Damien Elmes
e2baf57744 Estonian from Meelis Vasser, Portuguese from Jo Nakashima 2009-03-19 08:55:24 +09:00
Damien Elmes
95b8d655e6 remove shared cache mode, it's not needed 2009-03-18 22:45:43 +09:00
Damien Elmes
34be5b47a7 fix reviewHistory table by rebuilding it 2009-03-15 07:27:44 +09:00
Damien Elmes
a111537c26 fix refs to reviewHistory's id 2009-03-15 06:43:45 +09:00
Damien Elmes
66cda18a69 fix call() 2009-03-15 06:41:53 +09:00
Damien Elmes
64275642ba pass unicode to simplejson.loads() 2009-03-15 06:39:08 +09:00
Damien Elmes
df3185ab0f add wait kwarg to call() 2009-03-15 06:36:19 +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
95447a23ec fix 10.3 audio 2009-03-13 07:06:21 +09:00
Damien Elmes
38cfd6e7db new finnish translations from Niklas 2009-03-13 06:24:44 +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
ba15b6d0c3 update translations 2009-03-11 05:39:56 +09:00
Susanna Björverud
183f7461b4 Updating Swedish translation 2009-03-11 05:36:31 +09:00
Damien Elmes
32f9f1952e simplified chinese from nick 2009-03-11 05:28:53 +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
46451dbd4d remove sox hack 2009-03-10 07:38:23 +09:00
Damien Elmes
3bd9dd8494 handle osx 10.3 audio 2009-03-06 06:35:43 +09:00
Damien Elmes
e75036adde mention sox failure 2009-03-06 05:09:24 +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
20ac55581a update translations 2009-03-01 15:17:39 +09:00
Susanna Björverud
27a1529703 Committed Swedish translation by Susanna Björverud. 2009-02-28 23:05:59 +01:00
Damien Elmes
1234420cb7 add tags based on user's priorities 2009-02-28 16:57:11 +09:00
Damien Elmes
36421cf166 use pure field model order when importing 2009-02-27 15:30:11 +09:00
Damien Elmes
97eb12e343 new osx audio based on qtmovie 2009-02-26 02:07:27 +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
f9ace0178c update translations 2009-02-25 23:37:24 +09:00
Damien Elmes
14bb30becb expire after delete 2009-02-24 13:03:27 +09:00
Damien Elmes
94f7775b7f remove space from missing media tag 2009-02-24 01:23:47 +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
0b1a135176 update card tags after sync, new priority handling 2009-02-20 00:12:19 +09:00
Damien Elmes
ebaa37fe55 update tags when importing 2009-02-20 00:11:44 +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
9863bfe318 add brazillian portuguese translation from Jo Nakashima 2009-02-17 12:26:10 +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
eac6324fcb raise keyerror(key) in facts 2009-02-15 15:25:56 +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
77a6488f6d when importing, tag cards as new, add unit test 2009-02-14 03:03:42 +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