01 Part B: an asset store (dictionaries)

The same mechanism installs anything made of several files. StarDict dictionaries live in /dictionaries/<name>/:

dicts.json

  {
    "items": [
      {
        "id": "en-en-wiktionary",
        "title": "English (Wiktionary)",
        "info": "English-English, about 40 MB",
        "base": "https://example.com/dicts/en-en/",
        "files": ["en-en.ifo", "en-en.idx", "en-en.dict.dz", "en-en.syn"]
      }
    ]
  }

device.json

  {
    "title": "Dictionary Store",
    "browse": {
      "url": "https://example.com/dicts/dicts.json",
      "items": "items",
      "fields": { "title": "title", "author": "info", "id": "id", "description": "info" }
    },
    "download": {
      "dest_dir": "/dictionaries",
      "bundle": { "base": "base", "files": "files", "subdir": "{id}" }
    }
  }

There's no version tracking here (that only works for plugin folders), so the button says Fetch, and re-fetching overwrites.
Reader file (.txt)