pcd

package module
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2018 License: GPL-3.0 Imports: 13 Imported by: 0

README

pcd Build Status

Philosophy

Downloading and listening to podcasts should be simple. It doesn't require massively complex interfaces that eat all your memory and CPU.

Pcd is a simple CLI tool that does nothing more than downloading your favorite podcasts. It doesn't run in the background, it doesn't eat all your memory and/or cpu. Everything that needs to be done is your responsability.

Why?

I wanted to be able to download my favorite podcasts in a simple way, and on the CLI. I stumbled upon a few utilities like marrie. It inspired me to make a version that doesn't need all those annoying python dependencies. Also I wanted to be able to access podcasts that are behind some http authentication method.

Usage

  • You will need to create a configuration file under ~/.config/pcd.yml that has the following options:
  ---
  podcasts:
  - id: 1
    name: biggest_problem
    path: /some/path/to/biggest_problem
    feed: http://feeds.feedburner.com/TheBiggestProblemInTheUniverse
  - id: 2
    name: some_other
    path: /your/podcast/path/to/some_other
    feed:  http://feeds.example.com/SomeOther.rss
    username: foo
    password: bar1234
  • You have to "sync" the feeds: pcd sync
  • (Optionally) List the episodes of a podcast: pcd ls 1 or pcd ls biggest_problem
  • Download the first episode of biggest_problem: pcd d 1 1 or pcd d biggest_problem 1

Contributions

Contributions are welcome, as long as they are in line with the philosophy of keeping it simple and to the point. No features that are out of the scope of this application will be accepted.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCouldNotSync          = errors.New("Could not sync podcast")
	ErrRequestFailed         = errors.New("Could not perform request")
	ErrAccessDenied          = errors.New("Access denied to feed")
	ErrFilesystemError       = errors.New("Could not do filesystem request")
	ErrParserIssue           = errors.New("Could not parse feed")
	ErrEncodeError           = errors.New("Could not encode feed")
	ErrFeedNotFound          = errors.New("Could not find feed (404)")
	ErrCouldNotDownload      = errors.New("Could not download episode")
	ErrCouldNotReadFromCache = errors.New("Could not read episodes from cache. Perform a sync and try again.")
	ErrCouldNotParseContent  = errors.New("Could not parse the content from the feed")
)

Functions

This section is empty.

Types

type Episode

type Episode struct {
	Title  string
	Date   time.Time
	URL    string
	Length int
}

func (*Episode) Download

func (e *Episode) Download(path string, writer io.Writer) error

Download downloads an episode in 'path'. The writer argument is optional and will just mirror everything written into it (useful for tracking the speed)

type Podcast

type Podcast struct {
	ID   int
	Name string
	Feed string
	Path string

	// Login data if there's authentication involved
	Username string
	Password string

	// List of episodes
	Episodes []Episode
}

func (*Podcast) Load

func (p *Podcast) Load() error

func (*Podcast) String

func (p *Podcast) String() string

func (*Podcast) Sync

func (p *Podcast) Sync() error

Directories

Path Synopsis
cmd
pcd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL