Commit graph

51 commits

Author SHA1 Message Date
Luke Williams
9e375f1c7b Fix issue where null tag list crashes Mnemosyne import 2017-05-30 17:38:39 -04:00
Damien Elmes
6335dcb90e canonicalize to NFC form on edit/import 2017-02-19 12:49:52 +10:00
Damien Elmes
506f999581 Merge branch 'master' of github.com:dae/anki 2017-02-08 17:28:30 +10:00
Damien Elmes
227ca090db use a constant for the starting factor 2017-02-08 17:28:12 +10:00
Illia Volochii
13b7e01044 Stop inheriting from object
It is not needed in Python 3.
2017-02-07 00:21:33 +02:00
Damien Elmes
e6adc3c195 fixes for sqlite on python 3.6
we need to switch to autocommit mode before executing vacuums &
certain pragmas

also removed the pysqlite version workaround; we just use the
python-provided versions in all cases now as it is new enough
2017-01-13 17:00:03 +10:00
Damien Elmes
cc742df71a support PSV out of the box and make extending delims easier 2016-07-11 11:36:53 +10:00
Damien Elmes
15b349e3a8 start port to python 3
unit tests pass and main screens of GUI load
2016-05-12 14:45:35 +10:00
Damien Elmes
1dce3eaaff drop anki1 upgrade code 2016-05-12 14:20:59 +10:00
Damien Elmes
9b2a19ee85 when schema differs, make sure we don't import cards
_ignoredGuids should have been added to but wasn't
2016-04-17 20:38:39 +10:00
Damien Elmes
c38b267b2d if we detect a schema change, we must make sure not to update cards
fixes https://anki.tenderapp.com/discussions/ankidesktop/13226-bug-endless-error-report-in-browser
2015-05-30 13:05:22 +10:00
Damien Elmes
47c3bb0796 make sure we set usn when pulling in dconf from apkg 2014-10-08 12:54:30 +09:00
Damien Elmes
5bb09ed77a don't add <br> tags when importing html
fixes #1098
2014-09-15 15:24:50 +09:00
Soren I. Bjornstad
c3434ff751 update note type on apkg import when only templates have changed
Previously, it only updated if card/note count was different, even if
the templates / styling information had been updated.
2014-06-28 13:51:30 -05:00
Soren I. Bjornstad
a570779a26 update all duplicates when importing
If duplicate notes are already in the collection and, based on the first
field of all of them, they should be updated, update all of them instead
of just the first one we come across.
2014-06-24 15:55:19 -05:00
Soren I. Bjornstad
ba084cb46a don't insert <br> into text of cards on import
When "allow HTML" was turned off, Anki was replacing newlines with <br>s
in the text of the new notes before it escaped HTML characters, so the
line breaks were becoming &lt;br&gt;.
2014-06-21 11:02:34 -05:00
Soren I. Bjornstad
28bb109ded only display "added duplicate" message once
Even if there are several (duplicate) notes in the collection that
match, only send the message once to avoid making it look like multiple
dupes have been added.
2014-06-19 17:19:56 -05:00
Soren I. Bjornstad
8620b81817 add unchanged count to import log 2014-06-17 09:38:26 -05:00
dae
1b646c1c8d mnemosyne changed version string in .db 2014-06-08 14:37:15 +09:00
Jussi Maatta
656698da83 Add A-factor to E-factor conversion to SuperMemo import.
The SuperMemo XML importer assumed that the A-factors used by
SuperMemo map 1-1 with E-factors (which correspond to Ease in
Anki). This resulted in too large E-factors for imported items.

This change adds an A-factor to E-factor conversion to the
importer.
2014-01-26 10:09:47 +02:00
Jussi Maatta
cdcd5eb651 Fix double newlines in items imported from SuperMemo.
When importing SuperMemo XML files, indicate to the BeautifulSoup
XML parser that the <br> tag is self-closing. This prevents it
from adding a matching </br> for every <br> tag. These extraneous
tags resulted in extra newlines in items imported from SuperMemo.

