gorse

package module
v0.0.0-...-48b0124 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

README

Gorse is an RSS reader. You provide it with RSS feeds to monitor, and its poller program, gorsepoll, pulls the contents of the feed into a database. Gorse itself provides an interface to view and read the feeds.

It can work with feeds in RSS, RDF, and Atom formats.

Components

gorse

A web frontend to a database of feeds and their items/entries.

gorsepoll

This is an RSS poller. It takes feeds to poll from a database, and populates the database with the items it finds.

It should be run periodically, such as through cron.

It tracks when it last updated a feed, and will not try it again until a period elapsed. It considers a feed updated when it successfully fetches and parses a feed.

Setup

To set up the database:

createuser -D -E -P -R -S gorse
createdb -E UTF8 -l en_CA.UTF-8 -O gorse gorse
cat schema.sql upgrade*.sql > install.sql
psql < install.sql

Then you have to set up feeds. Currently this can only be done through inserts to the rss_feed table.

Documentation

Overview

Package gorse holds functions common to the different tools making up the project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBSetItemReadState

func DBSetItemReadState(db *sql.DB, id int64, userID int,
	state ReadState) error

DBSetItemReadState sets the item's read state for the user.

Types

type DBItem

type DBItem struct {
	ID              int64
	Title           string
	Description     string
	Link            string
	RSSFeedID       int64
	PublicationDate time.Time
	GUID            *string
}

DBItem represents an item in the database.

func FindItemByLink(db *sql.DB, feedID int64, link string) (*DBItem, error)

FindItemByLink retrieves an item's information from the database by feed and link. Link is unique per feed.

type ReadState

type ReadState int

ReadState holds an item's state (rss_item_state table, read_state type).

const (
	// Unread means the item is not yet read.
	Unread ReadState = iota
	// Read means the item was read.
	Read
	// ReadLater means to save the item to read later.
	ReadLater
)

func (ReadState) String

func (s ReadState) String() string

Turn read state into the enumerated type in the database (read_state).

Directories

Path Synopsis
cmd
gorse
gorse is a web front end to a database of RSS feeds and their items/entries.
gorse is a web front end to a database of RSS feeds and their items/entries.
gorsepoll
RSS feed poller.
RSS feed poller.

Jump to

Keyboard shortcuts

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