Anki add-on: Export Cards As Text

Anki add-on for exporting cards from Anki to a text file (CSV, XML, JSON). Copyright (c) 2014-2021 Jiri Kriz, http://www.nosco.ch/main/en/contact.php License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html Version 3.0 (05-Jul-2021) (running with Anki 2.1.0 and higher) (Use the add-on 1589071665 for Anki 2.0.x.) Support: None. Use at your own risk. You can send me suggestions and bug reports on https://www.nosco.ch/main/en/contact.php Export Dialog Help: Format Format of the exported text file. One of: CSV (Comma Separateted Values), JSON, XML CSV Delimiter Delimiter in the CSV file, e.g. ',' or ';' or '\t' (tabulator). File The exported file. Browse Displays a file dialog to specify the exported file. Deck Filter The specified deck or all decks will be exported. Tag Filter Cards having one of the specified tags (delimited by blanks) will be exported. If the filter is empty, then all cards will be exported. Include All Fields If checked, then all card fields will be output. If not checked, then only the front and back sides will be output. Include All Tags If checked, then all card tags will be output. If not checked, then none tags will be output. Include Reverse Cards If checked, then also the reverse cards will be output. If not checked, then the reverse cards will not be output. Include Deck Name If checked, then the card's deck name will be output. If not checked, then the deck name will not be output. Include Card ID If checked, then the card's ID will be output. If not checked, then the card's ID will not be output. Include Card Type If checked, then the card's type will be output. If not checked, then the card's type will not be output. Include Note ID If checked, then the note's ID will be output. If not checked, then the note's ID will not be output. Include Note Type If checked, then note's type will be output. If not checked, then the note's type will not be output. OK Perform the export with the specified settings. Cancel Cancel the export. Remarks: It is assumed that the created card and the associated reversed card (if any) have neighboring IDs. More precisely, if a card has ID1 and its associated reversed card has ID2, then no other card has an ID between ID1 and ID2. It seems that this assumption is always fulfilled. If this assumption were wrong then reverse cards would potentially also be exported even if 'Include Reverse Cards' = False. Note that associated reverse cards have the same 'NoteID' and different 'CardType'. The addon was tested on Windows only. Versions: 1.0 (19-May-2014) Initial version 1.1 (14-Sep-2014) Fixed bug 'IndexError' in deck list 2.1 (17-Aug-2017) Ported to Anki 2.1 3.0 (05-Jul-2021) - New name "Export Cards As Text" (previously "Export Cards As Text V2.1.1") - Running with Anki 2.1.x - The first line "Field 1 (Front) Field 2 (Back) ..." not written - All fields are written first, then Tags and other information - Fields containing commas, quotes, etc. are quoted properly - Empty decks are not exported