Biblio is a simple command-line tool for managing academic PDFs. It extracts metadata (title, authors, year) and renames files automatically based on a customisable format.
- Automated Metadata Extraction: Extracts titles, authors, and years from PDFs using the Google Gemini API.
- Batch Processing: Handles multiple files at once for faster results.
- Customisable File Naming: Renames files in a structured format you define.
- Hassle-Free Organisation: Prevents duplicate filenames and keeps your files tidy.
- Download the latest
.exefile from the Releases page. - Place it in a preferred directory for easy access. [Optionally, add the folder to
System Properties > Advanced > Environment Variables > PATHfor global access]
- Clone the repository:
git clone https://github.com/sovietscout/biblio.git cd biblio - Build the project:
cargo build --release
Create a .env file in the project root:
# API Configuration
MODEL=gemini-2.0-flash-lite
API_KEY=YOUR_GEMINI_API_KEY
# Output Formatting
FORMAT="{authors} ({year}). {title}"Customising the Format:
- You can define how renamed files should be structured using placeholders:
{authors}→ Author names (defaults toUnknown Authorif not found).{year}→ Publication year (defaults toUnknown Yearif missing).{title}→ Document title (defaults toUntitledif missing).- Example format:
FORMAT="{authors} - {title} ({year})"renames a file toSmith, J. - Research Study (2020).pdf.
- Go to Google AI Studio.
- Sign in with your Google account.
- Navigate to the 'Get API key' section and create a new API key.
- Copy the API key and add it to your
.envfile asAPI_KEY.
biblio file1.pdf file2.pdf ...Instead of listing files manually, piping lets you process all PDFs in a folder:
Windows (PowerShell)
Get-ChildItem -Path . -Filter *.pdf | ForEach-Object { $_.FullName } | biblioMac/Linux
ls *.pdf | biblioMIT License. See LICENSE for details.