commands

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2015 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_TMPL    = "https://github.com/tyrchen/podgen-basic"
	TEMPLATE_PATH   = "template"
	GH_PAGES        = "gh-pages"
	TARGET_PATH     = "build"
	ASSETS_PATH     = "assets"
	MAX_DESCRIPTION = 96
	DEFAULT_PORT    = 6060
)
View Source
const (
	DEFAULT_PUSH_MSG = "add new podcast."
)
View Source
const (
	ITEM_TEMPLATE = `
- title: change_me
  link: chang_me.mp3
  image: change_me.png
  description: >
    change_me
  pubdate: %s
  guid: %s
`
)

Variables

View Source
var (
	FILES_TO_CHECK = []string{"channel.yml", "items.yml", "build", ASSETS_PATH, TEMPLATE_PATH, "CNAME"}
)
View Source
var PodgenCmd = &cobra.Command{
	Use:   "podgen",
	Short: "podgen builds your podcast site",
	Long: `podgen is the command to build your awesome podcast site

podgen is a fast and flexible static site generator for podcast. If you'd like to publish a 
podcast in iTunes you need to host your media files yourself and provide a rss to iTunes. podgen
helps you to do it quite easy with just a few commands. You don't need a server to host the files,
podgen leverages the powerful github pages.

Steps to create a podcast site:

1. Create a public repo in github and clone it to a directory.
2. Init a podcast site by using "podgen init", under that directory.
3. Modify the "*.yml" files and copy the images/mp3 to desired sub directory, modify CNAME file for custom domain. See https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages/.
4. Build the site by using "podgen build".
5. Look and feel the site by using "podgen server" (optional).
6. Push the site by using "podgen push".
7. You're all site. Now you can browse your site and register the rss in iTunes.

Next when you have new podcast you just modify "items.yml" and copy the related files. Then do 4-6.

Complete documentation is available at http://github.com/tyrchen/podgen.`,
}

Root command

Functions

func Execute

func Execute()

Types

type Channel

type Channel struct {
	Title       string
	Link        string
	Description string
	Image       string
	Copyright   string
	Language    string
	Author      string
	Categories  []string
	Page        int
	Twitter     string
	Linkedin    string
	Github      string
}

type Item

type Item struct {
	Title       string
	Description string
	Link        string
	Pubdate     string
	Image       string
	Guid        string
}

type PageTemplate

type PageTemplate struct {
	Info      Channel
	Home      string
	Current   Item
	Podcasts  []Item
	Paginator template.HTML
}

Jump to

Keyboard shortcuts

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