Commit graph

188 commits

Author SHA1 Message Date
Damien Elmes
6e52331699 fix importing of latex cache files 2012-12-20 20:53:00 +09:00
Damien Elmes
322a2884f9 when copying a model over in import, make sure we flag it for sync 2012-11-29 03:17:12 +09:00
Damien Elmes
41ca2b0c1c Merge pull request #19 from ospalh/some-fixes
Some fixes
2012-11-07 14:11:10 -08:00
Damien Elmes
36f5fd0e4c remove obsolete func 2012-11-05 04:32:04 +09:00
ospalh
1752652a4c Merge branch 'master' of github.com:dae/libanki into some-fixes 2012-11-03 12:35:14 +01:00
Damien Elmes
3ffe47f5d6 improve handling of divergent models when importing
- instead of maintaining a list of model versions on the model which could get
  lost in a sync, we simply increment mid by one until we find a compatible
  schema or empty slot
- same approach for guids, so that reimports of divergent material won't cause
  extra duplicates
2012-11-02 06:34:28 +09:00
ospalh
0443d68eea Merge branch 'master' of github.com:dae/libanki into some-fixes 2012-10-29 09:31:43 +01:00
Damien Elmes
29b0628141 revert import deck name selection 2012-10-28 00:04:36 +09:00
Damien Elmes
1403d36042 need to account for guid changes when importing cards 2012-10-27 21:59:31 +09:00
Damien Elmes
29e93f8c1d make sure we update guid in note object too 2012-10-27 21:11:16 +09:00
Damien Elmes
bd1c6d4395 more robust anki1 upgrading & anki2 importing
- base the 2.0 model id on the 1.2 one so we don't get new models each time we
  reimport the file
- when determining if we can reuse an existing note, it must have the same
  model id, and the model must have the same schema
- make sure we check templates when determining schema
- if schema has diverged, note needs new guid
2012-10-27 20:55:08 +09:00
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
de541617cf add html stripping to import; don't always display empty note msg 2012-10-24 23:48:21 +09:00
Damien Elmes
cb17319e4e add warning when import fails to generate cards 2012-10-23 18:07:36 +09:00
Damien Elmes
eb7240d220 allow duplicates in import 2012-10-23 17:52:55 +09:00
Damien Elmes
2f34361b89 reinit mapping when delimiter changed 2012-10-09 03:11:23 +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
e3da64f00b don't clobber tags if they're not mapped 2012-09-21 15:51:45 +09:00
Damien Elmes
f2fffce6d1 handle conflicts in apkg import as well 2012-09-21 15:42:30 +09:00
Damien Elmes
f13acf8c68 handle file name conflicts in media on .anki2 import 2012-09-21 15:25:52 +09:00
Damien Elmes
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
6ebdd7a8b8 fix importing of anki1 media 2012-09-09 06:29:30 +09: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
d001b83ab1 fix anki1 media importing again 2012-08-23 14:11:04 +09:00
Damien Elmes
9cc6ab9685 fix iniju's patch 2012-08-09 14:01:41 +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
iniju
2c43c3adca fix import deck: target correct media dir on linux. 2012-07-28 12:57:26 +01: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
c1ea82273b log actual changes, not all prospectives 2012-05-06 17:53:18 +09:00
Damien Elmes
a52e740ef6 log added and updated notes separately 2012-05-06 17:34:04 +09:00
Damien Elmes
a558c47330 fix duplicate check in import 2012-05-06 17:29:02 +09:00
Damien Elmes
461e240d53 allow python-bundled json 2012-04-28 17:41:56 +09:00
Damien Elmes
5b97c3f20f don't throw error when update causes empty cards; fix unit test 2012-04-24 10:03:34 +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
625a77f7f8 strip \n in csv tags: 2012-04-20 02:17:44 +09:00
Damien Elmes
e3f64c0f07 if there's no LastRepetition element, don't try import learning data 2012-04-06 19:38:32 +09:00
Damien Elmes
37b89cdac3 fix importing non-latin tags 2012-04-06 19:01:05 +09:00
Damien Elmes
c1242740ac fix importing of multiline fields 2012-04-06 18:13:21 +09:00
Damien Elmes
13049339ac add check for first field 2012-04-06 13:35:46 +09:00
Damien Elmes
b413b1562a when updating, preserve unmapped fields 2012-03-25 02:07:20 +09:00
Damien Elmes
8fd1756eb4 remove deck overriding in text file import 2012-03-20 05:43:55 +09:00
Damien Elmes
e41c7738d3 Revert "make importing with an explicit deck work again"
This reverts commit f177083bcb.
2012-03-20 05:42:17 +09:00
Damien Elmes
f177083bcb make importing with an explicit deck work again
This change was necessary as we moved away from note decks. However, now that
I think about it, decks may not be a terribly useful thing to specify
per-line in a text file. Committing in case the code is needed later, but I
will revert in the next commit.
2012-03-20 05:41:58 +09:00