summaryrefslogtreecommitdiff
path: root/getxbookgui
diff options
context:
space:
mode:
Diffstat (limited to 'getxbookgui')
-rwxr-xr-xgetxbookgui24
1 files changed, 24 insertions, 0 deletions
diff --git a/getxbookgui b/getxbookgui
new file mode 100755
index 0000000..08d3f04
--- /dev/null
+++ b/getxbookgui
@@ -0,0 +1,24 @@
+#!/usr/bin/tclsh
+# See COPYING file for copyright and license details.
+package require Tk
+
+set bin [list getgbook getabook]
+
+proc go {} {
+ set cmd "[.bin get [.bin curselection]] [.id get]"
+ set out [open "|$cmd" "r"]
+ while {![eof $out]} {
+ .txt insert end [gets $out]
+ .txt insert end "\n"
+ update
+ }
+}
+
+label .lab -text "book id"
+entry .id
+listbox .bin -listvariable bin -exportselection 0
+.bin selection set 0
+button .dl -text "download" -command go
+text .txt
+
+pack .lab .id .bin .dl .txt