Versions in this module Expand all Collapse all v0 v0.3.0 Oct 30, 2026 Changes in this version + const DefaultFetchMax + const DefaultLocateMax + const DefaultPerPaper + const DefaultSearchLimit + const DefaultTitleSearches + const ExtractTimeout + const FetchRetryAfter + const ImportCandidates + const ImportDuplicate + const ImportImported + const ImportNotInOpenAlex + const ImportUnconfirmed + const ImportUnidentified + const ImportUnreadable + const LocateMaxAge + const MarkEnd + const MarkStart + const MaxPDFSize + var ErrNoFolder = errors.New("this library has no folder yet") + var ErrNoPDF = errors.New("no PDF in the library folder") + func Create(ctx context.Context, cfg *config.Config, dir string, makeDefault bool) (*config.Config, error) + type Attempt = store.Attempt + type CitedIn struct + Work model.Work + type Collection struct + FromFolder bool + Name string + Works int + type ContextCounts = store.ContextCounts + type ExtractOptions struct + Again bool + Progress func(Extracted) + type Extracted struct + Counts map[string]int + Done int + Duration time.Duration + Imported Imported + Mentions int + Papers []ExtractedPaper + Passages int + Total int + type ExtractedPaper struct + Already bool + File string + Mentions int + Pages int + Passages int + Reason string + Status string + Took time.Duration + Work model.Work + type FetchOptions struct + Max int + Progress func(Fetched) + ReadProgress func(Extracted) + type Fetched struct + Bytes int64 + Downloaded int + Duration time.Duration + Hydrated int + Located Located + Outcomes map[string]int + Papers []FetchedPaper + Read Extracted + Tried int + type FetchedPaper struct + Already bool + Attempts []Attempt + File string + Text *ExtractedPaper + Work model.Work + type File struct + Missing bool + Path string + Size int64 + Version string + type ImportCandidate struct + Verified bool + Work model.Work + type ImportOptions struct + AcceptFirst bool + Again bool + Files []string + Progress func(ImportedFile) + TitleSearches int + type Imported struct + Counts map[string]int + Duration time.Duration + Files []ImportedFile + Searches int + type ImportedFile struct + Candidates []ImportCandidate + Clue string + File string + Outcome string + Reason string + Saved string + Skipped bool + Text *ExtractedPaper + Work model.Work type Library + func (l *Library) Attempts(ctx context.Context, input string) ([]Attempt, error) + func (l *Library) CitationContexts(ctx context.Context, input string) (map[string][]Mention, error) + func (l *Library) Cloud() string + func (l *Library) Collections(ctx context.Context) ([]Collection, error) + func (l *Library) ContextCounts(ctx context.Context) (ContextCounts, error) + func (l *Library) ExtractOne(ctx context.Context, input string, again bool) (ExtractedPaper, error) + func (l *Library) ExtractText(ctx context.Context, opts ExtractOptions) (Extracted, error) + func (l *Library) Fetch(ctx context.Context, opts FetchOptions) (Fetched, error) + func (l *Library) FetchOne(ctx context.Context, input string) (FetchedPaper, error) + func (l *Library) FetchedOnDisk(ctx context.Context) (int, error) + func (l *Library) Folder() string + func (l *Library) FolderFor(ctx context.Context, input string) (WorkFolder, error) + func (l *Library) Import(ctx context.Context, opts ImportOptions) (Imported, error) + func (l *Library) ImportAs(ctx context.Context, file, input string, force bool) (ImportedFile, error) + func (l *Library) ImportChosen(ctx context.Context, file string, c ImportCandidate) (ImportedFile, error) + func (l *Library) ImportLocal(ctx context.Context, file, title string, year *int) (ImportedFile, error) + func (l *Library) InboxWaiting() (int, error) + func (l *Library) List(ctx context.Context, opts ListOptions) ([]Listed, error) + func (l *Library) LocatePDFs(ctx context.Context, opts LocateOptions) (Located, error) + func (l *Library) PDFCounts(ctx context.Context) (map[model.PDFAvailability]int, error) + func (l *Library) PDFLinks(ctx context.Context, input string) (PDFLinks, error) + func (l *Library) Scan(ctx context.Context) (ScanReport, error) + func (l *Library) Search(ctx context.Context, words string, opts SearchOptions) (Searched, error) + func (l *Library) Show(ctx context.Context, input string) (Paper, error) + func (l *Library) TextCounts(ctx context.Context) (map[string]int, error) + func (l *Library) WithoutText(ctx context.Context) ([]NoText, error) + type ListOptions = store.ListQuery + type Listed = store.ListRow + type LocateOptions struct + Max int + Progress func(Located) + type Located = graph.Located + type Mention struct + Confidence float64 + Marker string + Method string + Page int + Section string + Sentence string + type Moved struct + ByHash bool + From string + To string + type NoText struct + File string + Reason string + Status string + Work model.Work type Options + PDFTransport http.RoundTripper + type PDFLinks struct + CheckedAt time.Time + Work model.Work + type Paper struct + Asked time.Time + Attempts []Attempt + CitedBy int + Cites int + Contexts int + Files []PaperFile + Folder string + PDF model.PDFLinks + Sample []CitedIn + Text *PaperText + Work model.Work + type PaperFile struct + Mismatch bool + Missing bool + Origin string + Path string + Version string + type PaperText struct + File string + Pages int + Reason string + Status string + type Relocated struct + Cloud string + Database string + Folder string + OldDatabase string + func Move(ctx context.Context, cfg *config.Config, dir string) (Relocated, error) + type ScanReport struct + Collections int + Files int + Folders int + LongPaths []string + Loose []string + Missing []string + MissingFiles int + Moved []Moved + NewFiles int + Unknown []string + type SearchHit struct + File string + Page int + Section string + Snippet string + Work model.Work + type SearchOptions struct + Limit int + Paper string + PerPaper int + References bool + type Searched struct + Hits []SearchHit + Partial bool + Unread int + type WorkFolder struct + Created bool + Files []File + LongPath bool + Path string + Renamed string + Work model.Work v0.2.0 Sep 25, 2026 v0.1.0 Sep 25, 2026 Changes in this version + const DefaultMaxHops + func ClearCache(dir string) (string, error) + func RetryAfter(err error) (time.Duration, bool) + func Validate(input string) error + type AddOptions struct + AcceptFirst bool + SearchLimit int + type Added struct + AlreadySeed bool + DeadEnd bool + NewEdges int + NewStubs int + Refs int + Work model.Work + type AmbiguousError struct + Candidates []Candidate + Title string + func (e *AmbiguousError) Error() string + func (e *AmbiguousError) Is(target error) bool + type Candidate struct + TitleMatch bool + Work model.Work + type DuplicateGroup = graph.DuplicateGroup + type ExpandOptions struct + MaxDepth int + MaxNodes int + Progress func(model.ExpansionResult) + type ExportOptions struct + IncludeStubs bool + type Exported struct + Edges int + Nodes int + type Library struct + func Open(ctx context.Context, cfg *config.Config, opts Options) (*Library, error) + func (l *Library) Add(ctx context.Context, input string, opts AddOptions) (Added, error) + func (l *Library) AddCandidate(ctx context.Context, c Candidate) (Added, error) + func (l *Library) Budget() (maxNodes, maxDepth int) + func (l *Library) Close() error + func (l *Library) Expand(ctx context.Context, opts ExpandOptions) (model.ExpansionResult, error) + func (l *Library) ExportGraphML(ctx context.Context, w io.Writer, opts ExportOptions) (Exported, error) + func (l *Library) Find(ctx context.Context, input string) (model.Work, error) + func (l *Library) Neighbours(ctx context.Context, input string) (Neighbourhood, error) + func (l *Library) Path() string + func (l *Library) PathBetween(ctx context.Context, from, to string, opts PathOptions) (Path, error) + func (l *Library) ProbableDuplicates(ctx context.Context) ([]DuplicateGroup, error) + func (l *Library) Quota() (Quota, bool) + func (l *Library) Stats(ctx context.Context) (Stats, error) + func (l *Library) Summarise(ctx context.Context) (Summary, error) + type Neighbourhood struct + CitedBy []model.Work + Cites []model.Work + Work model.Work + type Options struct + CacheDir string + NoCache bool + Transport http.RoundTripper + type Path struct + Cites []bool + Found bool + Works []model.Work + type PathOptions struct + AnyDirection bool + MaxHops int + type Quota = httpx.Quota + type Stats struct + Edges int + Stubs int + Works int + type Summary struct + Citations int + DeadEnds int + Fetched int + Seeds int + Stubs int + Unresolved int + Works int