𝕾 Export Field and Tag Legend as Text (for LLMs)

AnkiWeb addon 1931887561

Exports a field and tag legend stored as an HTML comment in a card template, copying it to the clipboard or saving it as a text file.
AI-generated summary; may contain mistakes.

exportcard-templates

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
2 (👍 2 · 👎 0)
Updated
2026-08-23
Anki versions
26.09~
License
AGPL-3.0 (from the license file in the package)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

active

  • Last update or commit: 2026-08-31 (62 days before the snapshot).
  • Commits in the last year: 8.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
26.0126.09+2026-08-23
History across monthly snapshots

Loading…

Similar addons

𝕾 Export Tags as Text (for LLMs)

Exports a collection's complete sorted tag list as plain text to the clipboard or a UTF-8 file, preserving hierarchical tags, with customizable keyboard shortcuts.

export

2 votes 34% approval 👍 2 · 👎 0 ⭐ 3 Anki 26.09~ Updated 2026-08-23
𝕾 Selected Notes to Structured Text (for LLMs)

Exports selected Anki notes as LLM-friendly structured text—copyable or saved—preserving field contents unchanged while including note type, deck path, and optionally tags.

export

2 votes 34% approval 👍 2 · 👎 0 ⭐ 3 Anki 26.09~ Updated 2026-08-24
𝕾 Export Deck Tree as Text (for LLMs)

Exports the collection’s normal deck hierarchy as Markdown full paths, copied to the clipboard or saved as a UTF-8 file for use as LLM context or structural review.

exportdeck-management

4 votes 51% approval 👍 4 · 👎 0 ⭐ 3 Anki 26.09~ Updated 2026-08-23
𝕾 Export Deck Guide as Text (for LLMs)

Exports non-empty deck descriptions, with full deck paths and Markdown/HTML format markers, to the clipboard or a UTF-8 file for inspection and LLM context.

export

2 votes 34% approval 👍 2 · 👎 0 ⭐ 3 Anki 26.09~ Updated 2026-08-28
LLM Review Stats Exporter

Exports Anki review history to CSV or JSONL for use with LLMs, with deck, time, tag, interval, and field filters plus optional summary files.

exportstatistics

5 votes 57% approval 👍 5 · 👎 0 ⭐ 5 Anki 2.1.66~ Updated 2026-07-22

Description

Larger or more specialized Anki collections often rely on custom fields to organize different kinds of content. As a collection develops, tacit conventions emerge about the meaning and use of those fields and tags. These conventions are essential collection-level metadata for interpreting the collection correctly, not least when notes are assessed with or generated by an LLM.

Ideally this documentation should reside within the collection itself rather than in an external file. One simple way to achieve this is to store a field and tag legend as an HTML comment in a card template: the text remains hidden during review but is easy to inspect or edit and stays with the collection. This add-on exports the complete legend as plain text with a single command, either to the clipboard or to a file.

Export Field and Tag Legend as Text complements Export Deck Guide as Text, Export Deck Tree as Text, Export Note Types as Text, and Export Tags as Text. Together, these five add-ons provide collection-level context. In the Browser, Selected Notes to Structured Text supplies the selected notes to which that context can be applied, whether for assessment or as exemplars for note generation.

Usage

Export menu with Field and Tag Legend commands

Choose either of the following menu items:

  • Export → Copy Field and Tag Legend as Text
  • Export → Save Field and Tag Legend as Text…

Both commands export the same legend: Copy Field and Tag Legend as Text places it on the clipboard; Save Field and Tag Legend as Text… writes it to a UTF-8 text file, by default named anki-field-tag-legend-YYYY-MM-DD.txt.

Configuration

The legend location, marker, and keyboard shortcuts can be changed under Tools → Add-ons → Export Field and Tag Legend as Text → Config. The default configuration is:

{
    "location": {
        "card_type": "Card 1",
        "note_type": "Basic"
    },
    "marker": "# FIELD AND TAG LEGEND",
    "shortcut_copy": "",
    "shortcut_save": "Meta+Ctrl+Shift+L"
}

Location

location.note_type and location.card_type specify the note type and card type whose front template contains the legend.

Marker

The legend must be stored in an HTML comment containing the configured marker:

<!--

# FIELD AND TAG LEGEND

[Legend goes here.]

-->

The marker must occur exactly once in the configured front template. The comment delimiters <!-- and --> and any leading or trailing whitespace are not included in the exported text. If the configured note type or card type cannot be found, the marker is missing or occurs more than once, or the marker is not inside a complete HTML comment, the add-on reports the problem and exports nothing.

The add-on only reads the template; it does not modify the template or any other part of the collection.

Field and Tag Legend stored in a card template

Shortcuts

shortcut_save sets the shortcut for Save Field and Tag Legend as Text… The default shortcut is Meta+Ctrl+Shift+L (⌃⇧⌘L); set it to "" to disable it. shortcut_copy sets the shortcut for Copy Field and Tag Legend as Text. It is disabled by default. No restart is required.

Format

The exported text is the contents of the matching HTML comment. The <!-- and --> delimiters are omitted, leading and trailing whitespace is removed, and internal line breaks and spacing are preserved.

For example, the template comment:

<!--

# FIELD AND TAG LEGEND

## Field Legend

`NTS` — Notes

## Tag Legend

`#df` — Definition

-->

is exported as:

# FIELD AND TAG LEGEND

## Field Legend

`NTS` — Notes

## Tag Legend

`#df` — Definition
 

Compatibility

Tested with Anki 26.08 on macOS Tahoe 26. Windows and Linux have not yet been tested.

Suggestions and bug reports are welcome. Please open an issue on GitHub.

README

Export Field and Tag Legend as Text

Larger or more specialized Anki collections often rely on custom fields to organize different kinds of content. As a collection develops, tacit conventions emerge about the meaning and use of those fields and tags. These conventions are essential collection-level metadata for interpreting the collection correctly, not least when notes are assessed with or generated by an LLM.

Ideally this documentation should reside within the collection itself rather than in an external file. One simple way to achieve this is to store a field and tag legend as an HTML comment in a card template: the text remains hidden during review but is easy to inspect or edit and stays with the collection. This add-on exports the complete legend as plain text with a single command, either to the clipboard or to a file.

Export Field and Tag Legend as Text complements Export Deck Guide as Text, Export Deck Tree as Text, Export Note Types as Text, and Export Tags as Text. Together, these five add-ons provide collection-level context. In the Browser, Selected Notes to Structured Text supplies the selected notes to which that context can be applied, whether for assessment or as exemplars for note generation.

Installation

Install Export Field and Tag Legend as Text from AnkiWeb using add-on code 1931887561.

Usage

Export menu with Field and Tag Legend commands

Choose either of the following menu items:

  • Export → Copy Field and Tag Legend as Text
  • Export → Save Field and Tag Legend as Text…

Both commands export the same legend: Copy Field and Tag Legend as Text places it on the clipboard; Save Field and Tag Legend as Text… writes it to a UTF-8 text file, by default named anki-field-tag-legend-YYYY-MM-DD.txt.

Configuration

The legend location, marker, and keyboard shortcuts can be changed in the add-on’s configuration dialog:

Tools → Add-ons → Export Field and Tag Legend as Text → Config

The default configuration is:

{
    "location": {
        "card_type": "Card 1",
        "note_type": "Basic"
    },
    "marker": "# FIELD AND TAG LEGEND",
    "shortcut_copy": "",
    "shortcut_save": "Meta+Ctrl+Shift+L"
}

Location

location.note_type and location.card_type specify the note type and card type whose front template contains the legend.

Marker

The legend must be stored in an HTML comment containing the configured marker:

<!--

# FIELD AND TAG LEGEND

[Legend goes here.]

-->

The marker must occur exactly once in the configured front template. The comment delimiters <!-- and --> and any leading or trailing whitespace are not included in the exported text.

For safety, if the configured note type or card type cannot be found, the marker is missing or occurs more than once, or the marker is not inside a complete HTML comment, the add-on reports the problem and exports nothing.

The add-on only reads the template; it does not modify the template or any other part of the collection.

Field and Tag Legend stored in a card template

Shortcuts

shortcut_save sets the shortcut for Save Field and Tag Legend as Text… The default shortcut is Meta+Ctrl+Shift+L (⌃⇧⌘L); set it to "" to disable it.

shortcut_copy sets the shortcut for Copy Field and Tag Legend as Text. It is disabled by default.

On macOS, Qt interprets Meta as Control (⌃), Ctrl as Command (⌘), Alt as Option (⌥), and Shift as Shift (⇧).

No restart is required.

Format

The exported text is the contents of the matching HTML comment. The <!-- and --> delimiters are omitted, leading and trailing whitespace is removed, and internal line breaks and spacing are preserved.

For example, the template comment:

<!--

# FIELD AND TAG LEGEND

## Field Legend

`NTS` — Notes

## Tag Legend

`#df` — Definition

-->

is exported as:

# FIELD AND TAG LEGEND

## Field Legend

`NTS` — Notes

## Tag Legend

`#df` — Definition

Compatibility

Tested with Anki 26.08 on macOS Tahoe 26. Windows and Linux have not yet been tested.

License

Licensed under the GNU AGPL v3 or later.