All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added
format_err("Format Error") andparse_err("Parse Error") as dedicated error types onBibLookup, with corresponding@propertygetters, to distinguish local processing failures from remote lookup failures. - Added
setsubcommand to the CLI (bib-lookup set KEY VALUE) for setting individual configuration values;VALUEofnone/nullresets the key toNone(falling back to built-in logic). - Added
gbmediumconfiguration option for the GB/T 7714-2015 style:Trueforces[J/OL](online),Falseforces[J](print),None(default) auto-detects based on the presence ofdoi/urlfields. - Added
STYLE_PARAMETERSregistry in_const.pydocumenting per-style configuration parameters, used for validation in--configandset.
--confignow warns (instead of silently discards) when unknown keys are encountered; the keys are still written to the config file.str2boolnow passesNonethrough unchanged so that config values reset toNonework correctly for boolean fields.- Style-specific settings are now collected in a
_style_kwargsdictionary insideBibLookup(populated by_init_style_kwargs) rather than as individual attributes, making it easy to add new per-style parameters.
- Fixed text format and bibtex exception handlers silently returning
Not Foundwhen local parsing or style rendering fails. They now returnParse ErrorandFormat Error (<style>): <details>respectively. - Fixed
--format text --style gbt(and IEEE / Chicago) returningNot Foundfor DOIs whose@articleentry has nojournalfield — common for preprints from bioRxiv, medRxiv, etc. The style templates now useoptional_field("journal")instead of the mandatoryfield("journal"). - Fixed
_remove_commentsincorrectly stripping escaped percent signs (\%) and content following them when called withkeep_comments=False. The function now uses a character-level state machine that correctly distinguishes escaped%(preceded by an odd number of backslashes) from comment-start%, and preserves content inside\verb|...|and\begin{verbatim}...\end{verbatim}environments. - Fixed
--format text --style gbt(and other pybtex-backed styles) returningNot Foundfor DOIs whose BibTeX contains unquoted full month names (e.g.month=June). The raw BibTeX is now normalised through_to_bib_itembefore handing it to pybtex's strict parser. - Extended month normalisation in
BibItem.__normalize_fieldsto handle full English month names (e.g.july,june) and non-standard abbreviations (e.g.sept) returned by some DOI/PubMed resolvers, in addition to the existing standard 3-letter BibTeX abbreviations. Unusedcalendarandstrptimeimports removed.
0.1.4 - 2026-03-21
- Added three new citation styles: APA 7th Edition, IEEE, and Chicago 17th Edition.
- Added support for pybtex built-in styles (
unsrt,alpha,plain,unsrtalpha). - Added
ignore_fieldssupport for text format output with custom/pybtex styles.
- The maximum number of authors displayed before truncation for GB/T 7714-2015 citation style can be configured via max_names (default: 3).
- GB/T 7714-2015 style now uses uppercase for author names and initials per the standard.
- GB/T 7714-2015 style now uses
[J/OL]medium tag for online articles with DOI or URL. - IEEE style now uses its own default
max_names=6instead of inheriting the global default (3).
- Fixed
CitationMixin._init_db()raising"file is not a database"in parallel test environments (e.g. pytest-xdist): corrupt leftover db files are now detected and recreated, schema creation is idempotent, and WAL journal mode is enabled for safer concurrent access.
0.1.3 - 2026-03-04
- Add --remove-comments flag to the CLI simplify_bib command to control whether to keep comments when gathering .tex files.
- Added a new NiceGUI-based web interface (nicegui_app.py) featuring a modern glassmorphism design while retaining all original functionalities. The original Streamlit app remains available.
- Added native Python support for GB/T 7714-2015 citation style (style="gbt7714"), enabling Chinese standard citation formatting without LaTeX dependencies.
- Changed the backend storage of CitationMixin cache from CSV to SQLite for better performance and concurrency support. The existing CSV cache will be automatically migrated to SQLite upon first use.
- Refactored the CLI entry point bib_lookup/cli.py to break down the monolithic main function into modular helper functions for better maintainability.
- Fixed an issue in the CLI where --output-file and --overwrite flags were ignored when using the simplify_bib command.
- Fixed lookup failures for ChinaDOI/CNKI DOIs (e.g., 10.13748/...) by switching request method to GET and adding a browser-header fallback mechanism to retrieve the resolution URL.
0.1.2 - 2026-01-13
- Add argument keep_comments to function gather_tex_source_files_in_one in utils module to control whether to keep comments in the output.
- Enhance the gather_tex_source_files_in_one function: it now ignores input{} commands that are inside verbatim-like environments such as verb, verb*, begin{verbatim}, etc.
- Enhance the static method simplify_bib_file of BibLookup class: it now automatically detects the bib files used in a LaTeX source file, and now supports multiple bib files used in one LaTeX source file.
- Fix handling of macros and non-entry types when loading bib files in method read_bib_file and when simplifying bib files in static method simplify_bib_file of BibLookup class. (See PR #11)
0.1.1 - 2025-08-28
- Fix bugs in the utility function utils.gather_tex_source_files_in_one: Removed problematic regex pattern that caused over-matching of content preceding input{} commands. Implemented robust comment exclusion using interval intersection detection to prevent processing of commented input{} commands. Added utility functions overlaps() and is_intersect() to accurately determine if matched commands fall within comment boundaries.
0.1.0 - 2025-08-18
- Add overwrite optional argument to function gather_tex_source_files_in_one in utils module.
- Add utility function capitalize_title in utils module, and add it as an option for the streamlit app.
- Add doi field to arXiv lookup results.
- Enhance the text format lookup results.
- Fix layout bugs of the streamlit app.
- Fix bugs in the function utils.gather_tex_source_files_in_one when input{some_filepath} and commented % input{some_filepath} coexist.
- Update the base URL for the PubMed ID lookup service, and change post method to get method to fetch the lookup content.
- Fix bugs in the function utils.gather_tex_source_files_in_one when the filepath in input{filepath} contains commands like currfiledir or currfileabsdir, or contains characters other than alphanumeric characters and / (e.g. Chinese characters).
0.0.29 - 2024-08-15
- Add support of simplify bib functions for CLI.
- Improve layout the streamlit app.
- Use bs4 to parse html to text.
- Fix errors for parsing complicated bib items.
- Fix potential errors parsing the trailing month.
0.0.28 - 2024-02-28
- Fix empty lookup result bug #5.
- Fix error parsing bib files in method _to_bib_item of BibLookup class.
0.0.27 - 2023-12-10
- Fix bugs in method _to_bib_item of BibLookup class that break its idempotency.
0.0.26 - 2023-11-16
- Add streamlit app.
- Add cache_limit config as an init parameter for BibLookup class.
- Reformat code with pre-commit.
- Update docs conf.py.
- Remove unused bash scripts.
0.0.25 - 2023-08-16
- Fix errors in method _to_bib_item of BibLookup class when parsing the url field.
0.0.24 - 2023-08-06
- Add support of config file for bib-lookup
This release was yanked.
0.0.22 - 2023-01-30
- Use requests.Session for looking-up the bib items.
0.0.21 - 2023-01-08
- Improve the __eq__ method of BibItem class.
- Update CLI so that recently added functions can be used with CLI.
0.0.20 - 2022-12-03
- Improve the __eq__ method of BibItem class.
0.0.19 - 2022-10-09
- Add CitationMixin class.
0.0.18 - 2022-09-23
- Add support for formats other than bibtex for DOI
0.0.17 - 2022-07-29
- Fix bugs in function gather_tex_source_files_in_one.
- Update the method read_bib_file of BibLookup class, so that no field is ignored when reading a bib file
0.0.16 - 2022-07-19
- Add two optional arguments timeout and ignore_errors for BibLookup class.
- Fix bugs in cases where there are line breaks inside a field.
This release was yanked.
0.0.14 - 2022-06-14
- Fix errors in the __call__ method of BibLookup class when passing a sequence of identifiers with some specific parameters assigned values.
0.0.13 - 2022-06-01
- Add demo notebook.
- Add a default bib_lookuper.
0.0.12 - 2022-05-10
- Add support for arxiv2doi in CLI.
- Add helper function gather_tex_source_files_in_one in utils module.
- Improve handling of network-related errors.
0.0.11 - 2022-04-22
- Add helper method clear_cache for BibLookup class.
- Update the citation_pattern in the static method simplify_bib_file of BibLookup class.
0.0.10 - 2022-04-18
- Add static method simplify_bib_file for BibLookup class.
- Improve bib file parsing.
- Enhanced the layout of the string format of the cached lookup results.
0.0.9 - 2022-04-12
- Add options for converting from arxiv to doi.
- Fix bugs in __eq__ method of BibItem class.
- Correct handling of not found doi items.
- Correct handling of underscores in bib title.
0.0.8 - 2022-04-10
- Add zenodo config file.
0.0.7 - 2022-04-10
- Enhance printing in jupyter notebooks.
0.0.6 - 2022-04-10
- Add utils module which contains several utility functions.
0.0.5 - 2022-04-07
- Add method check_bib_file for BibLookup class.
- Enhance save method for BibLookup class.
0.0.4 - 2022-04-06
- Add CLI support for bib-lookup.
0.0.3 - 2022-04-06
- Add class BibItem.
- Add custom (enhanced) __repr__ method for the BibLookup class.
0.0.2 - 2022-03-31
- Add IO functions for saving the lookup results.
0.0.1 - 2022-03-31
- Add class BibLookup.