While we're at it, fix the same bug for a couple of other
self-closing HTML tags.
2014-01-26 10:06:53 +02:00
Jussi Maatta
6c6be1144b Remove unused function from SuperMemo XML importer. 2014-01-26 10:01:06 +02:00
Damien Elmes
0d1d8c5bf9 define standard encoding for unicode (#893)
- always store media references in fields in NFC form
- always encode filenames on disk in NFC form on machines other than macs
- use relevant encoding when placing files in the media folder during syncs
  and apkg imports as well
- rename 'unused media' back to 'check media'
- check media can now automatically change media references and filename
  encodings to the correct format
2013-09-20 19:28:44 +09:00
Damien Elmes
bd8707f54c support import of renamed .apkg files 2013-09-11 15:56:59 +09:00
Damien Elmes
511bde0396 change misleading note import msg 2013-09-11 15:30:31 +09:00
Damien Elmes
0c2a1fe19e report more info when note type changes prevent an import 2013-09-04 02:19:15 +09:00
Damien Elmes
914f56dbc0 allow updates to existing notes in .apkg import 2013-08-08 13:01:47 +09:00
Damien Elmes
0fa9b75af5 fix importing with schema change logic
the previous fix for #612 was broken, and led to notes with altered schemas
being imported with the incorrect schema
2013-07-11 18:47:49 +09:00
Damien Elmes
2d4b79b490 keep scanning csv until we find non-zero field count (#920) 2013-07-03 04:23:33 +09:00
Damien Elmes
8e8de1e333 mnemosyne importer tweaks
- convert newlines to br
- non-greedy match mnemosyne clozes
2013-06-05 18:39:32 +09:00
Damien Elmes
a4b7a93bcc mnemosyne importer improvements
- support cloze type
- use proper names for front/back, etc
- change <audio> to [sound:]
- change mnemosyne-style latex references
2013-06-03 13:58:40 +09:00
Damien Elmes
e38aa0c615 fix importing of images 2013-05-27 16:20:53 +09:00
Damien Elmes
73b197b3a9 only duplicate notes with diff schema in anki1 import (#612) 2013-05-24 11:55:50 +09:00
Damien Elmes
d72fb35825 need to order cards after import for sibling spacing (#464) 2013-05-22 13:16:12 +09:00
Damien Elmes
403a53cebf shuffle after importing when random on (#576) 2013-05-16 21:55:57 +09:00
Damien Elmes
3dd72ad4d6 log updates & duplicates (#859) 2013-05-16 17:24:12 +09:00
Damien Elmes
f7c5003c1c better error with very long fields in import (#852) 2013-05-14 18:38:35 +09:00
Damien Elmes
79d4451299 move full sync into preferences, and remove maintenance menu 2013-05-14 15:27:40 +09:00
Damien Elmes
a379e47ca5 handle cloned note types in mnemo import 2013-05-13 13:58:10 +09:00
Damien Elmes
a525d3c32c make sure we don't chomp embedded newlines when clearing comments (#722) 2013-04-11 14:33:30 +09:00
Damien Elmes
e8e1bd9550 allow HTML in mnemosyne import (#774) 2013-04-11 13:28:30 +09:00
Andreas Klauer
fcd3bd5eee fix HTML in cards 2013-02-25 13:41:00 +01:00
Andreas Klauer
b6c9253034 support LearnedTimestamps and flipped cards 2013-02-24 23:39:36 +01:00
Andreas Klauer
a78c4d6c31 add Pauker Lesson Importer 2013-02-24 02:10:50 +01:00
Damien Elmes
17b68d5dc0 fix import of suspended anki1 cards (#565) 2013-01-23 15:28:11 +09:00
Damien Elmes
ab46fa0a70 don't fail when importing apkg that references subdirs 2013-01-15 07:43:10 +09:00
Damien Elmes
e610776bb0 possible fix for supermemo importer (#480)
Not sure why the original author was converting angle brackets separately -
that code breaks the example provided in #480, but I'm not sure if removing it
will break other files.
2013-01-15 06:37:30 +09:00
Damien Elmes
289f0a6452 automatically fix 1.2 errors when upgrading 2013-01-08 09:43:29 +09:00
Damien Elmes
c6b0945af1 import descriptions in parent decks 2012-12-22 09:39:38 +09:00
Damien Elmes
b2457811a2 optimize imports 2012-12-22 09:17:10 +09:00