A tool for standardizing academic article filenames
Project description
Reference Renamer
A powerful CLI tool for standardizing academic article filenames using intelligent metadata extraction and verification.
Features
- Intelligent Renaming: Automatically renames academic articles to a standardized format (
Author_Year_FiveWordTitle.ext) - Multiple Format Support: Handles PDF, TXT, and other document formats
- Metadata Enrichment: Uses arXiv, Semantic Scholar, and LLM processing to verify and enrich document metadata
- Citation Management: Maintains a BibTeX database of processed articles
- Accessibility Focused: Clear output formats and screen reader support
- Comprehensive Logging: Detailed tracking of all file operations
Installation
- Clone the repository:
git clone https://github.com/yourusername/reference-renamer.git
cd reference-renamer
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
- Install dependencies:
pip install -r requirements.txt
- Configure Ollama:
- Ensure Ollama is installed and running
- Load the required model:
ollama run drummer-knowledge
Usage
Basic Usage
# Process a single directory
reference-renamer /path/to/papers
# Process recursively with dry run
reference-renamer --recursive --dry-run /path/to/papers
# Generate citations only
reference-renamer --citations-only /path/to/papers
Configuration
Create a config.yaml file in your working directory:
processing:
supported_extensions:
- .pdf
- .txt
recursive: true
max_title_words: 5
apis:
semantic_scholar:
enabled: true
timeout: 30
arxiv:
enabled: true
max_results: 3
logging:
level: INFO
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
Output
The tool generates:
- Renamed files in the specified format
- A CSV log of all operations (
rename_log.csv) - A BibTeX database of citations (
citations.bib)
Accessibility Features
- Screen reader-friendly output formats
- High contrast CLI interface
- Clear error messages and status updates
- Configurable output formats
Development
Setting up the Development Environment
- Install development dependencies:
pip install -r requirements-dev.txt
- Install pre-commit hooks:
pre-commit install
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=reference_renamer
# Run specific test file
pytest tests/test_file_processor.py
Code Style
This project uses:
- Black for code formatting
- isort for import sorting
- flake8 for linting
- mypy for type checking
Run the full suite:
# Format code
black .
isort .
# Check types
mypy .
# Lint
flake8
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
Please ensure your PR:
- Includes tests for new features
- Updates documentation as needed
- Follows the project's code style
- Includes a clear description of changes
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built with Python
- Uses Ollama for LLM processing
- Integrates with arXiv and Semantic Scholar
Support
For support, please:
- Check the documentation
- Search existing issues
- Create a new issue if needed
Roadmap
See our project board for planned features and enhancements.
What's New
This refactor archives old helpers, adds example snippets, and includes new funding links.
Credits & Support
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reference_renamer-0.1.0.tar.gz.
File metadata
- Download URL: reference_renamer-0.1.0.tar.gz
- Upload date:
- Size: 65.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aebf5d4cdb96b3524ef7e4f170b6fc9fc328175eb51e989e7bc811b92d652a75
|
|
| MD5 |
b47230dde5266c23bed4d43b3a504262
|
|
| BLAKE2b-256 |
77acca38302e314f337d72345e53de890bf7c6b20456df27ced89421dd9068f5
|
File details
Details for the file reference_renamer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: reference_renamer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03b6be677f03d27156c48af41d8a85f5a371c04229a012a51b0e6e77fa19f022
|
|
| MD5 |
675cda848887ed4d8279e6f7fbe5d738
|
|
| BLAKE2b-256 |
f691be9beae76a738d94cff2dffe3285b053240ac1d6419a662d0df9211a68dd
|