X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=pctb%2Fdictionary-manager;h=5501765992e14e21953238e4fce7724a4801bc32;hp=19e067c93ba188a21222cb8411845ce19ef13b14;hb=34c9aa9031897dada3450d014de96d68a5834039;hpb=a08a94640f4f0c02c536f337630dd234e917121f diff --git a/pctb/dictionary-manager b/pctb/dictionary-manager index 19e067c..5501765 100755 --- a/pctb/dictionary-manager +++ b/pctb/dictionary-manager @@ -95,7 +95,7 @@ proc bgerror {m} { } proc execpnm_createphoto {photoname args} { - set tmpfile ./#dictimage#.tmp + set tmpfile ./_dictimage.tmp eval exec $args > $tmpfile image create photo $photoname -file $tmpfile file delete $tmpfile @@ -257,7 +257,7 @@ proc write_database {} { proc select_database {dbname_spec} { global dbname set dbname $dbname_spec - read_database "./#local-$dbname#.txt" + read_database "./_local-$dbname.txt" } proc do_database_update {im def} { @@ -1068,9 +1068,14 @@ proc remote-serv/take {yesno file dict} { manyset [dict2_reqkind_rows $dict] reqkind rows if {$yesno} { - read_database $dictdir/master-$dict.txt + set fnbase $dictdir/master-$dict.txt + read_database $fnbase set database($key) $val write_database + + exec gzip --rsyncable -7 < $fnbase > $fnbase.gz.new + exec mv -f -- $fnbase.gz.new $fnbase.gz + set desc approve } else { set desc reject @@ -1207,7 +1212,7 @@ proc approve_showentry {ix file specdata} { set image [exec pgmtoppm {#008-white} << $image | pnmnoraw] append image "\n" } - execpnm_createphoto approve/$ix pnmscale 2 << $image + execpnm_createphoto approve/$ix pnmscale 3 << $image label $wb-image -image approve/$ix -bd 2 -relief flat -bg black manyset [dict2_reqkind_rows $dict] reqkind