mirror: 初始快照
This commit is contained in:
commit
fae8c948cd
319 files changed
+5217599
No files matched your search
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Generate .mobi ebooks
|
||||
input_dir=$1
|
||||
output_dir=$2
|
||||
kindle_dir=kindle
|
||||
output_kindle_dir=$output_dir/$kindle_dir
|
||||
|
||||
for fullpath in "*.opf"
|
||||
do
|
||||
echo "Input $fullpath"
|
||||
filename="${fullpath##*/}" # Strip longest match of */ from start
|
||||
dir="${fullpath:0:${#fullpath} - ${#filename}}" # Substring from 0 thru pos of filename
|
||||
base="${filename%.[^.]*}" # Strip shortest match of . plus at least one non-dot char from end
|
||||
ext="${filename:${#base} + 1}"
|
||||
|
||||
echo "dir $dir"
|
||||
echo "base $base"
|
||||
echo "filename $filename"
|
||||
|
||||
wine ./bin/mobigen/mobigen.exe -unicode -s0 $fullpath
|
||||
|
||||
outfilename="$dir$base.mobi"
|
||||
echo "outfilename: + $outfilename"
|
||||
mv $outfilename $output_kindle_dir
|
||||
done
|
||||
|
||||
#zip -9 -j $output_dir/all-kindle.zip $output_kindle_dir/*.mobi
|
||||
|
||||
|
||||
Reference in new issue
Block a user