Documentation ¶
Index ¶
- Variables
- func AddRun(cmd *cobra.Command, args []string)
- func ListRun(cmd *cobra.Command, args []string)
- func RSSEntryInDB(link string, dbentries []YTSubscriptionEntry) bool
- func RootRun(cmd *cobra.Command, args []string)
- func SubDeleteRun(cmd *cobra.Command, args []string)
- type YTSubscription
- type YTSubscriptionEntry
Constants ¶
This section is empty.
Variables ¶
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
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
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
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
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 RSSEntryInDB ¶
func RSSEntryInDB(link string, dbentries []YTSubscriptionEntry) bool
RSSEntryInDB checks if we have already downloaded this "episode"
func SubDeleteRun ¶
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