Skip to main content

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

  1. Clone the repository:
git clone https://github.com/yourusername/reference-renamer.git
cd reference-renamer
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # or `venv\Scripts\activate` on Windows
  1. Install dependencies:
pip install -r requirements.txt
  1. 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:

  1. Renamed files in the specified format
  2. A CSV log of all operations (rename_log.csv)
  3. 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

  1. Install development dependencies:
pip install -r requirements-dev.txt
  1. 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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and linting
  5. 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

Support

For support, please:

  1. Check the documentation
  2. Search existing issues
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reference_renamer-0.1.0.tar.gz (65.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reference_renamer-0.1.0-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

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

Hashes for reference_renamer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aebf5d4cdb96b3524ef7e4f170b6fc9fc328175eb51e989e7bc811b92d652a75
MD5 b47230dde5266c23bed4d43b3a504262
BLAKE2b-256 77acca38302e314f337d72345e53de890bf7c6b20456df27ced89421dd9068f5

See more details on using hashes here.

File details

Details for the file reference_renamer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for reference_renamer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03b6be677f03d27156c48af41d8a85f5a371c04229a012a51b0e6e77fa19f022
MD5 675cda848887ed4d8279e6f7fbe5d738
BLAKE2b-256 f691be9beae76a738d94cff2dffe3285b053240ac1d6419a662d0df9211a68dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page