Commit graph

43 commits

Author SHA1 Message Date
ospalh
0426e87b5f Don't assign an IOError to the name OSError and then never use it.
Instead silently fail on either an IOError or an OSError.
2012-10-26 14:05:58 +02:00
Damien Elmes
c9978d68b5 when upgrading decks from anki1, make sure we preserve the provided prefix 2012-10-25 16:12:24 +09:00
Damien Elmes
8823fe7538 more importing changes
- when importing cards from a filtered deck, convert them to normal cards
- ignore empty default deck when determining deck prefix
2012-10-25 01:02:12 +09:00
Damien Elmes
5c3f036936 add a hook to customize imported deck name 2012-10-25 00:19:50 +09:00
Damien Elmes
76b356fe0d read media files in binary format 2012-09-25 10:33:09 +09:00
Damien Elmes
3f01b1ef59 don't die if src collection is missing media folder 2012-09-21 23:50:41 +09:00
Damien Elmes
f13acf8c68 handle file name conflicts in media on .anki2 import 2012-09-21 15:25:52 +09:00
Damien Elmes
da639c00a5 report # of notes that are already in the collection 2012-09-15 09:39:10 +09:00
Soren Bjornstad
1f7c19f535 added pluralization in a number of spots 2012-09-09 17:07:47 -05:00
Damien Elmes
6d54a43060 don't bump mod time when importing apkg 2012-08-26 17:34:47 +09:00
Damien Elmes
0432911ef9 save deck description on import 2012-08-24 15:55:56 +09:00
Damien Elmes
949660288e needCards/needWizard obsolete
We always include the cards as designed, and suggest to the user they can
customize them instead.
2012-08-09 11:40:56 +09:00
Damien Elmes
19fde43cda when importing make sure to adjust due date for day lrn too 2012-06-03 20:06:33 +09:00
Damien Elmes
5c56de0e73 import deck conf 2012-05-14 07:05:18 +09:00
Damien Elmes
92472045d7 fix importing of changed models and duplicate revlog/card entries 2012-04-24 01:27:36 +09:00
Damien Elmes
f6b2e69669 remove did from notes, use model did instead 2012-03-09 09:12:27 +09:00
Damien Elmes
a2312f9a1f change cards table schema
In preparation for cramming:

- add odid for storing old deck on a per-card basis
- rename edue to odue
- at the moment note.did still exists, but in the future we may ignore it and
  use model.did instead
2012-03-08 11:28:12 +09:00
Damien Elmes
528224895c make sure we bump usn of revlog import 2012-03-08 08:32:24 +09:00
Damien Elmes
d60a3f8e25 ensure nextPos is not null 2012-03-06 16:21:51 +09:00
Damien Elmes
54b8ee059f media importing 2012-02-26 08:13:48 +09:00
Damien Elmes
9187255630 don't include (shared) in shared deck models 2011-12-15 11:53:41 +09:00
Damien Elmes
2c0b3f7c0a more usn fixes 2011-12-14 10:27:20 +09:00
Damien Elmes
47a170898a set default deck on upgrade; append old deck name to model 2011-12-14 10:20:56 +09:00
Damien Elmes
c1d9b62549 make sure we adjust due time on reviews when importing 2011-12-13 04:20:29 +09:00
Damien Elmes
8358c7e686 remove obsolete queue arg 2011-12-07 19:35:32 +09:00
Damien Elmes
478e4c9212 use the original id if available when importing 2011-11-26 12:06:17 +09:00
Damien Elmes
faf2f061a8 log imported card/media counts 2011-11-25 14:13:14 +09:00
Damien Elmes
b5c0b1f2c7 drop required/unique field properties
Instead of having required and unique flags for every field, enforce both
requirements on the first field, and neither on the rest. This mirrors the
subject/body format people are used to in note-taking apps. The subject
defines the object being learnt, and the remaining fields represent properties
of that object.

In the past, duplicate checking served two purposes: it quickly notified the
user that they're entering the same fact twice, and it notified the user if
they'd accidentally mistyped a secondary field. The former behaviour is
important for avoiding wasted effort, and so it should be done in real time.
The latter behaviour is not essential however - a typo is not wasted effort,
and it could be fixed in a periodic 'find duplicates' function. Given that
some users ended up with sluggish decks due to the overhead a large number of
facts * a large number of unique fields caused, this seems like a change for
the better.

This also means Anki will let you add notes as long as as the first field has
been filled out. Again, this is not a big deal: Anki is still checking to make
sure one or more cards will be generated, and the user can easily add any
missing fields later.

As a bonus, this change simplifies field configuration somewhat. As the card
layout and field dialogs are a popular point of confusion, the more they can
be simplified, the better.
2011-11-24 22:16:03 +09:00
Damien Elmes
f7790275ce groups -> decks 2011-11-23 19:28:09 +09:00
Damien Elmes
279a942642 deck -> collection 2011-11-23 17:47:44 +09:00
Damien Elmes
6e4e8249fb facts -> notes 2011-11-23 12:37:21 +09:00
Damien Elmes
47f4b271dc mark recycled models for card generation; drop superfluous flagModels 2011-11-08 22:32:43 +09:00
Damien Elmes
688a680b54 when importing, set the new group as current 2011-11-07 14:26:56 +09:00
Damien Elmes
cbdb283b20 refactor model copying 2011-10-31 11:34:03 +09:00
Damien Elmes
b1bf50c677 make sure to save after import 2011-10-30 19:04:52 +09:00
Damien Elmes
4668b1a210 on import make sure we update post; use static random range 2011-10-26 06:24:14 +09:00
Damien Elmes
ae839dd3a3 group deletion should be recursive; fix css in import 2011-10-22 10:04:32 +09:00
Damien Elmes
b31bd5c091 vacuum after import; make sure models.current() always returns 2011-10-22 07:39:13 +09:00
Damien Elmes
8bb26aaf74 add the ability to skip cards for shared decks 2011-10-22 00:05:09 +09:00
Damien Elmes
4539ca2b73 import each anki1 deck as its basename 2011-10-22 00:02:28 +09:00
Damien Elmes
119217290e implement anki1 importer 2011-10-21 23:45:42 +09:00
Damien Elmes
b242b06052 import media too 2011-10-21 07:53:22 +09:00
Damien Elmes
83f8ef45ff anki2 importing and reorganize import code 2011-10-21 07:36:44 +09:00