Andrew Lang Tales (provider)
A provider skill for ovos-common-reading-pipeline-plugin, delivering Andrew Lang's twelve "Coloured" Fairy Books.
"These fairy tales are the oldest stories in the world." — Andrew Lang, preface to The Green Fairy Book
This skill has no standalone voice interface. It registers no intents and never speaks. It only answers ovos.common_reading.* bus messages, so you also need ovos-common-reading-pipeline-plugin installed and added to your pipeline config for it to be useful at all.
English only, no translation. Unlike
ovos-skill-andersen-tales/ovos-skill-grimm-tales(real per-language sources) orovos-skill-ovosblog/ovos-skill-arxiv-papers(machine-translated), this provider has no non-English content and does not attempt to translate - the stories themselves are long, literary prose, where per-request machine translation is both expensive and a much bigger quality risk than translating a short blog post or paper abstract (see ovos-common-reading-pipeline-plugin#5 for the reasoning). It answers searches made in English (en-*) and stays silent for every other language, and only loads where English is configured - the device language orsecondary_langs(see "Languages" below).
Install
pip install ovos-skill-andrew-lang-tales ovos-common-reading-pipeline-plugin
Story index
Unlike the other providers here, the story index (title, book, author,
Project Gutenberg anchor per story) is bundled with this package
(locale/en-us/index.json), not scraped live - browsing/matching needs
no internet at all. Only fetching a specific story's actual text (once
chosen) needs a live request to Project Gutenberg.
382 stories across 11 of Andrew Lang's 12 "Coloured" Fairy Books
(the 12th, the Olive Fairy Book, uses an incompatible page-based
anchor scheme on Gutenberg and isn't included - tracked as a known gap,
see scripts/build_lang_index.py's docstring).
The index was built once via scripts/build_lang_index.py, which:
- Fetches Andrew Lang's master index (Gutenberg ebook #30580)
- Repairs anchors for books Gutenberg has since re-published with a different scheme (Red and Brown Fairy Books)
- Validates every entry actually extracts real text before including it
Fetching and what gets read
Reading a story fetches its book from Project Gutenberg once, extracts
the text of every story in that book, and keeps it on disk under the
skill's cache directory (<XDG cache>/mycroft/skills/<skill_id>/, one
small JSON file per story). Another story from the same book, or the
same story after a restart, needs no request. After 30 days a
story is checked again with If-Modified-Since, which downloads nothing
when the book has not changed; a change to the extractor (CACHE_FORMAT)
fetches the books again. When a fetch fails, that book is not asked for
again for five minutes, and an older copy is read meanwhile if there is
one. When the cache directory cannot be written, the last book fetched
is kept in memory instead. Requests say who is asking:
ovos-skill-andrew-lang-tales/<version> (+https://github.com/andlo/ovos-skill-andrew-lang-tales).
What is read is the tale: paragraphs with the page's line wraps joined,
and the rhymes line by line (they are <pre> blocks and used to be
skipped). Footnotes and their numbers, the editor's note on where a tale
came from ("Grimm.", "[From Ungarische Mährchen.]"), bare section
numbers and Gutenberg's licence are left out. A story also ends where a
tale the index does not have begins, instead of running on into it.
Languages
English only. Andrew Lang's Fairy Books are sourced from Project Gutenberg in English; no other language editions exist for this collection, and this provider makes no attempt to machine-translate (see the note above).
The provider loads only where English is one of the languages the
installation is configured for: the device's own lang, or one of
secondary_langs in mycroft.conf. A single device in another
language never loads it. A HiveMind hub whose users speak English lists
it there, even when the hub's own language is something else:
{
"lang": "da-DK",
"secondary_langs": ["en-US"]
}
Once loaded, it decides per search whether to answer:
a search made in English gets an answer, any other language gets none.
The language of a search is the pipeline plugin's lang field, else the
language of the session the search came from, else (an older plugin
sends neither) the device's own language. That matters on a HiveMind
hub, where one ovos-core serves many users at once, each session in its
own language: a French session must not get English stories, and an
English session must still get them on a hub whose own language is
French. A ping that names a language (the same way) only gets a pong
when that is English. Fetching a story is never gated on language - it
is addressed to this provider directly.
Title matching
Titles match regardless of case, accents, punctuation, a leading article and a leading "Story Of" / "History Of" / "Tale Of", so "the six swans" finds The Six Swans and "the three bears" finds The Story Of The Three Bears at full confidence. For "X, Or Y" titles each half counts too, slightly below the whole title: "cinderella" finds Cinderella, Or The Little Glass Slipper and "puss in boots" The Master Cat; Or, Puss In Boots. A search that names no title at all ("tell me a story") gets one random story at confidence 0.9, or 1.0 when it named this collection.
Collection hints
Responds to collection_hint values like "andrew lang", "lang", "the
fairy books", matched fuzzily (see COLLECTION_ALIASES in
__init__.py). "lang" alone is short enough to be worth double-checking
for false positives - verified via match_one against "grimm",
"andersen", "arxiv", "language", etc.
Content type
Identifies as content_type: "story" or "tale". A search with a
content_type hint for anything else (e.g. "article", "paper") gets no
response from this provider.
Credits
Content sourced from Project Gutenberg. Scraping/extraction logic ported from ovos-skill-worldtales (archived - this provider supersedes it).
Category
Entertainment
Tags
#stories #fairytales #gutenberg #provider
Metadata
Release files for ovos-skill-andrew-lang-tales 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ovos_skill_andrew_lang_tales-0.1.7.tar.gz | 50.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ovos_skill_andrew_lang_tales-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 87.3 kB
Release files / ovos_skill_andrew_lang_tales-0.1.7.tar.gz
| Download URL | ovos_skill_andrew_lang_tales-0.1.7.tar.gz |
|---|---|
| Size | 50.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8639969f3977b730c3f3a600cf77337e33a5f8dcff5d73513bbd3279fdcbf6d2
|
|
BLAKE2b-256 checksum How to use checksums |
22d57da276c9c2de0e19e24f827cbf73118e6de6e47baf5fe6767a755351a279
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logRelease files / ovos_skill_andrew_lang_tales-0.1.7-py3-none-any.whl
| Download URL | ovos_skill_andrew_lang_tales-0.1.7-py3-none-any.whl |
|---|---|
| Size | 37.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb0fc616c77b6c2567d551c60f5785157b515bf2ba236dc945ba786363da337a
|
|
BLAKE2b-256 checksum How to use checksums |
063d2ecd562e47243dfdb6a476f5b38c3739083cc538b60207c8488bfadb4645
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency log