some fixes
This commit is contained in:
0
db-update.py
Normal file → Executable file
0
db-update.py
Normal file → Executable file
7
html-to-epub.sh
Normal file → Executable file
7
html-to-epub.sh
Normal file → Executable file
@@ -5,16 +5,17 @@ for srcdir in $(find html-src -name \*-h -type d)
|
||||
do
|
||||
srcfile=$(echo $srcdir/$(basename $srcdir).htm)
|
||||
prefix=$(basename -s -h.htm $srcfile)
|
||||
echo $prefix
|
||||
echo $prefix" " | tr "\n" "\r"
|
||||
destpath=$(echo $(dirname $(dirname $srcfile)) | sed "s/^html-src/ebooks/")
|
||||
mkdir -p $destpath
|
||||
if [ $srcfile -nt $destpath/$prefix.epub ]
|
||||
then
|
||||
ebookmaker --make kindle.images --generate_cover --output-dir $destpath $srcfile 2>&1 >/dev/null
|
||||
echo ""
|
||||
docker run --rm -v $PWD:$PWD cr.gitlab.alfter.us/salfter/ebookmaker --make kindle.images --generate_cover --output-dir $PWD/$destpath $PWD/$srcfile 2>&1 >/dev/null
|
||||
coverfile=$(ls $destpath/*.png)
|
||||
if [ "$coverfile" != "" ]
|
||||
then
|
||||
ebookmaker --make kindle.images --cover $coverfile --output-dir $destpath $srcfile 2>&1 >/dev/null
|
||||
docker run --rm -v $PWD:$PWD cr.gitlab.alfter.us/salfter/ebookmaker --make kindle.images --cover $coverfile --output-dir $PWD/$destpath $PWD/$srcfile 2>&1 >/dev/null
|
||||
fi
|
||||
rm -f $destpath/$prefix.epub $destpath/$prefix.mobi 2>&1 >/dev/null
|
||||
mv $destpath/*.epub $destpath/$prefix.epub
|
||||
|
||||
1
update-mirror.sh
Normal file → Executable file
1
update-mirror.sh
Normal file → Executable file
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo $LIBRARY_PATH
|
||||
rsync -avz aleph.gutenberg.org::gutenberg-epub/feeds/pg_catalog.csv .
|
||||
rsync -avz --delete --delete-excluded --exclude "/images/" --exclude "/pg/" --exclude "/retired/" --exclude "/cache/" --exclude "*/*-page-images/*" --exclude "*/*-page-images/" --exclude "*/old/*" --exclude "*/old/" --include "*/" --include "*.htm" --include "*.jpg" --include "*.png" --include "*.gif" --exclude "*" aleph.gutenberg.org::gutenberg $LIBRARY_PATH/html-src
|
||||
rm html-src/hosted-by-ibiblio.png
|
||||
|
||||
Reference in New Issue
Block a user