Documentation
¶
Overview ¶
Package play implements shared reading annotations. Notes are anchored to passages in a source text, with separate authors, timestamps, and threaded replies. A changed source produces an explicit anchor conflict rather than silently moving notes.
Companion view for nova-tools #223: browse shared moments without rewriting the record.
View renders an explicitly selected sample of Markdown records into a static, chronological timeline on one machine. It is read-only: it opens each selected file, parses a card from it, and prints text. It never writes, seals, rolls up or deletes anything, and an excluded record is never even opened.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Export ¶
Export returns a portable markdown-formatted string of all annotations for a source, with authors, timestamps, threads, and anchor status.
func HashSource ¶
HashSource returns the sha256 hex of the source file contents.
func View ¶
View renders sources into a static timeline and returns it as text.
Every path in sources is explicit: there is no default file, no directory walk and no discovery. A path matching an exclude glob — against the path as given or its base name — is skipped before it is opened and counted as excluded. max caps the cards printed (0 prints every card); the summary line always carries the totals, so a capped run still says how much it stood aside. A negative max, a bad glob, or an unreadable selection is an error and prints nothing half-done.
Types ¶
type Anchor ¶
type Anchor struct {
SourcePath string // path to the source text
SourceHash string // sha256 of the source at annotation time
}
Anchor holds the source hash used to detect stale anchors.
type Note ¶
type Note struct {
ID string // sha12 of author+passage+note at creation
Author string // who wrote this
Passage string // the anchored passage text
Note string // the annotation text
CreatedAt time.Time // when this was written
Replies []Reply // threaded replies
}
Note is a single annotation anchored to a passage.
type Reply ¶
type Reply struct {
ID string // sha12 of author+note at creation
Author string
Note string
CreatedAt time.Time
}
Reply is a response to a Note.