Skip to content

Commit

Permalink
MAJOR BUG FIX: Scripting error corrected in watch services. Everythin…
Browse files Browse the repository at this point in the history
…g should now work flawlessly for everyone :)
  • Loading branch information
crocodilestick committed Jun 29, 2024
1 parent ca2f342 commit 2c9c4a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion calibre-web-automator/books-to-process-scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions calibre-web-automator/calibre-scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions calibre-web-automator/setup-cwa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2c9c4a3

Please sign in to comment.