Auto-update: Sat Oct 26 14:02:06 PDT 2024
This commit is contained in:
parent
0ca9c985da
commit
b0b307b1e3
1 changed files with 7 additions and 11 deletions
18
README.md
18
README.md
|
@ -2,11 +2,11 @@
|
|||
|
||||
Hey folks, this repo is just a collection of various scripts I use frequently enough to justify keeping them in my system PATH. I haven't written documentation for all of these scripts. I might in time. For now, here's just a few highlights.
|
||||
|
||||
# bates: PDF Bates Number Extractor & File Renamer
|
||||
## bates
|
||||
|
||||
A simple utility for extracting Bates numbers from PDF documents and optionally renaming files based on those numbers. Particularly useful for organizing legal documents or any PDFs with sequential numbering.
|
||||
A simple Python-based utility for extracting Bates numbers from PDF documents and optionally renaming files based on those numbers. Particularly useful for organizing legal documents or any PDFs with sequential numbering.
|
||||
|
||||
## Overview
|
||||
### Overview
|
||||
|
||||
This tool helps you:
|
||||
- Extract Bates numbers from PDFs (both text-based and scanned documents)
|
||||
|
@ -15,7 +15,7 @@ This tool helps you:
|
|||
- Process entire folders of PDFs in one go
|
||||
- Prepare files for use with my [Bates Source Link](https://sij.ai/sij/DEVONthink/src/branch/main/Bates%20Source%20Link.scpt$0) DEVONthink script
|
||||
|
||||
## Installation
|
||||
### Installation
|
||||
|
||||
1. Install Python dependencies:
|
||||
```bash
|
||||
|
@ -39,7 +39,7 @@ On Ubuntu/Debian:
|
|||
sudo apt-get install tesseract-ocr poppler-utils
|
||||
```
|
||||
|
||||
## Basic Usage
|
||||
### Basic Usage
|
||||
|
||||
Test extraction without renaming files:
|
||||
```bash
|
||||
|
@ -51,7 +51,7 @@ Rename files based on Bates numbers:
|
|||
python3 bates.py /path/to/folder --prefix "FWS-" --digits 6 --name-prefix "FWS "
|
||||
```
|
||||
|
||||
## Options
|
||||
### Options
|
||||
|
||||
- `--prefix`: The Bates number prefix to search for (default: "FWS-")
|
||||
- `--digits`: Number of digits after the prefix (default: 6)
|
||||
|
@ -60,12 +60,8 @@ python3 bates.py /path/to/folder --prefix "FWS-" --digits 6 --name-prefix "FWS "
|
|||
- `--name-prefix`: Prefix to use when renaming files
|
||||
- `--log`: Set logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
|
||||
|
||||
## Notes
|
||||
### Notes
|
||||
|
||||
- Always test with `--dry-run` first
|
||||
- Original filenames are preserved in Finder comments (macOS only)
|
||||
- OCR is disabled by default to keep things fast
|
||||
|
||||
## Questions or Issues?
|
||||
|
||||
Feel free to open an issue on GitHub if you run into any problems or have suggestions for improvements.
|
Loading…
Reference in a new issue