bib-filter

Featured

Filter a LaTeX project's bibliography to the entries actually cited, with Overleaf-source resolution, temporary staging, validation, approval-gated canonical replacement, and compilation. Use before submission or after large revisions.

AI & Automation 144 stars 27 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
72
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Bibliography Filter Produce and validate a cited-only bibliography, then replace the manuscript's canonical `.bib` only after explicit approval. In an Overleaf-linked project, the resolved Overleaf bibliography is canonical; a wrapper-local copy is not a second authority. ## When to Use - Before submission — strip unused references from the bibliography - When a shared `.bib` (e.g., Paperpile/Paperpile export) contains hundreds of entries but the paper cites a subset - To reduce `.bib` file size for Overleaf or arXiv upload - As a cleanup step after major revision (removed sections may leave orphan citations) ## Process ### Step 1: Locate files If given a directory, resolve the actual manuscript source first: - For `paper-<arm>/paper`, run `realpath`/`readlink` and inspect the resolved Overleaf target before declaring a bibliography missing. - Read `\bibliography{...}` or `\addbibresource{...}` from the canonical driver and resolve the referenced `.bib` relative to that source tree. - Do not select a project-root export, backup, or stale wrapper copy merely because it has the same filename. Then find the main `.tex` and `.bib` files: - `.tex`: Glob for `*.tex` in the directory (and `paper/` subdirectory if it exists). The main file is the one containing `\begin{document}`. - `.bib`: Look for `\bibliography{...}` or `\addbibresource{...}` in the main `.tex` to find the bib filename. Fall back to globbing `*.bib`. If given a specific `.tex` file, derive the `.bib` fro...

Details

Author
flonat
Repository
flonat/flonat-research
Created
7 months ago
Last Updated
3 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category