Skip to content

Add cleanbib command for automated entry syncing #2

@mr-devs

Description

@mr-devs

Summary

It would be very helpful if fbib could automatically verify and update .bib entries to ensure accuracy/consistency.

The idea here is to do what betterbib does, but for free.

Proposed CLI Usage

fbib cleanbib ref.bib.

Which will generated [existingfname]_clean.bib by default.

OR, if the user wants to specify the output file name, they can run it with the existing --output command.

fbib cleanbib ref.bib --output ref_cleaned.bib

Key Requirements

  • Metadata Syncing: Should use the existing package functionality to first look up with DOI. If DOI is not present, then the title should be used to search. After searching, there should be a check to ensure that what was found is the right item (check title text, after cleaning and normalizing text, removing brackets, etc.). If no match is found, raise a warning that prints the existing bib item and then move it into the "unverified" group described below.
  • Error Handling: If an entry cannot be found or verified:
    • Print a warning to stderr.
    • Retain the original entry in the output file.
  • Review Grouping: Unverified entries should be moved to the bottom of the newly created file under a "% TODO: Manual Review Needed" comment.

Why this is useful

Manually fixing exported BibTeX entries is tedious and prone to human error. Automating the "cleanup" phase ensures that citations are always formatted correctly and up-to-date with official metadata.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions