You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An AnkiApp deck for import can be a valid .xml file (.xml extension with any name) or a zip file with .zip extension (any name) that at least includes a single valid deck .xml file (and optional blobs). The deck xml format will be described below.
Deck XML schema
Header
The deck header includes a <deck> tag with attribute name for the name of the deck with optional parameter tags for deck tags to be added (comma separated).
Next, we include the field configuration for the deck. In this example, we will have two fields, one for a manually inputted English word, and one field that automatically translates to French, using the English field as the source:
For a text field type, sources can be defined that feed or populate the text field. For example, a translation field can feed a translated value FROM a source field (see the example above). To define a reference field, use a tag with attribute "name" that is the name of the source field.
Deck Cards
Finally, we include the card data for the deck. Note that imported decks can have cards manually added after import, so the import does not have to be exhaustive.
+-------------+-------------+----------------------------------------------+-----------------------------------------------------+
| Type | Tag | Example Header | Example Value |
+-------------+-------------+----------------------------------------------+-----------------------------------------------------+
| TTS | tts | <tts lang="en-US" rate={0.8} /> | <tts lang="en-US">text to speak</tts> |
| Text | text | <text lang="en-US" /> | Whatever plain text |
| Rich Text | rich-text | <rich-text lang="en-US" /> | <rich-text lang="en-US">Be <b>bold</b>.</rich-text> |
| Markdown | markdown | <markdown /> | <markdown># Be ahead</markdown> |
| Code | code | <code lang="javascript" /> | <code>null == undefined == true</code> |
| TeX | tex | <tex /> | <tex>x^2</tex > |
| Audio | audio | <audio /> | <audio id="{SHA_256 hash of file}" /> |
| Image | img | <img /> | <img id="{SHA_256 hash of file}" /> |
| Video | video | <video /> | <video id="{SHA_256 hash of file}" /> |
| Japanese | japanese | <japanese furigana="hint|always|back|off" /> | <japanese>こんにちは</japanese> |
| Translation | translation | <translation /> | <text lang="en-US">Good morning.</text> |
| Chinese | chinese | <chinese pinyin="hint|always|back|off" /> | <chinese lang="zh-CN">你好</chinese> |
+-------------+-------------+------------------------------------------------------------------+---------------------------------+
Note that for audio, image, and video tags, there must be an "id" parameter with the value set to the base 16 SHA256 hash of the blob. Additionally, all the files must be placed in the zip file "blobs" directory. They can have any file name.
The text was updated successfully, but these errors were encountered:
Source: https://www.ankiapp.com/support/solutions/f7c77364/how-to-import-ankiapp-decks-zip-xml-/
How to import AnkiApp decks (.zip, .xml)
File format
An AnkiApp deck for import can be a valid .xml file (.xml extension with any name) or a zip file with .zip extension (any name) that at least includes a single valid deck .xml file (and optional blobs). The deck xml format will be described below.
Deck XML schema
Header
The deck header includes a
<deck>
tag with attribute name for the name of the deck with optional parameter tags for deck tags to be added (comma separated).<deck name="French Translation Deck" tags="deck_tag_1,deck_tag_2">
Deck Fields
Next, we include the field configuration for the deck. In this example, we will have two fields, one for a manually inputted English word, and one field that automatically translates to French, using the English field as the source:
Sources and reference tags
For a text field type, sources can be defined that feed or populate the text field. For example, a translation field can feed a translated value FROM a source field (see the example above). To define a reference field, use a tag with attribute "name" that is the name of the source field.
Deck Cards
Finally, we include the card data for the deck. Note that imported decks can have cards manually added after import, so the import does not have to be exhaustive.
Card Tags
To add tags to cards, add the "tags" attribute and set the value as a comma separated list of tag names:
Closing tag
We complete the deck with a closing tag. Our full example is below:
Deck field specification
The full deck field specification is as follows:
Note that for audio, image, and video tags, there must be an "id" parameter with the value set to the base 16 SHA256 hash of the blob. Additionally, all the files must be placed in the zip file "blobs" directory. They can have any file name.
The text was updated successfully, but these errors were encountered: