A tool for Anki user to import / export CSS and card templates of all note types.
Functions & Things to notice
Export: choose the directory as the destination for export
Each note type has its own folder, containing the CSS and templates of all cards.
Each template file is named after the card, containing both the front & back templates.
The front & back templates are separated by the configurable delimiter.
Import: choose the directory as the source for import
Each folder in the chosen directory will be regarded as each individual note type to be imported, matched by the name of the folder.
Folders or template files without corresponding note types or cards in Anki will be ignored. The add-on won’t create note types and cards as a result. Therefore, importing the directory which was exported earlier is recommended.
An extra CSS file can be present in the source directory (compared to what Export outputs), regarded as the global CSS. When the CSS file is missing under a note type folder, the global CSS will be used if present. The behavior when both are present is configurable.
Configure: some configurable settings in JSON format
delimiter between front and back template: the demimiter for separating front & back templates in each card. Default: ```<br> (<br> is line break)
CSS file name: the filename for all CSS files. Default: style.css
insert global CSS before individual ones of all note types: if true, global CSS file will be inserted before each note type’s CSS file. Otherwise, global CSS will be ignored if there is a CSS file for the note type. Default: false
filename extensions for card template files: an empty string "" for no extension. An alternative might be “.html”. Default: ""
The source can be found on GitHub: https://github.com/Asu4ni/Templates-Import-Export-for-Anki
Liên kết hỗ trợ
Reviews (7)
👍 2024-02-28
I simply fixed this add-on for Anki23+ and uploaded it to AnkiWeb. After the original add-on has been updated to Anki 23.12+, this fork is not needed. 📤Templates Import and Export - Fixed for Anki 23 by Shige https://ankiweb.net/shared/info/2032572419
👍 2023-12-01
[Update: I had to make one small modification to remove Qt5 dependency, to make it work with Qt6 and the latest Anki 23.10+. I did a pull request on your Github. Are you still maintaining it?] [Original review:] Works as advertised. Just remember that note types and card types become directory names and filenames when exported, so you might need to rename them if you used punctuation characters that are illegal for filesystem names. On Linux using / is a bad idea. On Windows you can’t use < > :
👍 2023-05-19
Truly a simple yet effective method of importing/exporting templates. it’s so easy to maintain my templates this way!
👍 2022-04-10
Well done, very easy to use. Thanks a lot!
👍 2022-01-17
I really had to come on here and thank you so much for this. It’s just a lifesaver. So easy to backup and restore CSS configurations, try out new styles, and always know you have a backup. I was waiting for an add-on like this for so long. Thank you for sharing this with all of us. 5 stars.
👍 2021-03-28
Great add-on! Real help with maintaining templates outside the limited Anki environment, especially for CSS.
👍 2021-03-26
Thank you! Such a lifesaver.