Documentation
¶
Overview ¶
Package research reads and checks the research files of a newsletter project: verbatim voices of readers and writers, the peer newsletters of the niche, and evidence from standards and studies. The formats follow lfm's research files, so the same discipline applies: every item is verbatim, dated, retrievable and cited by ID.
Structure lives only in lines that start with a heading marker, a field marker or a table pipe. Quotes are blockquotes: every line starts with ">", so verbatim text may contain anything.
Index ¶
- Constants
- Variables
- func Blockquote(text string) string
- func ParseEvidence(text string) (Evidences, []Problem)
- func ParsePeers(text string) (Peers, []Problem)
- func ParseVoices(text string) (Voices, []Problem)
- func Rules() []finding.Rule
- type Batch
- type Evidence
- type Evidences
- type GridRow
- type Peer
- type Peers
- type Precision
- type Problem
- type Report
- type Summary
- type Voice
- type Voices
Constants ¶
const ( RuleFormat = "research.format" RuleSubstance = "research.substance" RuleBalance = "research.balance" )
Rule IDs.
const ( Dir = "research" VoicesFile = "voices.md" PeersFile = "peers.md" EvidenceFile = "evidence.md" )
Files of a newsletter project's research directory.
const ( MinVoices = 40 MinPlatforms = 4 MinPeers = 8 )
Minimums for research started from zero.
Variables ¶
var ( Authors = []string{"reader", "writer", "adjacent", "expert", "brand"} Methods = []string{"connector", "fetch", "browser", "user"} EvidenceKinds = []string{"standard", "study", "benchmark", "guide", "survey"} // PeerFields are the facts recorded for every peer newsletter, in order. PeerFields = []string{"Cadence", "Length", "Structure", "Subject", "Opening", "Voice", "Visual", "Links", "Signup", "Takeaway"} // Dimensions are the aspects evidence can apply to. Dimensions = []string{"deliverability", "consent", "signup", "welcome", "frequency", "timing", "length", "subject", "preheader", "layout", "accessibility", "images", "links", "tone", "structure", "personalization", "engagement", "growth", "retention", "unsubscribe", "hygiene", "measurement", "legal", "plaintext", "darkmode", "mobile"} )
Fixed vocabularies.
Functions ¶
func Blockquote ¶
Blockquote formats verbatim text as quote lines that parse back to the same text.
func ParseEvidence ¶
ParseEvidence reads evidence.md.
func ParseVoices ¶
ParseVoices reads voices.md, reporting every defect.
Types ¶
type Batch ¶
type Batch struct {
Line int
Date time.Time
FromZero bool
Trigger string
Queries string
Unreachable string
Shortfall string
}
Batch is one dated research session.
type Evidence ¶
type Evidence struct {
Line int
ID int
Publisher string
Work string
Kind string
Published time.Time
Precision Precision
Fetched time.Time
Via string
Quote string
URL string
Applies []string
Observer string
Batch int
}
Evidence is one fact from a standard, study, benchmark or guide.
type Peer ¶
type Peer struct {
Line int
ID int
Name string
URL string
Fetched time.Time
Via string
Facts map[string]string
Batch int
}
Peer is one peer newsletter.
type Peers ¶
type Peers struct {
Title string
Batches []Batch
Entries []Peer
Grid []GridRow
GridLine int
Baseline string
Gaps []string
}
Peers is peers.md. Grid, Baseline and Gaps are those of the latest batch that has them.
type Report ¶
type Report struct {
Findings []finding.Finding
Summary Summary
Voices *Voices
Peers *Peers
Evidences *Evidences
// Complete is true when the minimums hold (or a shortfall is named) and nothing is malformed.
Complete bool
}
Report is the result of checking the research directory.
func Check ¶
Check parses and checks the research files present in files (keyed by file name; absent files are skipped). dir prefixes names in findings.
type Summary ¶
type Summary struct {
Voices int `json:"voices"`
Platforms int `json:"platforms"`
Peers int `json:"peers"`
Evidence int `json:"evidence"`
}
Summary describes the research a project stands on.