3 Commits

Author SHA1 Message Date
383af5a61e update run script 2025-09-07 04:24:29 -07:00
67593cc678 add cleanup for legacy .html files 2025-09-07 03:43:37 -07:00
4570d10238 update zip script 2025-09-07 03:32:01 -07:00
2 changed files with 9 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ services:
user: 1000:1000
volumes:
- ~/S/japanese/manga:/mokuro/manga
command: mokuro --parent_dir "manga/One Piece Color" --disable_confirmation && ./zip.sh "manga/One Piece Color"
command: ./run.sh "manga/One Piece Color"
runtime: nvidia
restart: no
network_mode: host

View File

@@ -1,10 +1,10 @@
#!/usr/bin/env bash
# Usage: ./zip.sh [directory]
# Default is current directory
#!/usr/bin/env sh
set -Eeuo pipefail
DIR="${1:-.}"
mokuro --parent_dir "$DIR" --disable_confirmation
cd "$DIR" || exit
for f in *.mokuro; do
@@ -12,10 +12,14 @@ for f in *.mokuro; do
base="${f%.mokuro}"
dir="$base"
zipfile="$base.zip"
if [ -d "$dir" ]; then
if [ -f "$zipfile" ]; then
echo "Warning: Zip file $zipfile already exists, skipping."
elif [ -d "$dir" ]; then
echo "Zipping: $zipfile <- $f $dir/"
zip -qr "$zipfile" "$f" "$dir"
else
echo "Warning: Directory '$dir' not found for '$f', skipping."
fi
done
rm -rf ./*.html