Skip to main content

allows synching podcast episodes to creative tonies

Project description

tonie-podcast-sync

tonie-podcast-sync allows synching podcast episodes to creative tonies.

This is a purely private project and has no association with Boxine GmbH.

Constraints and Limitations

Usage

tonie-podcast-sync is available as a pip package on pypi. Install via

pip install tonie-podcast-sync

Then, use it as shown in the following example code:

from toniepodcastsync import ToniePodcastSync, Podcast, EpisodeSorting

# Create some Podcast objects, providing the feed URL to each
pumuckl = Podcast("https://feeds.br.de/pumuckl/feed.xml")

# By default, podcasts are placed onto Tonies by newest episode first
# If you want to change the episode sorting, following options are available
# - EpisodeSorting.BY_DATE_NEWEST_FIRST (default)
# - EpisodeSorting.BY_DATE_OLDEST_FIRST
# - EpisodeSorting.RADNOM
maus = Podcast(
    "https://kinder.wdr.de/radio/diemaus/audio/gute-nacht-mit-der-maus/diemaus-gute-nacht-104.podcast",
    episode_sorting = EpisodeSorting.RANDOM
)

# If you want to adjust the volume of a podcast, set volume_adjustment to an integer other than 0
# The audio will be adjusted (+/-) by that amount in dB
anne_und_die_wilden_tiere = Podcast(
    "https://feeds.br.de/anna-und-die-wilden-tiere/feed.xml",
    episode_sorting = EpisodeSorting.RANDOM,
    volume_adjustment = 6
)

# Some Podcasts inject episodes that are very short (e.g. announcing a holiday break).
# `episode_min_duration_sec` can be used to filter out all episodes shorter then this value.
# the example below will skip all episodes shorter then 30 seconds.
checker_tobi = Podcast(
    "https://feeds.br.de/checkpod-der-podcast-mit-checker-tobi/feed.xml",
    episode_sorting = EpisodeSorting.RANDOM,
    episode_min_duration_sec = 30
)

# Create instance of ToniePodcastSync
tps = ToniePodcastSync("<toniecloud-username>", "<toniecloud-password>")

# For an overview of your creative Tonies and their IDs
# The IDs are needed to address specific Tonies in the next step
tps.print_tonies_overview()

# Define creative Tonies based on their ID
greenTonie = "<your-tonieID>"
orangeTonie = "<your-tonieID>"

# Fetch new podcast episodes and copy them to greenTonie.
# The tonie will be filled with as much episodes as fit (90 min max).
tps.sync_podcast_to_tonie(pumuckl, greenTonie)

# Kid's should fall asleep, so let's limit the podcast
# Episodes on this tonie to 60 minutes in total.
# Use the optional parameter for this:
tps.sync_podcast_to_tonie(maus, orangeTonie, 60)

For the tonie to fetch new content from tonie-cloud, you have to press one ear for 3s (until the "ping" sound) with no tonie on the box (refer also to TonieBox manual).

Contributors

Alexander Hartmann
Alexander Hartmann

💻 🤔 🚧
Wilhelmsson177
Wilhelmsson177

💻 🤔 🚧 ⚠️
Malte Bär
Malte Bär

💻

Use the all-contributors github bot to add contributors here.

builds upon work of / kudos to

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

tonie_podcast_sync-2.2.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

tonie_podcast_sync-2.2.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file tonie_podcast_sync-2.2.0.tar.gz.

File metadata

  • Download URL: tonie_podcast_sync-2.2.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Darwin/23.2.0

File hashes

Hashes for tonie_podcast_sync-2.2.0.tar.gz
Algorithm Hash digest
SHA256 cc20a0fb0580e032d8f5bf2250dce0b2326e78fa47712df499bed2a596632342
MD5 11f6631ed997bc0b74e714366f6ae380
BLAKE2b-256 036cc75325bcc4f470b311ee5f93f66bcd686bac2009ed00e52b86dfa504d941

See more details on using hashes here.

Provenance

File details

Details for the file tonie_podcast_sync-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tonie_podcast_sync-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c1674d410fe7eeea1bc1850f4c0aa084a30115f10fc793790186d7d66d22ae1
MD5 186f9df2a70a7f4a23810c88b445f19e
BLAKE2b-256 903d92461d3ba19481f8bbada59ff641c7a205af93f9a2d517ee94bdd77b5591

See more details on using hashes here.

Provenance

Supported by

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