Documentation ¶
Overview ¶
Package dayone is for reading Day One (http://dayoneapp.com) journal files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrStopRead = errors.New("stop reading")
ErrStopRead is an error you can return from a ReadFunc to stop reading journal entries.
Functions ¶
This section is empty.
Types ¶
type Coordinate ¶
Coordinate for location data.
type Creator ¶
type Creator struct { DeviceAgent string GenerationDate time.Time HostName string OSAgent string SoftwareAgent string }
Creator is the creator of a journal entry.
type Entry ¶
type Entry struct { EntryText string Activity string IgnoreStepCount bool StepCount uint64 Starred bool PublishURL string Music *Music Tags []string Weather *Weather Location *Location TimeZone string Creator *Creator CreationDate time.Time // contains filtered or unexported fields }
Entry is the top-level journal entry type.
type Journal ¶
type Journal struct {
// contains filtered or unexported fields
}
Journal is the top-level type for reading Day One journal files.
func NewJournal ¶
NewJournal creates a new Journal for the specified dir.
func (*Journal) EntryStat ¶
EntryStat returns the result of os.Stat() for the entry with the specified uuid.
func (*Journal) OpenPhoto ¶
func (j *Journal) OpenPhoto(uuid string) (io.ReadCloser, error)
OpenPhoto opens an io.ReadCloser for the photo file associated with the specified entry uuid or returns an error.
func (*Journal) PhotoStat ¶
PhotoStat returns the result of os.Stat() for the photo associated with the entry uuid.
type Location ¶
type Location struct { AdministrativeArea string Country string Locality string PlaceName string Region *Region FoursquareID string Coordinate }
Location of a journal entry.
type Weather ¶
type Weather struct { Celsius string Fahrenheit string Description string IconName string PressureMB float64 RelativeHumidity float64 Service string SunriseDate time.Time SunsetDate time.Time VisibilityKM float64 WindBearing uint64 WindChillCelsius int64 WindSpeedKPH float64 }
Weather data for a journal entry.