AnkiWeb
- Rating
- 1 (π 0 Β· π 1)
- Updated
- 2024-06-18
- Anki versions
- 24.06.2~
- Description language
- en
AnkiWeb addon 1047004318
Exports Anki cards as images using customizable Jinja2 HTML templates and CSS, with options for resolution, cloze replacement, excluded fields, per-note templates, and ImageMagick auto-cropping.
Open on AnkiWeb GitHub Ask about alternatives
stale
| Min Anki | Max Anki | Updated |
|---|---|---|
| 2.1.0 | 24.06.2+ | 2024-06-18 |
Loadingβ¦
Adds a "Save HTML" menu to Anki's preview view, saving the whole page with CSS, JavaScript and images to a local file for debugging complex templates.
Exports and imports Anki note types as portable JSON files, with selective export/import and smart conflict resolution.
Exports selected Anki card answer sides as high-quality PNGs in batch, organized by deck, embedding images, rendering HTML/CSS/MathJax, with progress and configurable settings.
Exports Anki decks to standalone HTML files with custom templates, CSS, queries, embedded images, and live preview.
Exports Anki cards to a searchable, printable HTML page rendered exactly like the reviewer, plus live browsing, narrated slideshows, and rapid presentation modes.
Imports and exports Anki note type CSS and card templates, with configurable delimiters, global CSS, common epilog support, directory memory, and improved error handling.
Export Anki cards as picture with flexible jinja2 templates ans CSS styling You can use anki styling from anki card template CSS section. Anki templates can be easily transformed to jinja2 templates with ChatGPT.
meta.jsonAddon is configurable through anki-menue: Tools-->add-ons Please select addon and then click on "config". Settings are stored in meta.json. config.json is storing default values
{
"debug": false
"resolution": [1920, 1080],
"last_output_folder": "",
"replace_cloze": false,
"exclude_fields": [
"Field-Containing-Sound-Tags-Only",
"Question Mask"
],
"default_template": "template.html",
"default_css": "styles.css",
"auto_crop": false,
"note_card_templates": [
{
"note_type": "MultipleChoice",
"card_type": "Question",
"template": "template_multiple_choice.html",
"css": "styles_multiple_choice.css"
}
]
}
The add-on uses jinja in template files please refer to jinja documentation https://jinja.palletsprojects.com/en/3.1.x/
This template defines the HTML structure used to render Anki cards as images. Below is an explanation of the key elements:
<!doctype html>
<html>
<head>
<style>
<!-- Inject the CSS content from the configured CSS file -->
{{ css }}
</style>
</head>
<body>
<!-- Check if the note type is not one of the Image Occlusion types -->
{% if note_type not in ['Image Occlusion', 'Image Occlusion Enhanced', 'Image Occlusion Enhanced+'] %}
<table class="custom-table-left">
<!-- Loop through each field in the fields dictionary -->
{% for field, value in fields.items() %}
<!-- Only display non-empty fields -->
{% if value != "" %}
<tr>
<!-- Convert the field name to lowercase for CSS class and display its value -->
<td><div class="{{ field|lower }}">{{ value }}</div></td>
</tr>
{% endif %}
{% endfor %}
</table>
{% endif %}
</body>
</html>
for autocrop, you need to download and install ImageMagick commandline tool. https://imagemagick.org/ Windows: In system path, you need to add the path to the
Please send your requests though github ticket system. https://github.com/hienstorfer/anki-export-as-picture/issues