Documentation ¶
Overview ¶
Package core implements key data structures and associated methods for working with filog formatted data
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareDates ¶
CompareDates will return true if a < b and false if a >= b
func InsertWatchDate ¶
InsertWatchDate will insert a given watch date into a film's linked list, preserving sort order.
Types ¶
type Date ¶
type Date struct { Year int // Year (e.g., 2014). Month time.Month // Month of the year (January = 1, ...). Day int // Day of the month, starting at 1. }
a Date is a simple Y-M-d struct. why import civil.Date for just this struct?
type Film ¶
type Film struct { Film *FilmKey // Pointer to associated FilmKey, so individual film structs can be easily passed around Link url.URL // Link to TMDb or arbitrary user-provided page WatchCount int // Number of times a film was watched WatchedList *WatchDate // Pointer to a linked list of dates the film was watched. }
A Film is a value in a film hashmap
type FilmMap ¶
func (FilmMap) PrintExport ¶
PrintExport will return a list of filog(5) format entries in reverse chronological order, suitable for redirecting to a new filog file.
func (FilmMap) PrintRegular ¶
Regular will display a map of films using the "grouped watches" format, sorted by film title and release year. TODO: add separate Log and Watchlist functions to print them both nicely
so you don't get "# watches: " for watchlists
type WatchDate ¶
type WatchDate struct { Date Date // Date of this watch Notes string // User-provided notes for this entry Rating int // Film rating for this entry. Should be clamped to 1-10 Like tribool.Tribool // yes if like was Y, no if N, maybe if not provided Next *WatchDate // Next item in list }
A WatchDate is used as a node in a linked list of dates a film was watched