← Back to support

How to import AlgoApp decks (.zip, .xml)

Supported import files

AlgoApp can import:

  • a single ".xml" file
  • a ".zip" file that contains at least one valid deck XML file
  • optional media files inside a "blobs" folder when the deck uses audio, images, or video

If you do not need a custom XML workflow, use CSV or APKG import instead. XML import is mainly for advanced or automated imports.

Minimal deck example

<deck name="French Translation Deck">
  <fields>
    <text lang="en-US" name="Text" sides="11"></text>
    <text lang="fr-FR" name="Translation" sides="01">
      <sources>
        <translation>
          <ref name="Text" />
        </translation>
      </sources>
    </text>
  </fields>
  <cards>
    <card>
      <field name="Text">Hello</field>
      <field name="Translation">Bonjour</field>
    </card>
  </cards>
</deck>

Main parts of the file

Deck header

The root "" tag defines the deck name. You can also add optional deck tags with a comma-separated "tags" attribute.

Fields

Inside "", define the fields used by the deck. Common field types include:

  • text
  • rich-text
  • markdown
  • code
  • tex
  • tts
  • audio
  • img
  • video
  • translation
  • japanese
  • chinese

Cards

Inside "", each "" contains one or more "<field name="...">value" entries. You can add card tags like this:

<card tags="tag1,tag2">
  <field name="Front">Hello</field>
  <field name="Back">Goodbye</field>
</card>

Media files

For audio, image, and video fields:

  • the field value must reference a blob id
  • the blob id must be the SHA-256 hex hash of the file
  • the actual files must be included in a "blobs" folder inside the ZIP import

Tip

Start with a very small deck first. Once that imports correctly, expand your file format or automation.

Deck field specification

The full deck field specification is as follows:

+-------------+-------------+----------------------------------------------+-----------------------------------------------------+
| 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's "blobs" directory. They can have any file name.