Skip to main content

Reads daily zodiac horoscopes aloud - provider skill for ovos-common-reading-pipeline-plugin

Project description

Horoscope Readings (provider)

A provider skill for ovos-common-reading-pipeline-plugin, reading daily zodiac horoscopes aloud.

Sourced from freehoroscopeapi.com - a free, open REST API, no API key required.

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.

Install

pip install ovos-skill-horoscope-readings ovos-common-reading-pipeline-plugin

How this provider is architecturally different

Every other provider in this family scrapes or fetches a list of titles, caches it, and refreshes it periodically. This one doesn't - the 12 zodiac signs never change, so they're the entire "index", hardcoded and static. Only the actual horoscope text needs a live API call, made fresh every time (no caching), since it's different every day and the request is cheap and fast (a plain JSON REST call, no scraping).

Translation - two different mechanisms for two different things

  1. Zodiac sign names ("Leo", "Løven", "Löwe", "Lion", ...) - fixed, well-known, enumerable terms, bundled per-language in locale/<lang>/zodiac_signs.json rather than relying on a live translation plugin for individual out-of-context words (which risks poor-quality single-word translations). Falls back to the English names for any language without a bundled translation.
  2. The horoscope text itself - genuinely dynamic daily content, so this does use live translation, same pattern as ovos-skill-ovosblog/ovos-skill-arxiv-papers/ ovos-skill-365tomorrows-stories. Disclosed via "machine_translated": true/false in the search response.

Like those three translating providers, this one always loads regardless of device language (no SUPPORTED_LANGUAGES gate) - collection_hint aliases are loaded from locale/<lang>/collection.voc with an English fallback for any language we haven't translated - see ovos-common-reading-pipeline-plugin#26.

No "surprise me"

Unlike a story provider, a search with a matching collection_hint but no specific sign named declines to respond rather than picking one at random - reading someone the wrong zodiac sign's horoscope isn't a fun surprise, it's just wrong. You have to actually name a sign ("read me my Leo horoscope").

Collection hints

Responds to collection_hint values in the device's own language - e.g. "horoscope"/"zodiac"/"astrology" on English, "horoskop"/ "stjernetegn" on Danish - matched fuzzily against that language's own alias list (see locale/<lang>/collection.voc).

Content type

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

A regression worth knowing about

Early testing found ovos_utils.parse.match_one() picking "Pisces" for the phrase "leo horoscope" - its character-overlap scoring got confused by incidental shared letters once an extra word ("horoscope") was in the phrase, the same class of false positive as "andrew lang" scoring high against "andersen" elsewhere in this project. Fixed with _match_sign(): since zodiac names are a small, fixed, single-word vocabulary, an exact whole-word match is tried first, only falling back to fuzzy match_one() for near-misses (e.g. a slightly misheard STT transcription).

Credits

Content sourced from freehoroscopeapi.com - free and open, no API key required.

Category

Entertainment

Tags

#horoscope #astrology #zodiac #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_horoscope_readings-0.1.1.tar.gz (28.2 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_horoscope_readings-0.1.1-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ovos_skill_horoscope_readings-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1121687e058cf0dbb8b7cec084cf01fb71172cede94ca0ad9de01ce140a516b7
MD5 0f477ccca582589174501a5c3f0c0b65
BLAKE2b-256 e6f9cc384315132d97676c0b0ef802a56980fd0638745f85200bb7748f2dbfda

See more details on using hashes here.

Provenance

The following attestation bundles were made for ovos_skill_horoscope_readings-0.1.1.tar.gz:

Publisher: publish.yml on andlo/ovos-skill-horoscope-readings

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_horoscope_readings-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_skill_horoscope_readings-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77d9c22559a088491666283fa9ec30d9e3f3487aacd2eba379f12b5595de39b0
MD5 d972758eefafd0e060a0539a25941843
BLAKE2b-256 96faf997a339f6ea24ae3ea9b8eb5d0296ab02e855af3df802133503d2fe878c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ovos_skill_horoscope_readings-0.1.1-py3-none-any.whl:

Publisher: publish.yml on andlo/ovos-skill-horoscope-readings

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