slight changes
This commit is contained in:
parent
a5233f47c4
commit
2e1c752bbe
1 changed files with 5 additions and 10 deletions
|
|
@ -10,9 +10,7 @@
|
||||||
text = ''
|
text = ''
|
||||||
input="$1"
|
input="$1"
|
||||||
|
|
||||||
if [ -f "$input" ] && echo "$input" | grep -qi "\.epub$"; then
|
if echo "$input" | grep -qi "\.acsm$"; then
|
||||||
fullpath="$input"
|
|
||||||
else
|
|
||||||
if [ ! -d "$HOME/.config/adept" ]; then
|
if [ ! -d "$HOME/.config/adept" ]; then
|
||||||
adept_activate --anonymous
|
adept_activate --anonymous
|
||||||
fi
|
fi
|
||||||
|
|
@ -23,17 +21,14 @@
|
||||||
| sed "s/^Created //")
|
| sed "s/^Created //")
|
||||||
|
|
||||||
adept_remove "$fullpath"
|
adept_remove "$fullpath"
|
||||||
|
else
|
||||||
|
fullpath="$input"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
name=$(basename "$fullpath" | rev | cut -d. -f2- | rev)
|
name=$(basename "$fullpath" | rev | cut -d. -f2- | rev)
|
||||||
ext=$(echo "$fullpath" | rev | cut -d. -f1 | rev)
|
ext=$(echo "$fullpath" | rev | cut -d. -f1 | rev | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
if [ "$ext" = "epub" ]; then
|
|
||||||
ebook-convert "$fullpath" "/run/media/quadradical/Kindle/documents/$name.mobi"
|
ebook-convert "$fullpath" "/run/media/quadradical/Kindle/documents/$name.mobi"
|
||||||
rm "$fullpath"
|
|
||||||
else
|
|
||||||
mv "$fullpath" "/run/media/quadradical/Kindle/documents/$name.pdf"
|
|
||||||
fi
|
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue