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.1.tar.gz (25.8 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.1-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ovos_skill_bechstein_tales-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f041adae6decf3412d3b5e804b3a6737e42db2c7f8c9db5a4238de626a0b7055
MD5 af12225e6f2220b284b94752c65c4d30
BLAKE2b-256 74f27a14bb79a5ace59d9f30c044aae97630763a222d4693594db66488d7f92d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ovos_skill_bechstein_tales-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_skill_bechstein_tales-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b285c9e3b4cd87a6cd696521fa4e45fa01bdd9164f8a8d7c5aa0dba2ed133672
MD5 ddbd1e00f6a5bbaf4ecc2dcb4c35bec5
BLAKE2b-256 1684956add76f6e7efcdebba197465666b8d1474c1e0439eecafeb94caf4e643

See more details on using hashes here.

Provenance

The following attestation bundles were made for ovos_skill_bechstein_tales-0.1.1-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