Libiry includes several standalone utility scripts for maintenance and troubleshooting.

Available utilities

UtilityPurposeDocumentation
check_pdf_tags.pyIdentify PDFs with tag read/write issuesGuide
create_icons.pyGenerate application iconsInternal use
install.batInstall dependenciesInstallation

PDF Tag Checker

The most commonly used utility. Scans your library to identify PDFs that cannot store tags directly, and creates OPF sidecar files for them in bulk. It is there for performance purposes only. You can use Libiry without using the PDF Tag Checker.

Quick usage:

python check_pdf_tags.py "C:\Books"

Full documentation →

Batch scripts

Windows launchers

ScriptPurpose
run.batLaunch Libiry (no console)
run_debug.batLaunch Libiry with console output
debug.batAlternative debug launcher
install.batCreate venv and install dependencies
Libiry2Go.batLaunch Libiry2Go

Usage

All batch scripts should be run from the Libiry folder:

cd C:\path\to\Libiry
run.bat

Creating custom scripts

Python Environment

Use the Libiry virtual environment:

@echo off
cd /d "%~dp0"
call venv\Scripts\activate
python your_script.py

Importing Libiry modules

Your custom scripts can use Libiry’s core modules:

import sys
from pathlib import Path
 
# Add Libiry to path
sys.path.insert(0, str(Path(__file__).parent))
 
# Import modules
from core.metadata_extractor import extract_metadata
from core.cover_extractor import extract_cover
 
# Use them
metadata = extract_metadata(Path("book.epub"))
print(metadata)

Available modules

ModuleFunctions
core.metadata_extractorextract_metadata(), OPF helpers
core.cover_extractorextract_cover()
core.cover_cacheThumbnail caching
core.file_openerOpen files in apps
core.libraryFolder scanning

Automation examples

Weekly catalog update

@echo off
REM update_catalog.bat - Run weekly via Task Scheduler
 
cd /d "C:\Libiry"
call venv\Scripts\activate
 
REM Generate updated catalog
python libiry2go.py "D:\Books" "D:\Catalog" 100
 
REM Check for problematic PDFs
python check_pdf_tags.py "D:\Books"
 
echo Done!

Scan new PDFs

@echo off
REM scan_new_pdfs.bat - Check only recent PDFs
 
cd /d "C:\Libiry"
call venv\Scripts\activate
 
python check_pdf_tags.py "D:\Books\NewArrivals"