Libiry has several standalone utility scripts for maintenance and troubleshooting.

Available utilities

UtilityPurpose
Clear cacheClear Libiry’s cache
create_icons.pyGenerate application icons (for internal use)

Batch scripts

Windows launchers

ScriptPurpose
libiry.batLaunch Libiry without console output
libiry_debug.batLaunch Libiry with console output
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
libiry.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