diff --git a/calibre-web-automator/books-to-process-scan.sh b/calibre-web-automator/books-to-process-scan.sh index 9ea6cbc..b958efc 100644 --- a/calibre-web-automator/books-to-process-scan.sh +++ b/calibre-web-automator/books-to-process-scan.sh @@ -7,7 +7,7 @@ echo "STARTING NEW-BOOK-PROCESSING SCANNER" # Folder to monitor, replace "/books/to_process" with the folder you want to monitor e.g. your download folder for books -WATCH_FOLDER=grep -o '"ingest_folder": "[^"]*' /etc/calibre-web-automator/dirs.json | grep -o '[^"]*$' +WATCH_FOLDER=$(grep -o '"ingest_folder": "[^"]*' /etc/calibre-web-automator/dirs.json | grep -o '[^"]*$') echo "Watching folder: $WATCH_FOLDER" # Monitor the folder for new files diff --git a/calibre-web-automator/calibre-scan.sh b/calibre-web-automator/calibre-scan.sh index b4d8e97..6ba11fd 100644 --- a/calibre-web-automator/calibre-scan.sh +++ b/calibre-web-automator/calibre-scan.sh @@ -7,11 +7,11 @@ echo "STARTING CALIBRE SCANNER" # Folder to monitor -WATCH_FOLDER=grep -o '"import_folder": "[^"]*' /etc/calibre-web-automator/dirs.json | grep -o '[^"]*$' +WATCH_FOLDER=$(grep -o '"import_folder": "[^"]*' /etc/calibre-web-automator/dirs.json | grep -o '[^"]*$') echo "Watching folder: $WATCH_FOLDER" # Calibre library path -CALIBRE_LIBRARY=grep -o '"calibre_library_dir": "[^"]*' /etc/calibre-web-automator/dirs.json | grep -o '[^"]*$' +CALIBRE_LIBRARY=$(grep -o '"calibre_library_dir": "[^"]*' /etc/calibre-web-automator/dirs.json | grep -o '[^"]*$') echo "Calibre library: $CALIBRE_LIBRARY" # Function to add new eBook to Calibre database diff --git a/calibre-web-automator/setup-cwa.sh b/calibre-web-automator/setup-cwa.sh index 7e269da..d5bfc26 100644 --- a/calibre-web-automator/setup-cwa.sh +++ b/calibre-web-automator/setup-cwa.sh @@ -7,6 +7,7 @@ NC='\033[0m' # No Color # For help with S6 commands ect.: https://wiki.artixlinux.org/Main/S6 # Install required packages +apt install -y xdg-utils apt install -y inotify-tools apt install -y python3 apt install -y python3-pip @@ -28,6 +29,7 @@ python3 $SCRIPT_DIR/setup.py mkdir /etc/calibre-web-automator cp "$SCRIPT_DIR/new-book-processor.py" /etc/calibre-web-automator/new-book-processor.py cp "$SCRIPT_DIR/dirs.json" /etc/calibre-web-automator/dirs.json +rm "$SCRIPT_DIR/dirs.json" cp "$SCRIPT_DIR/check-cwa-install.sh" /etc/calibre-web-automator/check-cwa-install.sh # Add aliases to .bashrc