Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write a Memacs module for Podcast Addict (an Android podcatcher) #129

Open
novoid opened this issue Nov 3, 2024 · 0 comments
Open

Write a Memacs module for Podcast Addict (an Android podcatcher) #129

novoid opened this issue Nov 3, 2024 · 0 comments

Comments

@novoid
Copy link
Owner

novoid commented Nov 3, 2024

I've analyzed the approach of using a backup file to generate an Org-mode file that contains all listened Podcast Addict episodes with their finishing time-stamp.

PodcastAddict_autoBackup_20241102_210006.backup is a ZIP file with two files:

  1. com.bambuna.podcastaddict_preferences.xml the app settings
  2. podcastAddict.db: a SQLite 3.x database

The DB file itself contains all the necessary data in two of the many tables:

table "podcasts" has at least entries for:

  • "name" (string): name of the podcast
    • example: "Methodisch inkorrekt!"
  • "_id" (integer): ID of the podcast
    • example: "17098"
  • "homepage" (string): optional homepage of the podcast

table "episodes" has at least entries for:

  • "podcast_id" (integer) which maps to "_id" from table "podcasts"
    • example: "17098"
  • "playbackDate" (integer): UNIX epoch in miliseconds
    • example: "1718225660587" (stands for: 2024-06-12 20:54:20.587000)
  • "name" (string): title of the episode
    • example: "Mi319 – "Bildungswesen""
  • "content" (HTML string): shownotes and description (multi-line!)
    • example:
    ... direkt aus der Literatur der Wissenschaft.
    <!-- wp:paragraph -->
    <p><strong>Inhalt</strong><br><a href="podcastaddict:0">00:00:00</a>  Intro<br><a href="podcastaddict:195000">00:03:15</a>  Begrüßung<br><a href="podcastaddict:649000">00:10:49</a>  Abgelehntes Paper</p>
    <!-- /wp:paragraph -->
    <!-- wp:paragraph -->
    <p><strong>Reini ist wieder da</strong> – die Buddys sind wieder vereint! </p>
    <!-- /wp:paragraph -->
[...]
  • "url" (string) → url of episode!
  • "duration" (string): duration in the format of: HH:MM:SS
    • example: "02:10:20"
  • "seasonNB" (integer): optional number of the season
    • example: 42
  • "episodeNB" (integer): optional episode within the season
    • example: 319
  • "transcript_url (JSON string): URL of the transcript
    • example: "{"urls":[{"type":"srt","url":"https://feeds.buzzsprout.com/1924539/9974188/transcript.srt"},{"type":"json","url":"https://feeds.buzzsprout.com/1924539/9974188/transcript.json"},{"type":"html","url":"https://feeds.buzzsprout.com/1924539/9974188/transcript"}]}"

That can be transformed in headings like:

** <2024-06-12 Wed 20:54> [[https://minkorrekt.de/mi319-bildungswesen/][Mi319 – "Bildungswesen"]] ([[http://www.minkorrekt.de][Methodisch inkorrekt!]] S42E319)

- [[https://feeds.buzzsprout.com/1924539/9974188/transcript.srt][Transcript]]

Description:

... direkt aus der Literatur der Wissenschaft.

*Inhalt*
00:00:00  Intro
00:03:15  Begrüßung
00:10:49  Abgelehntes Paper
[...]

You can use the example module that parses arbitrary CSV files: https://github.com/novoid/Memacs/blob/master/memacs/csv.py This should give you a quick overview how to use the framework in order to write the output without having to format too much on your own.

This should be doable within a couple of hours of work even if this is your first Memacs module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant