feeds2imap

package
v0.0.0-...-aa4ad82 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDB

func CloseDB()

func CommitToCache

func CommitToCache(items ItemsWithFolders) error

CommitToCache saves item data to db

func CommitToDB

func CommitToDB(uuid, guid, title, link, author, feedtitle, feedlink, folder, content string, time time.Time) error

CommitToDB stores entry in the db

func FeedsHandler

func FeedsHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func FolderReadHandler

func FolderReadHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func FoldersHandler

func FoldersHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func GetFullTextReadability

func GetFullTextReadability(url string) (string, error)

GetFullTextReadability fetches full article description for url

func IndexHandler

func IndexHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

func InitDB

func InitDB()

func IsExistingID

func IsExistingID(guid string) bool

IsExistingID tries to find maching id in db

func ItemReadHandler

func ItemReadHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func MarkAsReadInDBByFolder

func MarkAsReadInDBByFolder(folder string) error

func MarkAsReadInDBByID

func MarkAsReadInDBByID(uuid string) error

MarkAsReadInDB sets read field to true on the given id

func MigrateDB

func MigrateDB()

func ScanRowToItem

func ScanRowToItem(rows *sql.Rows) (i dbFeedItem, err error)

ScanRowToItem scans a single row into a struct

func StartHTTPD

func StartHTTPD()

StartHTTPD starts built in http server

Types

type FeedWithFolder

type FeedWithFolder struct {
	Feed   *gofeed.Feed
	Folder string
}

FeedWithFolder represents folder name and feed item combined

type FeedsWithFolders

type FeedsWithFolders []FeedWithFolder

FeedsWithFolders represents collection of FeedWithFolder

type FlatURLs

type FlatURLs map[string]string

FlatURLs represents url -> folder map

type InputURLs

type InputURLs map[string][]string

InputURLs represents freshly parsed configuration

type ItemWithFolder

type ItemWithFolder struct {
	Item      *gofeed.Item
	Folder    string
	FeedTitle string
	FeedLink  string
}

ItemsWithFolders represents rss item (post), folder and original feed title cobined

func FetchFullContent

func FetchFullContent(entry ItemWithFolder) ItemWithFolder

FetchFullContent fetches the full content for a entry that only publishes partial content in it's feed

type ItemsCache

type ItemsCache []string

ItemsCache represents GUIDs cache

func ReadCacheFile

func ReadCacheFile() ItemsCache

ReadCacheFile reads cache file from fs

type ItemsWithFolders

type ItemsWithFolders []ItemWithFolder

ItemsWithFolders represents collection of ItemWithFolder

func AppendNewItemsViaIMAP

func AppendNewItemsViaIMAP(items ItemsWithFolders) (ItemsWithFolders, error)

AppendNewItemsViaIMAP puts items in to corresponding imap folders

func FetchNewFeedItems

func FetchNewFeedItems() ItemsWithFolders

FetchNewFeedItems loads configuration, fetches rss items and discards ones that are in cache already returning new items and new version of a cache

Jump to

Keyboard shortcuts

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