Versions in this module Expand all Collapse all v0 v0.3.0 Oct 30, 2026 Changes in this version + const IdentityMatch + const IdentityMismatch + const ImportCandidates + const ImportDuplicate + const ImportImported + const ImportNotInOpenAlex + const ImportUnconfirmed + const ImportUnidentified + const ImportUnreadable + const LinkSourceOpenAlex + const MarkEnd + const MarkStart + const OriginDownload + const OriginFound + const OriginImport + const OutcomeDuplicate + const OutcomeOK + func MatchQuery(typed string) (string, error) + type Attempt struct + At time.Time + Bytes int64 + Host string + Millis int64 + Outcome string + Status int + URL string + type Chunk struct + End int + Ordinal int + Page int + Section string + Start int + Text string + type CitedRef struct + Authors int + DOI string + FilID string + Surname string + Title string + Year int + type CollectionSize struct + FromFolder bool + Name string + Works int + type ContextCounts struct + Citations int + Mentions int + WithContext int + type Counts struct + Cites int + Files int + Notes int + Works int type DB + func (db *DB) AttemptsOf(ctx context.Context, ref string) ([]Attempt, error) + func (db *DB) Check(ctx context.Context) (Counts, error) + func (db *DB) Collections(ctx context.Context) ([]CollectionSize, error) + func (db *DB) ContextCounts(ctx context.Context) (ContextCounts, error) + func (db *DB) CopyTo(ctx context.Context, path string) error + func (db *DB) Files(ctx context.Context) ([]File, error) + func (db *DB) FilesOf(ctx context.Context, filID string) ([]File, error) + func (db *DB) FilesWithHash(ctx context.Context, sha256 string) ([]File, error) + func (db *DB) Folders(ctx context.Context) ([]Folder, error) + func (db *DB) FoldersOf(ctx context.Context, filID string) ([]Folder, error) + func (db *DB) ImportOf(ctx context.Context, sha256 string) (ImportAttempt, bool, error) + func (db *DB) LinksToTry(ctx context.Context, ref string, retryAfter time.Duration) ([]model.Location, error) + func (db *DB) List(ctx context.Context, q ListQuery) ([]ListRow, error) + func (db *DB) MentionsOf(ctx context.Context, ref string) ([]Mention, error) + func (db *DB) PDFCounts(ctx context.Context) (map[model.PDFAvailability]int, error) + func (db *DB) PDFLinksOf(ctx context.Context, ref string) (model.PDFLinks, time.Time, error) + func (db *DB) PDFToRead(ctx context.Context, ref string) (ToRead, bool, error) + func (db *DB) PDFsOnDisk(ctx context.Context) (int, error) + func (db *DB) PDFsToRead(ctx context.Context, extractor string, again bool) ([]ToRead, error) + func (db *DB) RefsOf(ctx context.Context, ref string) ([]CitedRef, error) + func (db *DB) ResolveRefs(ctx context.Context, refs []string) (map[string]string, error) + func (db *DB) Search(ctx context.Context, q SearchQuery) ([]Hit, error) + func (db *DB) StubsCitedBy(ctx context.Context, filIDs []string) ([]string, error) + func (db *DB) TextCounts(ctx context.Context) (map[string]int, error) + func (db *DB) TextOf(ctx context.Context, ref string) (Text, bool, error) + func (db *DB) ToLocate(ctx context.Context, limit int, maxAge time.Duration) ([]string, error) + func (db *DB) WithoutText(ctx context.Context) ([]Text, error) + func (db *DB) WorksToFetch(ctx context.Context, limit int, retryAfter time.Duration) ([]ToFetch, error) + type File struct + FilID string + Identity string + Missing bool + ModTime int64 + Origin string + Path string + SHA256 string + Size int64 + Version string + type Folder struct + FilID string + GivenName string + Missing bool + Path string + type FolderCollection struct + Name string + Works []string + type Hit struct + FilID string + Page int + Path string + Rank float64 + Section string + Snippet string + type ImportAttempt struct + At time.Time + FilID string + Outcome string + Path string + Reason string + SHA256 string + Searched bool + type ListQuery struct + Collection string + Limit int + Seeds bool + Title string + WithPDF bool + WithoutText bool + type ListRow struct + Author string + CitedBy int + Contexts int + FilID string + HasPDF bool + Hydrated bool + Mismatch bool + OpenAlexID string + Seed bool + TextStatus string + Title string + Year int type Lookup + const ByFilID + type Mention struct + Confidence float64 + End int + Marker string + Method string + Page int + Section string + Sentence string + Start int + ToWork string + type SearchQuery struct + Any bool + FilID string + Limit int + PerPaper int + References bool + Words string + type Text struct + Chars int + Extractor string + FilID string + Millis int64 + Pages int + Path string + ReadAt time.Time + Reason string + SHA256 string + Status string + type ToFetch struct + FilID string + Links []model.Location + type ToRead struct + FilID string + Path string + SHA256 string type Tx + func (tx *Tx) AddLocalWork(ctx context.Context, title string, year *int) (string, error) + func (tx *Tx) DeleteFolder(ctx context.Context, path string) error + func (tx *Tx) MoveFile(ctx context.Context, from string, to File) error + func (tx *Tx) MoveFolder(ctx context.Context, from string, to Folder) error + func (tx *Tx) PutDetails(ctx context.Context, h *model.HydratedWork) error + func (tx *Tx) PutFile(ctx context.Context, f File) error + func (tx *Tx) PutFolder(ctx context.Context, f Folder) error + func (tx *Tx) PutMentions(ctx context.Context, from string, ms []Mention) error + func (tx *Tx) PutPDFLinks(ctx context.Context, ref string, links model.PDFLinks) error + func (tx *Tx) PutText(ctx context.Context, t Text, chunks []Chunk) error + func (tx *Tx) RecordAttempt(ctx context.Context, ref string, a Attempt) error + func (tx *Tx) RecordImport(ctx context.Context, a ImportAttempt) error + func (tx *Tx) SetIdentity(ctx context.Context, path, identity string) error + func (tx *Tx) SyncFolderCollections(ctx context.Context, want map[string]FolderCollection) error v0.2.0 Sep 25, 2026 Changes in this version type DB + func (db *DB) AuthorsOf(ctx context.Context, workIDs []string) (map[string][]model.Author, error) v0.1.0 Sep 25, 2026 Changes in this version + const BusyTimeout + const SchemaVersion + var Schema string + type DB struct + func Open(ctx context.Context, path string) (*DB, error) + func (db *DB) CitedBy(ctx context.Context, id string) ([]model.Edge, error) + func (db *DB) Close() error + func (db *DB) EachEdge(ctx context.Context, includeStubs bool, fn func(from, to string) error) error + func (db *DB) EachWork(ctx context.Context, includeStubs bool, fn func(w *model.Work) error) error + func (db *DB) FindWork(ctx context.Context, by Lookup, value string) (*model.Work, error) + func (db *DB) GetWork(ctx context.Context, id string) (*model.Work, error) + func (db *DB) Migrate(ctx context.Context) error + func (db *DB) NextFrontier(ctx context.Context, limit, maxDepth, maxRefsPerWork int, ...) ([]model.FrontierItem, error) + func (db *DB) Path() string + func (db *DB) References(ctx context.Context, id string) ([]model.Edge, error) + func (db *DB) ShortestPath(ctx context.Context, from, to string, maxHops int, dir Direction) (Path, error) + func (db *DB) Stats(ctx context.Context) (Stats, error) + func (db *DB) StubsBeyond(ctx context.Context, maxDepth int) (int, error) + func (db *DB) Summary(ctx context.Context) (Summary, error) + func (db *DB) TitledWorks(ctx context.Context) ([]model.Work, error) + func (db *DB) Tx(ctx context.Context, fn func(*Tx) error) error + func (db *DB) UpsertWork(ctx context.Context, w *model.Work) error + func (db *DB) Version(ctx context.Context) (int, error) + func (db *DB) WorksCitedBy(ctx context.Context, id string) ([]model.Work, error) + func (db *DB) WorksCiting(ctx context.Context, id string) ([]model.Work, error) + type Direction int + const Backward + const Either + const Forward + type Lookup int + const ByArXivID + const ByDOI + const ByOpenAlexID + const ByPMID + type Path struct + Cites []bool + IDs []string + type Recorded struct + Edges int + Refs int + Stubs int + func (r Recorded) DeadEnd() bool + type Stats struct + Edges int + Stubs int + Works int + type Summary struct + DeadEnds int + Edges int + Hydrated int + Seeds int + Stubs int + Unresolved int + Works int + type Tx struct + func (tx *Tx) GetWork(ctx context.Context, id string) (*model.Work, error) + func (tx *Tx) MarkSeed(ctx context.Context, id string) error + func (tx *Tx) MarkUnresolved(ctx context.Context, id string) error + func (tx *Tx) MergeInto(ctx context.Context, oldID, newID string) error + func (tx *Tx) RecordEdgesAndStubs(ctx context.Context, h *model.HydratedWork) (Recorded, error) + func (tx *Tx) UpsertEdge(ctx context.Context, e model.Edge) error + func (tx *Tx) UpsertStub(ctx context.Context, id string, depth *int, source model.Source) (bool, error) + func (tx *Tx) UpsertWork(ctx context.Context, w *model.Work) error + func (tx *Tx) WorkIDByDOI(ctx context.Context, doi string) (string, error)