add bookmobile-gui
This commit is contained in:
parent
f7f89274cb
commit
1c6ce42ad3
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env fish
|
||||
#gui wrapper around bookmobile, using yad
|
||||
|
||||
if not command -sq yad
|
||||
echo "Bookmobile-GUI requires yad but it's not installed. Exiting."
|
||||
exit 1
|
||||
end
|
||||
|
||||
set gui (yad --width=400 --title="" --text="Bookmobile: Download articles for offline reading as simple html, themed html, epub or markdown." \
|
||||
--title="Bookmobile" \
|
||||
--form --separator='\t' \
|
||||
--field="URL" \
|
||||
--field="Save as Filename" \
|
||||
--field="Export to format":CB \
|
||||
"" "" 'html!reader!epub!markdown' \
|
||||
--field="Theme (reader mode only)":CB \
|
||||
'medium!github!gmi!now!pandoc' \
|
||||
--field="Output location":DIR \
|
||||
--separator="|" )
|
||||
|
||||
set gui (string split "|" $gui)
|
||||
set url $gui[1]
|
||||
set name $gui[2]
|
||||
set format $gui[3]
|
||||
set theme $gui[4]
|
||||
set output $gui[5]
|
||||
|
||||
if test -n "$name"
|
||||
./bookmobile $url -f $format -t $theme -n $name -o $output
|
||||
else
|
||||
./bookmobile $url -f $format -t $theme -o $output
|
||||
end
|
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Version=0.1
|
||||
Exec=/usr/local/bin/bookmobile-gui
|
||||
Name=Bookmobile-GUI
|
||||
GenericName=Bookmobile-GUI
|
||||
Comment=Yad dialog box wrapper around Bookmobile for downloading articles
|
||||
Encoding=UTF-8
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Utility;
|
Loading…
Reference in New Issue