ComicsViewer/README.md

32 lines
1.7 KiB
Markdown

# Comics Viewer
This small project provides a web based viewer for comics in the CBZ and CBR formats. Comic archive files are parsed and extracted dynamically while browsing and viewing. Thumbnails are created for both series and issues the first time a folder is accessed.
## This project requires
* PHP ImageMagick
* PHP RAR (PECL)
- Unfortunately RAR 4.2.0 has not been updated for PHP 8/8.2 (as of 2025-03-13). There is a [fix](https://github.com/cataphract/php-rar/pull/18/commits/02331ca1cc1e8638c34e024566f4b391a6c863c5) available. Just replace the files in the version from PECL/Github with the ones in [this](https://github.com/cataphract/php-rar/pull/18).
## Don't forget to:
* Make sure the web server can read the folder than contains your comic book/novel archives
* Create a MySQL/MariaDB database for the app with privileges granted to a user
* Import the `install/initial_db_mysql.sql` database structure
* Change the ownership of the `comics/` and `thumbs/` folders to the web server user
* Copy the `variables-dist.php` file to `variables.php` and edit that file appropriately
* Set up the cron job for things in [cron/](cron/). If installing on a systemd OS see services below.
## Services
If installing on an OS that uses systemd there are service and timer files available to run the periodic jobs. They can be installed like so:
* Edit the script path to the appropriate installation location in the service file(s)
* Copy the service/timer files to the system:
- `sudo cp install/clearextracts.* /etc/systemd/system/`
- `sudo systemctl daemon-reload`
* Start the timer:
- `sudo systemctl start clearextracts.timer`
* Enable the timer:
- `sudo systemctl enable clearextracts.timer`