You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added: a create CLI command, creating a new, empty .bib file that contains only the standard BibDesk header comment (bibdeskparser create new.bib, or bibdeskparser create to bootstrap the configured default_bib_file). It is the one command whose BIBFILE must not already exist -- an existing file is never overwritten; every other command still requires an existing file, and the "bibfile not found" error now suggests create. [[#24]]
Changed: the first save() of a from-scratch Library (constructed without a path) now always synthesizes the standard BibDesk header, even if the library was never modified; previously an unmodified from-scratch library saved as an empty file. It also now raises FileExistsError if the destination path already exists (a from-scratch library has no baseline timestamp for the StaleFileError check, so it would previously overwrite silently); to adapt, pass force=True to save() to deliberately overwrite an existing file with a from-scratch library. [[#24]]
Fixed: @string macro names are now case-insensitive throughout, matching BibDesk's macro table. Names are normalized to their canonical lowercase form when a file is parsed (both @string definitions and bare macro-reference field values, e.g. from a hand-edited @string{JAN = ...} / month = JAN), lookups in Library.strings (reading, in, deleting) match case-insensitively, and Library.rename_string looks up the old name case-insensitively, normalizes the new name to lowercase instead of rejecting a name containing uppercase letters, and treats a rename onto the same macro (a new name differing at most in case) as a no-op (the rename_string CLI command behaves the same). A hand-edited mixed-case @string month definition now overrides the built-in month macro (and, like any month-macro override, can be deleted while still referenced), and a mixed-case bare reference resolves in Library.render, Library.search, and format specifiers. Note that saving a modified library rewrites hand-edited mixed-case macro names in lowercase (BibDesk preserves the case as written while matching case-insensitively). [[#22], [#23]]
Added: the twelve standard BibTeX month macros (jan ... dec) are now always defined, expanding to the full English month names ("January" ... "December"), matching BibDesk's built-in standard macros. A bare month = jan field resolves in Library.render, Library.search, and format specifiers, and no longer counts as an undefined macro when saving, editing, or importing. The built-in macros do not appear in Library.strings and are never written to the .bib file; a @string definition of the same name overrides them (and, unlike other in-use macros, can be deleted while still referenced, since references then fall back to the built-in month name). [[#21]]
Changed: Library.keys now returns a tuple of citation keys (instead of the generic set-like view inherited from collections.abc.MutableMapping, which did not even display the keys in the REPL) and accepts optional types, has, missing, and empty filter arguments, matching the --type/--has/--missing/--empty options of the keys CLI command (which now delegates to it). To adapt: code that relied on the set operations of the previous view should wrap the result in set(); code that relied on a live view reflecting later mutations should call keys() again after mutating. [[#16]]
Added: every boolean CLI option that toggles behavior now has an explicit negative form, so that a default can later change without breaking existing invocations: --fix-uppercase/--no-fix-uppercase (import, add), --keep-keys/--no-keep-keys (import), --skip-missing/--no-skip-missing (show), --remove/--no-remove (replace_file, unlink_file), --check-exists/--no-check-exists (add_file, replace_file), and --auto-file/--no-auto-file (add_file) (subsuming the previous --no-check-exists and --no-auto-file flags, which keep working; the new --auto-file positive form forces auto-filing even without file_automatically = true in the configuration). [[#17]]
Added: Entry.add_abstract, a Library.add_abstract that delegates to it after locating the entry's first attached PDF (paths in Entry.files are library-relative, so the PDF source is only available through the Library method), and a corresponding add_abstract CLI command, fetching the abstract of an existing entry from the best available source -- Crossref (via the entry's doi), the text of the entry's first attached PDF (extracted with poppler's pdftotext, when installed), the arXiv API (via eprint), or Semantic Scholar as a last resort -- cleaning it to plain-unicode prose (LaTeX/JATS math markup converted to unicode, ligature/hyphenation repair, publisher copyright trailers stripped), and validating it with heuristic garble checks. Each result carries its source and a confidence level (high/medium/low/none); only abstracts at or above min_confidence/--min-confidence (default high) are stored, and the CLI reports unstored candidates in full for manual review. Entries that already have a non-empty abstract are skipped unless overwrite/--overwrite is given; mark_empty/--mark-empty stores an empty abstract field as an "audited, nothing found" marker. New dependency: pylatexenc.
Added: an add_abstract table in bibdeskparser.toml, configuring the defaults for the min_confidence and mark_empty keyword arguments of Library.add_abstract (and the like-named options of the add_abstract CLI command); exposed as Library.config.add_abstract. An explicit argument or command-line flag always overrides the configured default. [[#18]]
Added: Entry.add_preprint, a purely delegating Library.add_preprint (like Library.add_url), and a corresponding add_preprint CLI command, recording the arXiv preprint of an existing entry in its eprint field (with archiveprefix = arXiv) -- either an explicitly given identifier (--eprint, no network access), or one found by searching the arXiv API by title and first author. A search result is stored only on a confident match (the entry's DOI, a near-exact title, or a good title corroborated by the first author), and a title-based match postdating the entry's publication year is rejected unless its journal reference corroborates the year. The eprint field encodes the audit state: absent = unknown (keys --missing eprint), empty = searched with no preprint found (keys --empty eprint, written by mark_empty/--mark-empty), non-empty = known (mark_empty also clears a stale archiveprefix = arXiv alongside the emptied eprint). Entries with a non-empty eprint are skipped unless overwrite/--overwrite is given; a failed search never modifies the entry. arXiv is the only supported preprint server for now. [[#19]]
Added: an add_preprint table in bibdeskparser.toml, configuring the default for the mark_empty keyword argument of Library.add_preprint (and the like-named option of the add_preprint CLI command); exposed as Library.config.add_preprint. An explicit argument or command-line flag always overrides the configured default. [[#19]]
Added: an add_abstract flag on Library.add (--add-abstract/--no-add-abstract on the add CLI command; default off) that stores the abstract returned alongside the fetched metadata (the publisher's Crossref deposit, or the arXiv summary) in the new entry's abstract field, cleaned and validated the same way. [[#20]]
Added: an add_preprint flag on Library.add (--add-preprint/--no-add-preprint on the add CLI command; default off) that searches arXiv for a preprint matching the newly added entry, exactly as Library.add_preprint does (skipped when the entry already has an eprint). [[#20]]
Added: an add table in bibdeskparser.toml, configuring the defaults for the fix_uppercase, add_abstract, and add_preprint keyword arguments of Library.add (and the like-named options of the add CLI command); exposed as Library.config.add. An explicit argument or command-line flag always overrides the configured default. [[#20]]