diff --git a/bookmobile-gui b/bookmobile-gui new file mode 100755 index 0000000..ec74174 --- /dev/null +++ b/bookmobile-gui @@ -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 diff --git a/bookmobile-gui.desktop b/bookmobile-gui.desktop new file mode 100755 index 0000000..7ca3583 --- /dev/null +++ b/bookmobile-gui.desktop @@ -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;