Documentation ¶
Overview ¶
RSS: http://stackoverflow.com/questions/15245896/rss-update-single-item http://stackoverflow.com/questions/164124/rss-item-updates SQLite: http://golang.org/pkg/database/sql/ https://github.com/mattn/go-sqlite3 http://stackoverflow.com/questions/3634984/insert-if-not-exists-else-update http://stackoverflow.com/questions/2251699/sqlite-insert-or-replace-into-vs-update-where http://stackoverflow.com/questions/1601151/how-do-i-check-in-sqlite-whether-a-table-exists http://stackoverflow.com/questions/19337029/insert-if-not-exists-statement-in-sqlite http://stackoverflow.com/questions/6740733/insert-or-replace-is-creating-duplicates http://stackoverflow.com/questions/12105198/sqlite-how-to-get-insert-or-ignore-to-work http://stackoverflow.com/questions/19134274/sqlitedatabase-insert-or-replace-if-changed http://stackoverflow.com/questions/14091183/sqlite-order-by-date http://stackoverflow.com/questions/15473325/inserting-current-date-and-time-in-sqlite-database http://stackoverflow.com/questions/7316747/sqlite-inserting-bool-value
Poll RSS/ATOM seeds
^C event handling http://stackoverflow.com/questions/11268943/golang-is-it-possible-to-capture-a-ctrlc-signal-and-run-a-cleanup-function-in
A Tour of Go - Concurrency http://tour.golang.org/#64
http://stackoverflow.com/questions/10510691/how-to-check-whether-a-file-or-directory-denoted-by-a-path-exists-in-golang http://stackoverflow.com/questions/14249467/os-mkdir-and-os-mkdirall-permission-value http://stackoverflow.com/questions/1760757/how-to-efficiently-concatenate-strings-in-go
http://www.w3schools.com/rss/default.asp http://www.tutorialspoint.com/rss/what-is-atom.htm http://stackoverflow.com/questions/6619717/what-is-the-difference-between-rss-and-atom-feeds http://stackoverflow.com/questions/16309944/atom-to-rss-feeds-converter
Index ¶
- func GetTemplate(filepath string) *template.Template
- func InitDB(filepath string) *sql.DB
- func Poll(sites []OpmlOutline)
- func SaveLinkAsJson(l LinkInfo)
- func XmlUrl2DBPath(xmlUrl string) string
- type Atom1
- type Author
- type Entry
- type Item
- type Link
- type LinkInfo
- type Opml
- type OpmlBody
- type OpmlHead
- type OpmlOutline
- type Rss2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTemplate ¶
func Poll ¶
func Poll(sites []OpmlOutline)
func SaveLinkAsJson ¶
func SaveLinkAsJson(l LinkInfo)
func XmlUrl2DBPath ¶
Types ¶
type Atom1 ¶
type Atom1 struct { XMLName xml.Name `xml:"http://www.w3.org/2005/Atom feed"` Title string `xml:"title"` Subtitle string `xml:"subtitle"` Id string `xml:"id"` Updated string `xml:"updated"` Rights string `xml:"rights"` Link Link `xml:"link"` Author Author `xml:"author"` EntryList []Entry `xml:"entry"` }
http://en.wikipedia.org/wiki/Atom_(standard) http://golang.org/src/pkg/encoding/xml/
type Item ¶
type Item struct { // Required Title string `xml:"title"` Link string `xml:"link"` Description template.HTML `xml:"description"` // Optional Content template.HTML `xml:"encoded"` PubDate string `xml:"pubDate"` Comments string `xml:"comments"` // for reader only IsRead bool ReadDatetime string }
http://www.w3schools.com/rss/rss_item.asp http://stackoverflow.com/questions/7220670/difference-between-description-and-contentencoded-tags-in-rss2 https://groups.google.com/d/topic/golang-nuts/uBMo1BpaQCM
func GetItemsFromDB ¶
type OpmlBody ¶
type OpmlBody struct { XMLName xml.Name `xml:"body"` SiteList []OpmlOutline `xml:"outline"` }
type OpmlOutline ¶
type OpmlOutline struct { Text string `xml:"text,attr"` Title string `xml:"title,attr"` Type string `xml:"type,attr"` XmlUrl string `xml:"xmlUrl,attr"` HtmlUrl string `xml:"htmlUrl,attr"` Favicon string `xml:"rssfr-favicon,attr"` }
func GetOutlineList ¶
func GetOutlineList(filepath string) []OpmlOutline
func GetSites ¶
func GetSites(dbpath string) []OpmlOutline
type Rss2 ¶
type Rss2 struct { XMLName xml.Name `xml:"rss"` Version string `xml:"version,attr"` // Required Title string `xml:"channel>title"` Link string `xml:"channel>link"` Description string `xml:"channel>description"` // Optional PubDate string `xml:"channel>pubDate"` ItemList []Item `xml:"channel>item"` }
http://www.w3schools.com/rss/rss_syntax.asp http://www.w3schools.com/rss/rss_channel.asp