podget

From Gentoo Wiki
Jump to:navigation Jump to:search

This article is a stub. Please help out by expanding it - how to get started.

podget is a simple podcast aggregator optimized for running as a scheduled job written in Bash. Despite its size and complexity podget only has two significant dependencies: wget and iconv. It supports downloading media from the following feed types:

  • RSS.
  • ATOM.
  • iTunes PCAST.

Installation

Emerge

Install media-sound/podget:

root #emerge --ask media-sound/podget

Configuration

Configuration is mostly handled through the podgetrc and serverlist files located in the user's home directory. It's also possible to override the defaults set in these files via command line switches at runtime.

Files

  • ~/.podget/podgetrc — the configuration file location for podget.
  • ~/.podget/serverlist — the list of podcast feeds by URL, category, and podcast name.
  • ~/POD/ — the default location where podget drops fetched podcast media.

Unfortunately, podget does not obey XDG paths by default. For the configuration file, it's possible to fake support for XDG paths by passing podget --config ${XDG_CONFIG_HOME}/podget/podgetrc; assuming the file already exists. In order to redirect podget to do the same with the serverlist file, the option config_serverlist=${XDG_CONFIG_HOME}/podget/serverlist must be set the podgetrc file.

Usage

Typically podget is run in the background via task scheduler such as a cron task or systemd timer.

Scheduled Task

cron

A typical crontab file to periodically run podget might include something like this:

FILE /etc/crontabExample crontab entry
[...]
# Get podcasts daily
02 15 * * * /usr/bin/podget --silent

The above fetches podcast media files at 02:15. The --silent option is required to suppress output.

systemd

The first step is to create a unit file to tell systemd what to run:

FILE podget.service
[Unit]
Description=A service for fetching podcast media.
 
[Service]
Type=simple
ExecStart=/usr/bin/podget --silent
 
[Install]
WantedBy=default.target

With the unit file created it's time to create the timer file to tell systemd when to run the podget service.

FILE podget.timer
[Unit]
Description=Fetch podcast media once per day.

[Timer]
Persistent=true
OnCalendar=*-*-* 02:15:00
Unit=podget.service
 
[Install]
WantedBy=timers.target

Similar to the cron example the above systemd example fetches podcast media at 02:15. If the server is not online at 02:15 then the media is fetched the next time the server comes up.

Removal

Unmerge

root #emerge --ask --depclean --verbose media-sound/podget

See also