ComicMetaLink (CML) is a Python script developed to organize and generate symlinks for comic files (.cbz, .cbr, .pdf) using metadata extracted from ComicInfo.xml files. In cases where metadata is unavailable, it defaults to using directory and file names to create symlinks. The script identifies duplicates and only creates symlinks for the highest quality version of each comic, thus preventing duplicate displays in Komga or other comic readers.
- Extracts metadata from
ComicInfo.xml
. - Creates symlinks based on extracted metadata.
- Falls back to directory and file names when
ComicInfo.xml
is not found. - Get rid of dupes by not reflinking the same comic several times.
- Keeps the highest possible resolution when reflinking a comic.
- Cleans up obsolete symlinks.
- Sends processing statistics to a specified Discord webhook.
- Python 3.6+
- Required Python packages:
requests
unidecode
Install the required Python packages using pip:
pip install requests unidecode
To run the script, use the following command:
python comicmetalink.py --source --dest --webhook
--source
: List of source directories to process.--dest
: Destination root directory for symlinks.--webhook
: Discord webhook URL for notifications.
Alternatively, the script can be edited to add source, destination directories and the webhook, in which case, there is no need to use parameters at all.
python comicmetalink.py --source /path/to/your/comics/ --dest /path/to/your/reflinks/ --webhook https://discord.com/api/webhooks/XXXXXXXXXXXXXXXXXX