Skip to main content

Ludwig Bechstein's German fairy tales provider skill for ovos-common-reading-pipeline-plugin

Project description

Bechstein Tales (provider)

A provider skill for ovos-common-reading-pipeline-plugin, delivering Ludwig Bechstein's German fairy tales.

Bechstein was a contemporary of the Brothers Grimm and published his own hugely popular collection - a genuinely different source, not just "more Grimm" (though a few titles overlap, since both drew from the same regional oral tradition).

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.

German only, no translation. Same situation as ovos-skill-andrew-lang-tales, just for German instead of English - full fairy tale prose is a bigger translation cost/quality risk than a blog post or abstract. On any device language other than German, this provider never loads at all: initialize() checks the device's language against SUPPORTED_LANGUAGES = {"de"} before loading the index or registering any bus events, logging why. Set your OVOS device's language to German (de-*) to use this provider.

Install

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

Story index

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

80 stories from Ludwig Bechstein's Märchenbuch (Project Gutenberg ebook #63465). The index was built once via scripts/build_index.py, which parses the book's own "Inhalt" (table of contents) table rather than assuming every <div class="chapter"> is a real story - one entry ("Alphabetisches Verzeichnis der Märchen", the book's own index) was correctly excluded this way since it has no story paragraphs.

Two real bugs were found and fixed while building this:

  • Encoding: the Gutenberg page doesn't declare a charset in its HTTP headers, so requests defaulted to ISO-8859-1 and mangled German text (AschenbrödelAschenbrödel). Fixed by setting r.encoding = "utf-8" explicitly.
  • Drop caps: get_text(' ', strip=True) inserts a spurious space at drop-cap span boundaries (<span>E</span>s war einmalE s war einmal, splitting the first word). Fixed by extracting text with no separator and instead collapsing the source HTML's line-wrapped whitespace with a regex - the same class of bug as ovos-skill-ovosblog's inline-<code> finding, different cause.

Collection hints

Responds to collection_hint values like "bechstein", "ludwig bechstein", 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.

Category

Entertainment

Tags

#stories #fairytales #bechstein #german #provider

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos_skill_bechstein_tales-0.1.0.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovos_skill_bechstein_tales-0.1.0-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file ovos_skill_bechstein_tales-0.1.0.tar.gz.

File metadata

File hashes

Hashes for ovos_skill_bechstein_tales-0.1.0.tar.gz
Algorithm Hash digest
SHA256 db4b6814c1bea90c1dcec709676df76a40f4d295b01dd1b1980eff9c393efd2f
MD5 2390822779a1a5b6ca092d3f807be453
BLAKE2b-256 b9cc96162291246e103c33b43e989c7948c131e1a6293e11070407589d339ae2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ovos_skill_bechstein_tales-0.1.0.tar.gz:

Publisher: publish.yml on andlo/ovos-skill-bechstein-tales

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ovos_skill_bechstein_tales-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_skill_bechstein_tales-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 972e12af5d6bfb65f14355accaef7ecef59c20fbe9524df551298721a45ad6c1
MD5 e1bacbaf0156fa6528d40bc4f547dd81
BLAKE2b-256 a6c22abbe1612d141e8439eafb1437dea73bb81e381dc1b71054b13f3e73f64a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ovos_skill_bechstein_tales-0.1.0-py3-none-any.whl:

Publisher: publish.yml on andlo/ovos-skill-bechstein-tales

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page