commands

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddCmd = &cobra.Command{
	Use:   "add url_of_youtube_user_or_channel",
	Short: "add a YouTube user URL or Channel URL to your ytpodders subscriptions",
	Long: `Pass the main Video URL of a User or Channel as the parameter e.g.

https://www.youtube.com/user/durianriders
or
https://www.youtube.com/channel/UCYdkEm-NjhS8TmLVt_qZy9g

From now on, when you run ytpodders, it will check that YouTuber
for any new entries.
`,
	Run: AddRun,
}

AddCmd is the Action to run to add a YouTube Feed to your list

View Source
var ListCmd = &cobra.Command{
	Use:   "list",
	Short: "list all your ytpodder subscriptions",
	Long: `Get the name, URL and status of each of your subscriptions.
        `,
	Run: ListRun,
}

ListCmd is the Action to run to add a YouTube Feed to your ytpodders subscriptions

View Source
var RSSXML = &feeds.Feed{
	Title:       "YTPodders YouTube Podcasts",
	Link:        &feeds.Link{Href: "https://ytpodders.conoroneill.net/"},
	Description: "YouTube Videos converted to Podcasts by YTPodders",
	Author:      &feeds.Author{Name: "YTPodder", Email: "youtuber@example.com"},
}

RSSXML is used to build the rss.xml file which you subscribe to in your podcasting app

View Source
var RootCmd = &cobra.Command{
	Use:   "ytpodders",
	Short: "YTPodders creates subscribable MP3 podcasts from YouTube Users and Channels using Dropbox",
	Long:  `Each time you run YTPodders, it checks the list of YouTube Users and Channels that you have added here for new uploads. It grabs those using youtube-dl and converts them to MP3s. It then copies or uploads the MP3s to your Dropbox account. Finally it updates rss.xml and provides you with its URL. You can add this URL to your podcast app on your phone e.g. BeyondPod on Android and then automatically get the audio of those YouTubers on your phone when your podcast app updates.`,
	Run:   RootRun,
}

RootCmd is the Action to run if no command specified. In our case this is a full update of all the feeds and podcasts

View Source
var SubDeleteCmd = &cobra.Command{
	Use:   "delete ID_of_subscription",
	Short: "delete a ytpodders subscription",
	Long: ` use ytpodders list to get all the ids and ytpodders delete to delete one
`,
	Run: SubDeleteRun,
}

SubDeleteCmd is the Action to run to add a YouTube Feed to your list

Functions

func AddRun

func AddRun(cmd *cobra.Command, args []string)

AddRun is executed when user passes the command "add" to ytpodders

func ListRun

func ListRun(cmd *cobra.Command, args []string)

ListRun is executed when user passes the command "list" to ytpodders

func RSSEntryInDB

func RSSEntryInDB(link string, dbentries []YTSubscriptionEntry) bool

RSSEntryInDB checks if we have already downloaded this "episode"

func RootRun

func RootRun(cmd *cobra.Command, args []string)

RootRun is executed when user passes no arguments to ytpodders

func SubDeleteRun

func SubDeleteRun(cmd *cobra.Command, args []string)

SubDeleteRun is executed when user passes the command "add" to ytpodders

Types

type YTSubscription

type YTSubscription struct {
	ID        int
	SubURL    string `storm:"unique"`
	SubTitle  string
	SubStatus string
}

YTSubscription is just the URL of each YouTuber you are subscribed to

type YTSubscriptionEntry

type YTSubscriptionEntry struct {
	ID           int
	Subscription int    `storm:"index"`
	URL          string `storm:"unique"`
	Title        string
	Date         time.Time `storm:"index"`
	DropboxURL   string
	FileSize     int64
}

YTSubscriptionEntry has info about each of the parsed and downloaded "episodes" from YouTube

Jump to

Keyboard shortcuts

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