Free & open source No login · No subscription · Runs on your computer
View on GitHub →
Home / Tools / Privilege Log Generator
Tool 05 of 07

A first-draft privilege log, generated in Excel.

Scans a folder of documents, has Claude AI write a one-line description of each, and outputs a formatted Excel privilege log: document number, filename, type, date, size, description, and blank columns for your privilege calls and notes.

What it does

Privilege Log Generator scans a folder of documents and produces a formatted Excel privilege log. For each document it fills in the document number, filename, file type, date modified, and size, then uses Claude AI to write a one-line description of what the document is. Columns for privilege claimed and notes are left blank for your review.

The output is a spreadsheet you refine, not a finished filing. The AI descriptions give you a running start on a log that would otherwise take hours to build line by line.

Review before filing. The AI descriptions are a first draft. Always read each line, confirm the description is accurate, and make the privilege call yourself — that judgment stays with the lawyer.

Setup

  1. Install Python 3 (once)

    Download it free from python.org/downloads and run the installer. On Windows, check the box that says "Add Python to PATH" during installation.

  2. Install the three libraries this tool needs

    Open Terminal (Mac) or Command Prompt (Windows) and paste the command for your system:

    Mac
    /usr/local/bin/pip3 install anthropic pypdf openpyxl
    Windows
    pip install anthropic pypdf openpyxl
  3. Get an Anthropic API key

    Create a free account at console.anthropic.com and generate an API key. This is what lets the script send document text to Claude for description. Costs run about $0.001 per document — a 500-document log costs roughly fifty cents.

  4. Download the script

    Use the download button in the sidebar. Save privilege_log.py anywhere convenient.

Running the tool

  1. Start the script

    In Terminal or Command Prompt, navigate to the folder holding the script (type cd, a space, then drag the folder into the window and press Enter). Then run:

    Mac
    python3 privilege_log.py
    Windows
    python privilege_log.py
  2. Answer the prompts

    The script asks for the folder of documents to log, your API key, and where to save the output. Your key is used for this run only — it is never stored anywhere. When you paste it, don't be alarmed if nothing appears to type; that's normal for password-style input.

  3. Let it work through the folder

    You'll see progress as each document is read and described. A few hundred documents typically takes a few minutes.

  4. Open the Excel file and review

    Every document is a row: number, filename, type, date, size, AI description, and blank privilege-claimed and notes columns. Work through it, correct anything, and make your privilege designations.

Common errors

ErrorFix
command not found: python3Python isn't installed (or isn't on your PATH). Install it from python.org — on Windows, re-run the installer and check "Add Python to PATH."
No module named 'anthropic'The libraries didn't install. Re-run the install command from Setup step 2. On a Mac, use the full /usr/local/bin/pip3 path shown above.
authentication_error / 401The API key was mistyped or has been revoked. Copy a fresh key from console.anthropic.com and paste it carefully — no extra spaces.
rate_limit_error / 429You're sending documents faster than your account tier allows. Wait a minute and re-run; the script picks up where it can. Very large folders may need to be run in batches.
Description says "could not read"That document is a scanned image with no text layer, or a format the script can't open. Log it by hand, or OCR the file first and re-run.

More tools in the kit