X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=blobdiff_plain;f=yarrg%2Fdictionary-manager;h=a0eff44cfca90603be623daa7f9a6c3cddb4663c;hp=5501765992e14e21953238e4fce7724a4801bc32;hb=a1eb18d71953e481f8c42a222d2bcc4b28a8e2b5;hpb=c68fb80a6bbf7acbcac4b2cb2143f5fea745cd2b diff --git a/yarrg/dictionary-manager b/yarrg/dictionary-manager index 5501765..a0eff44 100755 --- a/yarrg/dictionary-manager +++ b/yarrg/dictionary-manager @@ -1,6 +1,6 @@ #!/usr/bin/wish -# helper program for OCR in PCTB upload client +# helper program for OCR in yarrg upload client # This is part of ypp-sc-tools, a set of third-party tools for assisting # players of Yohoho Puzzle Pirates. @@ -25,12 +25,14 @@ # sponsored by Three Rings. -# ./dictionary-manager --approve-updates ijackson@login.chiark.greenend.org.uk /home/ijackson/things/ypp-sc-tools.pctb-dict/pctb /home/ftp/users/ijackson/pctb +# ./dictionary-manager --approve-updates ijackson@login.chiark.greenend.org.uk /home/ijackson/things/ypp-sc-tools.pctb-dict/yarrg /home/ftp/users/ijackson/yarrg -# ./dictionary-manager --approve-updates ijackson@login.chiark.greenend.org.uk /home/ijackson/things/ypp-sc-tools.pctb-dict-test/pctb /home/ftp/users/ijackson/pctb/test +# ./dictionary-manager --approve-updates ijackson@login.chiark.greenend.org.uk /home/ijackson/things/ypp-sc-tools.pctb-dict-test/yarrg /home/ftp/users/ijackson/yarrg/test # ./dictionary-manager --approve-updates '' . . +source yarrglib.tcl + # invocation: # OUT OF DATE @@ -450,14 +452,14 @@ proc required/pixmap {} { set col 0; foreach {colname coldesc rows} $alloptions { debug "INIT $col $colname \"$coldesc\"" label .pe.grid.t$col -text $colname - listbox .pe.grid.l$col + listbox .pe.grid.l$col -height -1 foreach {rowname rowdesc} $rows { debug "INIT $col $colname \"$coldesc\" $rowname \"$rowdesc\"" .pe.grid.l$col insert end $rowdesc } bind .pe.grid.l$col <> [list pixmap_select $col] grid .pe.grid.t$col -column $col -row 0 - grid .pe.grid.l$col -column $col -row 1 + grid .pe.grid.l$col -column $col -row 1 -sticky ns incr col } pixmap_maybe_ok @@ -508,7 +510,7 @@ proc upload_init {} { } if {$privacy_setting} { package require http - ::http::config -urlencoding utf-8 + httpclientsetup dictionary-manager } } @@ -516,8 +518,8 @@ proc upload_status {} { # returns 0, 1, 2 for none, anon, with pirate name global env - if {![info exists env(YPPSC_PCTB_DICT_SUBMIT)]} { debug a; return 0 } - if {![string compare 0 $env(YPPSC_PCTB_DICT_SUBMIT)]} { debug b; return 0 } + if {![info exists env(YPPSC_YARRG_DICT_SUBMIT)]} { debug a; return 0 } + if {![string compare 0 $env(YPPSC_YARRG_DICT_SUBMIT)]} { debug b; return 0 } if {![info exists env(YPPSC_PIRATE)]} { return 1 } if {![info exists env(YPPSC_OCEAN)]} { return 1 } @@ -550,7 +552,7 @@ proc maybe_upload_entry {im def} { } lappend pl entry [format_database_entry/$reqkind $im $def] - set url $env(YPPSC_PCTB_DICT_SUBMIT) + set url $env(YPPSC_YARRG_DICT_SUBMIT) append url dictionary-update-receiver set query [eval ::http::formatQuery $pl] @@ -1308,13 +1310,13 @@ proc main/approve {} { manyset $argv userhost directory dictdir debug "APPROVER FOR $userhost $directory $dictdir" - set cmd [list tclsh $directory/dictionary-manager] - if {$debug} { lappend cmd --debug-server } - lappend cmd --remote-server-1 $directory $dictdir + set cmd "cd $directory && tclsh ./dictionary-manager" + if {$debug} { append cmd " --debug-server" } + append cmd " --remote-server-1 $directory $dictdir" switch -glob $userhost { {} { } {* *} { set cmd $userhost } - * { set cmd [concat [list ssh -o compression=yes $userhost] $cmd] } + * { set cmd [list ssh -o compression=yes $userhost $cmd] } } debug "APPROVER RUNS $cmd"