Skip to main content

Cosquin Tales (provider)

A provider skill for ovos-common-reading-pipeline-plugin, delivering Emmanuel Cosquin's collection of Lorraine (French regional) folk tales.

A genuinely different register than ovos-skill-perrault-tales-style literary fairy tales: these are folk-collected, with the collector's own comparative scholarly notes ("Remarques") on how each tale relates to variants told elsewhere in France and abroad (excluded from what's read aloud - see below).

Tests PyPI version

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.

French only, no translation. Same situation as ovos-skill-andrew-lang-tales/ovos-skill-bechstein-tales, just for French. It answers searches made in French (fr-*) and stays silent for every other language, and only loads where French is configured - the device language or secondary_langs (see "Languages" below).

Install

pip install ovos-skill-cosquin-tales ovos-common-reading-pipeline-plugin

Story index

The story index (title, anchor per story) is bundled with this package (locale/fr-fr/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.

30 stories from volume 1 of Cosquin's "Contes populaires de Lorraine" (Project Gutenberg ebook #57892). The index was built via scripts/build_index.py, which scans for <h2 id="ROMAN_NUMERAL"> headings (the book's own per-story anchoring) and excludes non-story sections (front matter, appendices) by requiring the id to actually look like a Roman numeral.

Known gap: volume 2 not included. Volume 2 (ebook #50838) uses a different, page-number-based anchor scheme (<a id="Page_N"> nested inside an unlabelled <h2>, rather than the h2 itself carrying a roman-numeral id) - the same class of problem that excluded the Olive Fairy Book from ovos-skill-andrew-lang-tales. Not handled yet; a follow-up could add volume 2's ~30 additional stories with a second anchor-extraction path.

Story extraction stops each tale at the following <h3>REMARQUES</h3> - the scholarly comparative commentary that follows every story here is deliberately excluded from what gets read aloud, not just the next story's heading.

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. The index points at the page itself (/cache/epub/57892/pg57892-images.html), not at /ebooks/57892.html.images, which answered with two redirects. 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 book again. When a fetch fails, it is not tried again for five minutes, and an older copy is read meanwhile if there is one. When the cache directory cannot be written, the book's stories are kept in memory instead. Requests say who is asking: ovos-skill-cosquin-tales/<version> (+https://github.com/andlo/ovos-skill-cosquin-tales).

What is read is the tale, with its songs line by line (the doe's song in La Biche blanche is a <div class="verse"> and used to be skipped), without the page numbers ([p. 234]) or footnote numbers. Peuil & Punce is printed in the Lorraine dialect beside its French translation; only the French is read.

Languages

The provider loads only where French 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 French lists it there, even when the hub's own language is something else:

{
  "lang": "en-US",
  "secondary_langs": ["fr-FR"]
}

Once loaded, it decides per search whether to answer: a search made in French 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 get these stories on a hub whose own language is English, and an English session must not get French ones. A ping that names a language (the same way) only gets a pong when that is French. Fetching a story is never gated on language - it is addressed to this provider directly.

Title matching

The book prints every title in capitals (LA BICHE BLANCHE). Titles match regardless of case, accents, punctuation, & (read as "et") and a leading article, so "la biche blanche", "biche blanche" and "l'oiseau de verite" all find their story at full confidence; the part before a title's first comma counts too, slightly below the whole title ("la bourse"). The title that gets spoken is in ordinary case - La Biche Blanche, Le Roi d'Angleterre et son Filleul - since a TTS engine may spell capitals out letter by letter; content_id stays the index's own capitalised title. A search that names no title at all ("raconte-moi une histoire") gets one random story at confidence 0.9, or 1.0 when it named this collection.

Collection hints

Responds to collection_hint values like "cosquin", "lorraine", "lorraine tales", "contes de lorraine", "emmanuel cosquin", matched fuzzily (see COLLECTION_ALIASES in __init__.py).

Content type

Identifies as content_type: "story" or "tale". A search with a content_type hint for anything else gets no response from this provider.

Credits

Content sourced from Project Gutenberg. Scraping/extraction/caching logic ported from ovos-skill-andrew-lang-tales and ovos-skill-bechstein-tales.

Category

Entertainment

Tags

#stories #fairytales #folklore #cosquin #lorraine #french #provider

Metadata

Release files for ovos-skill-cosquin-tales 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ovos-skill-cosquin-tales 0.1.6
File Size Uploaded
ovos_skill_cosquin_tales-0.1.6.tar.gz 42.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ovos-skill-cosquin-tales 0.1.6
File Interpreter ABI Platform
ovos_skill_cosquin_tales-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 73.0 kB

Release files / ovos_skill_cosquin_tales-0.1.6.tar.gz

Download URL ovos_skill_cosquin_tales-0.1.6.tar.gz
Size 42.2 kB
Tags Source
SHA-256 checksum
How to use checksums
71b9e26b97d70a2db7aff36434736b1616b1b99e76678427516f9615ea5c5b5d
BLAKE2b-256 checksum
How to use checksums
a2c35585a1d90c701e39d0517835f2b50a847791e533c9246ccc0250b7028e99
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 30, 2026.

Transparency log

Release files / ovos_skill_cosquin_tales-0.1.6-py3-none-any.whl

Download URL ovos_skill_cosquin_tales-0.1.6-py3-none-any.whl
Size 30.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38d59cc3e24f7073f438b44b1ad3d27a09d3232c4ce38fd3ca651f9cf4eb5e75
BLAKE2b-256 checksum
How to use checksums
cb070328b22881e1e72a920e5a76d194ef799c90dd31fdf5744c0dd20ef55064
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 30, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.7

2 release files

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page