I'm looking for some help with a linux bash script (I think is a good solution). I'm horrible at writing this stuff, and could use help, if anyone is inclined.
I've got a folder of various types of books, mobi, epub. From time to time, I'll dump another book into this folder. I'd like to set a cron.hourly to run a bash script that:
If theres a book in toadd-folder (
1. If it's a .mobi file
a. break
Else
a. convert to mobi
b. delete non mobi files
2. Import book to Calibre
3. Move original to alternate storage folder
)
Looks like this
interesting setup from digitalocean
I've got a folder of various types of books, mobi, epub. From time to time, I'll dump another book into this folder. I'd like to set a cron.hourly to run a bash script that:
If theres a book in toadd-folder (
1. If it's a .mobi file
a. break
Else
a. convert to mobi
b. delete non mobi files
2. Import book to Calibre
3. Move original to alternate storage folder
)
Looks like this
Code:
xvfb-run calibredb add