Anki add-on: export cards/notes from browser with metadata to csv or xlsx

This add-on offers to export the selection from the Anki cards/notes Browser window. In the menu bar it's "Edit->Export selected" (My add-on can't be called from the menu entry "Notes->Export Notes". The main reason for this is that I made my add-on before this option was built into anki). You can export for the selected cards the columns visible in the browser. This is similar to the functionality of the old Anki 2.0 add-on Export Browser's card list contents to CSV file Enhanced . My add-on also offers to export the underyling html of fields and the columns have the order shown in the browser. If you use this option you don't need to deal with the add-on config. If you always want to export certain fields or metadata irrespective of which columns are visible in the browser at the moment you can alternatively rely on the add-on config (which is a bit complicated to setup). Both options allow you to export metadata and not just field contents or the question/answer template. So you can export interval, due dates, card id, etc with this add-on. You can export to csv or xlsx (Excel format). This might be useful in some cases to avoid problems with quoting and field separators. When exporting the underlying notes and you export to csv one file per note type is exported (or one xlsx file with one worksheet per notetype). When exporting to csv you can set multiple characters as the field delimiter in the add-on config. You can also set some parameters for python's csv exporter in the add-on config. This add-on does NOT allow to import from xlsx. (In 2022) maybe have a look at Anki Excel Sync and Spreadsheet Import Plus . I didn't include an import function because in 2019-11 I didn't find a FOSS library that handles importing richtext as I like it. I made this add-on for myself. So it's not much tested. Use it at your own risk. # Errors, Bugs, Issues Use this version at your own risk. Please do not use reviews for bug reports or support requests. I don't get notified of your reviews, and properly troubleshooting an issue through them is nearly impossible (formatting is limited and I can't reply multiple times). If you find a bug, have feedback or improvements let me know in the official anki support forum . # Known Limitations When exporting cards this add-on is slow. Exporting over 40000 cards took between 2 and 4 minutes on my computer! It's slow because I reused existing components that were designed for a different use case. # Alternatives There's Anki Excel Sync and Spreadsheet Import Plus and ... If you know some sql you can query the Anki database directly, see a brief description of the Anki2 database structure . There are about 20 different exporting related add-ons. It's likely that in many cases this add-on is not the best suited for you. If this add-on doesn't work for you search the other available ones. There's also an unpublished add-on by glutanimate named custom-text-backup (for 2.0 and 2.1) that allows to export some metadata. But this doesn't export to a table, spreadsheet, or csv file and instead creates free-form text (like one file per note/card). # Configuration You can set which fields or metadata to export from the add-on configuration. You can also configure some parameters for the csv export in the add-on settings. The settings window has some explanations. # Versions ​- 2024-03-07 2.1.50+: fix for qt6 ​- 2022-04-12 fix line endings in windows ​- 2022-01-19 fix for 2.1.45+ ​- 2020-09-20 2.1.28+: no longer use deprecated col.backend.format_time_span() ​- 2020-09-13 fix for windows encoding (downvote from 2020-09-07) ​- 2020-07-10 add option to export visible columns from browser ​- 2020-07-09 misc bug fixes ​- 2020-05-05 update for 2.1.24+: "named arguments in queries will go away in the future" ​- 2020-04-16 update for 2.1.22+: fmtTimeSpan -> mw.col.backend.format_time_span ​- 2019-11-24 initial release # acknowledgements This add-on uses some modified functions from Anki and the python package XlsxWriter (Copyright (c) 2013, John McNamara) which is released under a BSD license.

GitHub repository: glutanimate/custom-text-backup
Repository description: Custom Text Backup Add-on for Anki
Languages: Python, Makefile