add bookmobile-gui

This commit is contained in:
lee2sman 2022-01-02 03:13:46 -05:00
parent f7f89274cb
commit 1c6ce42ad3
2 changed files with 42 additions and 0 deletions

32
bookmobile-gui Executable file
View File

@ -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

10
bookmobile-gui.desktop Executable file
View File

@ -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;