Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/Weather+Animations?V=13
QUERY_STRINGV=13
CONTENT_TYPE
DOCUMENT_URI/revision/Weather+Animations
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.70.130.148
REMOTE_PORT29826
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR18.222.22.49
HTTP_CF_RAY88d02162fc9b2c9b-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_REFERERhttp://wiki.tcl.tk/revision/Weather+Animations?V=13
HTTP_CF_CONNECTING_IP18.222.22.49
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS

Body


Error

Unknow state transition: LINE -> END

-code

1

-level

0

-errorstack

INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit {Weather Animations} All\ websites\ with\ weather\ information\ also\ show\ animations\ of\ the\ changes\ in\ the\ last\ few\ hours.\ This\ is\ a\ simple\ example\ on\ how\ to\ use\ TCL\ and\ create\ your\ own\ personal\ animations\ that\ could\ span\ longer\ periods\ and\ animate\ at\ different\ speeds.\ It\ could\ also\ be\ used\ to\ create\ time-lapse\ sequences\ from\ webcam\ images.\ I\ am\ using\ it\ on\ Windows\ so\ it\ probably\ needs\ some\ fixes\ for\ Unix/Linux.\ Before\ you\ can\ see\ any\ animation\ you\ need\ to\ let\ the\ program\ collect\ images\ for\ a\ few\ hours.\n\n======\n\ #\n\ #\ sat_pics.tcl\ -\ download,show,save,animate\ weather\ images\n\ #\ \n\ #\ S.Mimmi\ 2007\n\ #\n\ \n\ package\ require\ http\n\n\ ####################\ \ Configuration\ ######################\n\ \n\ #\ Web\ Proxy\ data\ (remove\ comment,\ configure\ if\ needed)\n\ #http::config\ -proxyhost\ hostname\ -proxyport\ port_num\n\ \n\ #\ URLs\ of\ the\ images\ to\ use,\ the\ index\ will\ be\ the\ filename\ \n\ array\ set\ Url\ \{\n\ IR-enh\ \ \ \ http://weather.unisys.com/satellite/sat_ir_enh_us.gif\n\ Sat-sfc\ \ \ http://weather.unisys.com/satellite/sat_sfc_map.gif\n\ Visible\ \ \ http://weather.unisys.com/satellite/sat_vis_us.gif\n\ Wat-vap\ \ \ http://weather.unisys.com/satellite/sat_wv_us.gif\n\ Sfc-dT24h\ http://weather.unisys.com/surface/sfc_con_24temp.gif\n\ Sat-rad\ \ \ http://weather.unisys.com/satellite/sat_ir_rad.gif\n\ US-curr\ \ \ http://image.weather.com/images/maps/current/curwx_600x405.jpg\n\ US-temp\ \ \ http://image.weather.com/images/maps/current/acttemp_600x405.jpg\n\ \}\n\ \n\ #\ Initial\ image\ to\ load\n\ set\ Opt(cur_pic)\ \ \ US-curr\n\ \n\ #\ Init\ checkbutton\ to\ display\ on\ desktop\ background\ (1=display)\n\ set\ Opt(back)\ \ \ \ \ \ 0\n\ \n\ #\ Minutes\ to\ wait\ before\ downloading\ new\ image\n\ set\ Opt(ref_rate)\ \ \ 20\n\ \n\ #\ Milliseconds\ to\ wait\ before\ next\ image\ in\ slideshow\n\ set\ Opt(cyc_rate)\ \ \ 250\n\ #\ How\ many\ pictures\ to\ cycle\ thru\ (all\ newer\ than\ cyc_hours)\n\ set\ Opt(cyc_hours)\ \ 60\n\ \n\ #\ Number\ of\ days\ to\ store\ images\n\ set\ Opt(keep_days)\ \ 14\n\ \n\ #\ Where\ to\ store\ images\n\ set\ Opt(img_path)\ \ \ \"\[pwd\]/wea_img\"\n\ \n\ #\ Start\ GUI\n\ set\ Opt(use_gui)\ \ \ \ 1\n\ \n\ #\ Where\ is\ irfanView\ (if\ running\ on\ windows)\n\ set\ Opt(iview)\ \ \ \ \ \ \"C:/Graphics/IrfanView/i_view32.exe\"\n\ set\ Opt(screen_size)\ \"(1280,1024)\"\n\ \n\ #\ Where\ is\ xloadimage\ (if\ running\ on\ Unix)\n\ set\ Opt(xload)\ \ \ \ \ \ \"/usr/bin/xloadimage\"\n\ \n\ ######################\ End\ configuration\ #############################\n\ \n\ \n\ #\ Load\ user\ defaults\ (remove\ file\ after\ changing\ Opt()\ defaults\ above)\n\ if\ \{\$::tcl_platform(platform)\ ==\ \"windows\"\}\ \{\n\ \ \ \ set\ ini_file\ \"\$env(HOME)/sat_pic.ini\"\n\ \}\ else\ \{\n\ \ \ \ set\ ini_file\ \"\$env(HOME)/.sat_picrc\"\n\ \}\n\ \n\ catch\ \{source\ \$ini_file\}\n\ if\ \{\$Opt(ref_rate)\ <\ 10\}\ \{set\ Opt(ref_rate)\ 10\}\n\ if\ \{\[catch\ \{set\ Url(\[set\ Opt(cur_pic)\])\}\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ Opt(cur_pic)\ \[lindex\ \[array\ names\ Url\]\ 0\]\n\ \}\n\ \n\ #######################\ Procedures\ ###################################\n\ \n\ #\ Get\ image\ from\ web\n\ proc\ get_image\ \{\ url\ \}\ \{\n\ \n\ \ \ \ \ for\ \{set\ i\ 1\}\ \{\$i\ <\ 4\}\ \{incr\ i\}\ \{\n\ \ \ \ \ \ \ \ set\ um\ \[http::geturl\ \$url\ -timeout\ \[expr\ \{1000\ +\ \$i\ *\ 3000\}\]\]\n\ \ \ \ \ \ \ \ http::wait\ \$um\n\ \n\ \ \ \ \ \ \ \ set\ ncode\ \[http::ncode\ \$um\]\n\ \ \ \ \ \ \ \ if\ \{\ \$ncode\ ==\ 200\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ break\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ http::cleanup\ \$um\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \ \ \ if\ \{\$i\ ==\ 4\}\ \{\n\ \ \ \ \ \ \ \ set\ htstat\ \[http::status\ \$um\]\n\ \ \ \ \ \ \ \ wm\ title\ .\ \"\$htstat\ -\ code\ =\ \$ncode\"\n\ \ \ \ \ \ \ \ http::cleanup\ \$um\n\ \ \ \ \ \ \ \ return\ \{\}\n\ \ \ \ \}\n\ \n\ \ \ \ set\ pic\ \[http::data\ \$um\]\n\ \ \ \ http::cleanup\ \$um\n\ \ \ \ return\ \$pic\n\ \}\n\ \n\ \n\ #\ Get\ and\ save\ all\ images\ \n\ proc\ get_all_images\ \{\ \}\ \{\n\ global\ Opt\ Url\n\ \n\ \ \ \ \ foreach\ img_id\ \[array\ names\ Url\]\ \{\n\ \ \ \ \ \ \ \ set\ pic\ \[get_image\ \$Url(\$img_id)\]\n\ \ \ \ \ \ \ \ if\ \{\$pic\ !=\ \{\}\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ save_img\ \[get_file_name\ \$img_id\]\ \$pic\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \}\n\ \n\ #\ Filename\ used\ to\ store\ image\n\ proc\ get_file_name\ \{img_id\}\ \{\n\ global\ Opt\ Url\n\ \n\ \ \ \ set\ ext\ \[file\ extension\ \$Url(\$img_id)\]\n\ \ \ \ \ set\ secs\ \[clock\ seconds\]\n\ \ \ \ \ set\ mins\ \[string\ index\ \[clock\ format\ \$secs\ -format\ \"%M\"\]\ 0\]0\n\ \ \ \ \ return\ \[clock\ format\ \$secs\ -format\ \"\$Opt(img_path)/\$\{img_id\}_%Y%m%d_%H\$mins\$ext\"\]\n\ \}\n\ \n\ #\ Get\ current\ image,\ display\ and\ save,\n\ #\ if\ repeat\ !=\ 0\ then\ start\ the\ timer\ for\ next\ download\ and\ get\ full\ set\n\ proc\ show_image\ \{\ \{repeat\ 0\}\ \}\ \{\n\ global\ Opt\ Url\n\ \n\ \ \ \ set\ img_id\ \$Opt(cur_pic)\n\ \ \ \ \ set\ url\ \$Url(\$img_id)\n\ \ \ \ \n\ \ \ \ #\ Get\ the\ image\n\ \ \ \ \ set\ pic\ \[get_image\ \$url\]\n\ \n\ \ \ \ #\ If\ picture\ found\n\ \ \ \ if\ \{\ \$pic\ !=\ \{\}\ \}\ \{\n\ \n\ \ \ \ \ \ \ \ \ #\ Use\ our\ file\ identifiers\ since\ filenames\ from\ Web\ can\ change\n\ \ \ \ \ \ \ \ set\ filename\ \[get_file_name\ \$img_id\]\n\ \n\ \ \ \ \ \ \ \ #\ Display\ in\ window\n\ \ \ \ \ \ \ \ if\ \{\ \$Opt(use_gui)\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ wm\ title\ .\ \[file\ tail\ \$filename\]\n\ \ \ \ \ \ \ \ \ \ \ \ catch\ \{image\ delete\ wea_img\}\n\ \ \ \ \ \ \ \ \ \ \ \ image\ create\ photo\ wea_img\ -data\ \$pic\n\ \ \ \ \ \ \ \ \ \ \ \ wm\ sizefrom\ .\ program\n\ \ \ \ \ \ \ \ \ \ \ \ .l\ configure\ -image\ wea_img\ \n\ \ \ \ \ \ \ \ \ \ \ \ set\ Opt(cur_idx)\ 0\n\ \ \ \ \ \ \ \ \}\n\ \n\ \ \ \ \ \ \ \ \ #\ Save\ image:\ use\ our\ identifiers\ since\ filenames\ from\ Web\ can\ change\n\ \ \ \ \ \ \ \ set\ image_file\ \[save_img\ \$filename\ \$pic\]\n\ \n\ \ \ \ \ \ \ \ #\ After\ the\ image\ is\ saved\ check\ if\ need\ to\ change\ the\ background\n\ \ \ \ \ \ \ \ if\ \{\$Opt(back)\}\ \{\ load_background\ \$image_file\ \}\n\ \ \ \ \ \}\n\ \n\ \ \ \ if\ \{\ \$repeat\ \}\ \{\n\ \ \ \ \ \ \ \ #\ get\ a\ new\ image\ after\ ref_rate\ min\n\ \ \ \ \ \ \ \ after\ \[expr\ \{\$Opt(ref_rate)\ *\ 60000\}\]\ show_image\ 1\n\ \ \ \ \ \ \ \ \ #\ get\ full\ set\n\ \ \ \ \ \ \ \ get_all_images\n\ \ \ \ \}\n\ \}\n\ \n\ proc\ show_img_file\ \{\ f\ \}\ \{\n\ \ \ \ \ wm\ title\ .\ \[file\ tail\ \$f\]\n\ \ \ \ set\ fd\ \[open\ \$f\ r\]\n\ \ \ \ fconfigure\ \$fd\ -translation\ binary\ -encoding\ binary\n\ \ \ \ set\ pic\ \[read\ \$fd\]\n\ \ \ \ close\ \$fd\n\ \ \ \ catch\ \{image\ delete\ wea_img\}\n\ \ \ \ image\ create\ photo\ wea_img\ -data\ \$pic\n\ \ \ \ .l\ configure\ -image\ wea_img\ \n\ \}\n\ \n\ #\ Cycle\ thru\ images\ previously\ downloaded\n\ proc\ cycle_img\ \{\}\ \{\n\ global\ Opt\n\ \n\ \ \ \ set\ name\ \$Opt(cur_pic)\n\ \ \ \ set\ files\ \ \ \[lsort\ \[glob\ -directory\ \$Opt(img_path)\ \$\{name\}*\]\]\n\ \ \ \ \ set\ cyctime\ \[expr\ \{\[clock\ seconds\]\ -\ \$Opt(cyc_hours)\ *\ 3600\}\]\n\ \ \ \ \ \n\ \ \ \ \ #\ Show\ images\ from\ the\ last\ cyc_hours\n\ \ \ \ foreach\ f\ \$files\ \{\n\ \ \ \ \ \ \ \ if\ \{\ \[file\ mtime\ \$f\]\ >\ \$cyctime\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ show_img_file\ \$f\n\ \ \ \ \ \ \ \ \ \ \ \ #\ wait\ before\ next\ image\n\ \ \ \ \ \ \ \ \ \ \ \ set\ state\ ok\n\ \ \ \ \ \ \ \ \ \ \ \ after\ \$Opt(cyc_rate)\ set\ state\ tout\n\ \ \ \ \ \ \ \ \ \ \ \ vwait\ state\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \ \ \ set\ Opt(cur_idx)\ 0\n\ \}\n\ \n\ #\ View\ old\ images\ with\ the\ back/forward\ buttons\n\ proc\ prev_img\ \{\ step\ \}\ \{\n\ global\ Opt\n\ \n\ \ \ \ set\ name\ \$Opt(cur_pic)\n\ \ \ \ set\ files\ \[lsort\ \[glob\ -directory\ \$Opt(img_path)\ \$\{name\}*\]\]\n\ \n\ \ \ \ incr\ Opt(cur_idx)\ \$step\n\ \ \ \ if\ \{\$Opt(cur_idx)\ >=\ \[llength\ \$files\]\}\ \{\n\ \ \ \ \ \ \ \ set\ Opt(cur_idx)\ \[expr\ \{\[llength\ \$files\]\ -\ 1\}\]\n\ \ \ \ \}\ elseif\ \{\$Opt(cur_idx)\ <\ 0\}\ \{\n\ \ \ \ \ \ \ \ set\ Opt(cur_idx)\ 0\n\ \ \ \ \}\n\ \n\ \ \ \ \ show_img_file\ \[lindex\ \$files\ end-\$Opt(cur_idx)\]\n\ \}\n\ \n\ #\ Save\ the\ image\n\ proc\ save_img\ \{\ filename\ pic\ \}\ \{\n\ \n\ \ \ \ #\ skip\ if\ already\ present\n\ \ \ \ if\ \{!\[file\ exists\ \$filename\]\}\ \{\n\ \ \ \ \ \ \ \ set\ fd\ \[open\ \$filename\ w\]\n\ \ \ \ \ \ \ \ fconfigure\ \$fd\ -translation\ binary\ -encoding\ binary\n\ \ \ \ \ \ \ \ puts\ \$fd\ \$pic\n\ \ \ \ \ \ \ \ close\ \$fd\n\ \ \ \ \ \ \ \ set\ filename\ \[dup_remove\ \$filename\]\n\ \ \ \ \}\ \n\ \ \ \ return\ \$filename\n\ \}\n\ \n\ #\ Remove\ dup\ file\ (checking\ previous,\ return\ name\ of\ file\ kept)\n\ proc\ dup_remove\ \{\ filename\ \}\ \{\n\ global\ Opt\n\ \n\ \ \ \ set\ file_glob\ \[string\ range\ \[file\ tail\ \$filename\]\ 0\ end-9\]\n\ \ \ \ set\ files\ \[lsort\ \[glob\ -directory\ \$Opt(img_path)\ \$\{file_glob\}*\ \]\]\n\ \ \ \ \n\ \ \ \ \ set\ prev_file\ \[lindex\ \$files\ end-1\]\n\ \ \ \ \ if\ \{\$prev_file\ ==\ \"\"\}\ \{\n\ \ \ \ \ \ \ \ return\ \$filename\n\ \ \ \ \}\n\ \ \ \ set\ f_size\ \[file\ size\ \$prev_file\]\ \n\ \ \ \ if\ \{\$f_size\ ==\ \[file\ size\ \$filename\]\}\ \{\n\ \ \ \ \ \ \ \ set\ fd\ \[open\ \$filename\ r\]\n\ \ \ \ \ \ \ \ fconfigure\ \$fd\ -translation\ binary\ -encoding\ binary\n\ \ \ \ \ \ \ \ set\ data1\ \[read\ \$fd\ \$f_size\]\n\ \ \ \ \ \ \ \ close\ \$fd\n\ \ \ \ \ \ \ \ set\ fd\ \[open\ \$prev_file\ r\]\n\ \ \ \ \ \ \ \ fconfigure\ \$fd\ -translation\ binary\ -encoding\ binary\n\ \ \ \ \ \ \ \ set\ data2\ \[read\ \$fd\ \$f_size\]\n\ \ \ \ \ \ \ \ close\ \$fd\n\ \ \ \ \ \ \ \ if\ \{\$data1\ ==\ \$data2\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ file\ delete\ \$filename\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \$prev_file\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \}\n\ \ \ \ return\ \$filename\n\ \}\n\ \n\ #\ Use\ helper\ to\ show\ image\ on\ desktop\ wallpaper\n\ proc\ load_background\ \{\ filename\ \}\ \{\n\ global\ Opt\n\ \n\ \ \ \ if\ \{\$::tcl_platform(platform)\ ==\ \"windows\"\}\ \{\n\ \ \ \ \ \ \ \ exec\ --\ \$Opt(iview)\ \[file\ nativename\ \$filename\]\ /resize=\$Opt(screen_size)\ /resample\ /aspectratio\ /sharpen=15\ /wall=0\ /killmesoftly\ &\n\ \ \ \ \}\ elseif\ \{\$::tcl_platform(platform)\ ==\ \"unix\"\}\ \{\n\ \ \ \ \ \ \ \ exec\ --\ \$Opt(xload)\ \[file\ nativename\ \$filename\]\ -onroot\ -colors\ 32\ &\n\ \ \ \ \}\n\ \}\n\ \n\ #\ Remove\ files\ older\ than\ Opt(keep_days)\n\ proc\ cleanup_old_files\ \{\ \}\ \{\n\ global\ Opt\n\ \n\ \ \ \ \ #\ 60\ *\ 60\ *\ 24\ =\ 86400\ s/day\n\ \ \ \ \ set\ oldtime\ \[expr\ \{\[clock\ seconds\]\ -\ \$Opt(keep_days)\ *\ 86400\}\]\n\ \n\ \ \ \ #\ scan\ all\ files\ and\ remove\ files\ modified\ more\ than\ keep_days\ ago\n\ \ \ \ set\ files\ \[glob\ -directory\ \$Opt(img_path)\ *\]\n\ \ \ \ foreach\ f\ \$files\ \{\n\ \ \ \ \ \ \ \ if\ \{\ \[file\ mtime\ \$f\]\ <\ \$oldtime\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ file\ delete\ \$f\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \ \ \ \ #\ tomorrow\ again\n\ \ \ \ \ after\ 86400000\ cleanup_old_files\n\ \}\n\ \n\ #\ Save\ configuration\ on\ exit\n\ proc\ write_ini\ \{\ filename\ \}\ \{\n\ global\ Opt\n\ \n\ \ \ \ \ set\ fd\ \[open\ \$filename\ w\]\n\ \ \ \ \ foreach\ item\ \[lsort\ \[array\ names\ Opt\]\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ puts\ \$fd\ \"set\ Opt(\$item)\ \\t\\\"\$Opt(\$item)\\\"\"\n\ \ \ \ \ \}\n\ \ \ \ \ close\ \$fd\n\ \}\n\ \n\ #######################################################\n\ #\ GUI\ \n\ #######################################################\n\ if\ \{\ \$Opt(use_gui)\ \}\ \{\n\ package\ require\ Tk\n\ package\ require\ Img\n\ \n\ \ \ \ image\ create\ bitmap\ play_bm\ -data\ \"\n\ #define\ play_width\ 12\n\ #define\ play_height\ 13\n\ static\ char\ play_bits\ =\ \{\n\ \ \ 0x00,0x00,0x08,0x00,0x18,0x00,0x38,0x00,0x78,0x00,0xf8,0x00,0xf8,\n\ \ \ 0x01,0xf8,0x00,0x78,0x00,0x38,0x00,0x18,0x00,0x08,0x00,0x00,0x00\n\ \}\"\n\ \n\ \ \ \ \ frame\ .b\n\ \ \ \ \ pack\ .b\ -side\ top\ -padx\ 2\ -fill\ x\n\ \n\ \ \ \ \ image\ create\ photo\ wea_img\ -width\ 900\ -height\ 650\n\ \ \ \ \ label\ .l\ -image\ wea_img\n\ \ \ \ \ pack\ \ .l\ -side\ bottom\ -fill\ both\n\ \ \n\ \ \ \ \ foreach\ i\ \[lsort\ \[array\ names\ Url\]\]\ \{\n\ \ \ \ \ \ \ \ set\ wn\ \[string\ tolower\ \$i\]\n\ \ \ \ \ \ \ \ button\ .b.\$wn\ -text\ \$i\ -command\ \"set\ Opt(cur_pic)\ \$i\;\ show_image\"\n\ \ \ \ \ \ \ \ pack\ .b.\$wn\ -side\ left\n\ \ \ \ \ \}\n\ \n\ \ \ \ #\ Wallpaper\n\ \ \ \ \ checkbutton\ .b.b\ -text\ Wall.\ -variable\ Opt(back)\n\ \ \ \ \ pack\ .b.b\ -side\ right\ \n\ \n\ \ \ \ \ #\ History\ and\ Animation\n\ \ \ \ frame\ .b.an\ \n\ \ \ \ \ pack\ .b.an\ -side\ right\ -padx\ 2\n\ \n\ \ \ \ button\ .b.an.bk\ -text\ <\ -command\ \{prev_img\ \ 1\}\n\ \ \ \ button\ .b.an.fw\ -text\ >\ -command\ \{prev_img\ -1\}\n\ \n\ \ \ \ label\ .b.an.l\ -text\ \"Hrs\"\n\ \ \ \ \ entry\ .b.an.cyce\ -width\ 3\ -textvariable\ Opt(cyc_hours)\n\ \ \ \ \ button\ .b.an.go\ -image\ play_bm\ -command\ cycle_img\n\ \n\ \ \ \ scale\ .b.an.sc\ -orient\ horizontal\ -width\ 10\ -length\ 110\ -showvalue\ 0\ \\\n\ \ \ \ \ \ \ \ -from\ 4\ -to\ 1000\ -variable\ Opt(cyc_rate)\ -tickinterval\ 0\ \n\ \ \ \ \ entry\ .b.an.cycr\ -width\ 4\ -textvariable\ Opt(cyc_rate)\n\ \ \ \ pack\ .b.an.bk\ .b.an.fw\ -side\ left\n\ \ \ \ \ pack\ .b.an.l\ .b.an.cyce\ .b.an.go\ .b.an.sc\ .b.an.cycr\ -side\ left\n\ \n\ \ \ \ \ wm\ protocol\ .\ WM_DELETE_WINDOW\ \{write_ini\ \$ini_file\;\ exit\}\n\ \ \ \ wm\ resizable\ .\ 0\ 0\n\ \}\n\ \n\ #\ Check\ if\ the\ image\ dir\ exists\n\ if\ \{!\[file\ isdirectory\ \$Opt(img_path)\]\}\ \{\n\ \ \ \ file\ mkdir\ \$Opt(img_path)\n\ \}\n\ \n\ #\ Start\ periodic\ downloads\ and\ show\ image\ if\ enabled\n\ http::config\ -useragent\ \"MSIE\ 5.0\"\n\ show_image\ 1\n\ \n\ #\ Check\ if\ old\ files\ need\ to\ be\ removed\n\ after\ 5000\ cleanup_old_files\n\ ======\n\n<<categories>>\ Application\ |\ Science\ |\ Animation regexp2} CALL {my render {Weather Animations} All\ websites\ with\ weather\ information\ also\ show\ animations\ of\ the\ changes\ in\ the\ last\ few\ hours.\ This\ is\ a\ simple\ example\ on\ how\ to\ use\ TCL\ and\ create\ your\ own\ personal\ animations\ that\ could\ span\ longer\ periods\ and\ animate\ at\ different\ speeds.\ It\ could\ also\ be\ used\ to\ create\ time-lapse\ sequences\ from\ webcam\ images.\ I\ am\ using\ it\ on\ Windows\ so\ it\ probably\ needs\ some\ fixes\ for\ Unix/Linux.\ Before\ you\ can\ see\ any\ animation\ you\ need\ to\ let\ the\ program\ collect\ images\ for\ a\ few\ hours.\n\n======\n\ #\n\ #\ sat_pics.tcl\ -\ download,show,save,animate\ weather\ images\n\ #\ \n\ #\ S.Mimmi\ 2007\n\ #\n\ \n\ package\ require\ http\n\n\ ####################\ \ Configuration\ ######################\n\ \n\ #\ Web\ Proxy\ data\ (remove\ comment,\ configure\ if\ needed)\n\ #http::config\ -proxyhost\ hostname\ -proxyport\ port_num\n\ \n\ #\ URLs\ of\ the\ images\ to\ use,\ the\ index\ will\ be\ the\ filename\ \n\ array\ set\ Url\ \{\n\ IR-enh\ \ \ \ http://weather.unisys.com/satellite/sat_ir_enh_us.gif\n\ Sat-sfc\ \ \ http://weather.unisys.com/satellite/sat_sfc_map.gif\n\ Visible\ \ \ http://weather.unisys.com/satellite/sat_vis_us.gif\n\ Wat-vap\ \ \ http://weather.unisys.com/satellite/sat_wv_us.gif\n\ Sfc-dT24h\ http://weather.unisys.com/surface/sfc_con_24temp.gif\n\ Sat-rad\ \ \ http://weather.unisys.com/satellite/sat_ir_rad.gif\n\ US-curr\ \ \ http://image.weather.com/images/maps/current/curwx_600x405.jpg\n\ US-temp\ \ \ http://image.weather.com/images/maps/current/acttemp_600x405.jpg\n\ \}\n\ \n\ #\ Initial\ image\ to\ load\n\ set\ Opt(cur_pic)\ \ \ US-curr\n\ \n\ #\ Init\ checkbutton\ to\ display\ on\ desktop\ background\ (1=display)\n\ set\ Opt(back)\ \ \ \ \ \ 0\n\ \n\ #\ Minutes\ to\ wait\ before\ downloading\ new\ image\n\ set\ Opt(ref_rate)\ \ \ 20\n\ \n\ #\ Milliseconds\ to\ wait\ before\ next\ image\ in\ slideshow\n\ set\ Opt(cyc_rate)\ \ \ 250\n\ #\ How\ many\ pictures\ to\ cycle\ thru\ (all\ newer\ than\ cyc_hours)\n\ set\ Opt(cyc_hours)\ \ 60\n\ \n\ #\ Number\ of\ days\ to\ store\ images\n\ set\ Opt(keep_days)\ \ 14\n\ \n\ #\ Where\ to\ store\ images\n\ set\ Opt(img_path)\ \ \ \"\[pwd\]/wea_img\"\n\ \n\ #\ Start\ GUI\n\ set\ Opt(use_gui)\ \ \ \ 1\n\ \n\ #\ Where\ is\ irfanView\ (if\ running\ on\ windows)\n\ set\ Opt(iview)\ \ \ \ \ \ \"C:/Graphics/IrfanView/i_view32.exe\"\n\ set\ Opt(screen_size)\ \"(1280,1024)\"\n\ \n\ #\ Where\ is\ xloadimage\ (if\ running\ on\ Unix)\n\ set\ Opt(xload)\ \ \ \ \ \ \"/usr/bin/xloadimage\"\n\ \n\ ######################\ End\ configuration\ #############################\n\ \n\ \n\ #\ Load\ user\ defaults\ (remove\ file\ after\ changing\ Opt()\ defaults\ above)\n\ if\ \{\$::tcl_platform(platform)\ ==\ \"windows\"\}\ \{\n\ \ \ \ set\ ini_file\ \"\$env(HOME)/sat_pic.ini\"\n\ \}\ else\ \{\n\ \ \ \ set\ ini_file\ \"\$env(HOME)/.sat_picrc\"\n\ \}\n\ \n\ catch\ \{source\ \$ini_file\}\n\ if\ \{\$Opt(ref_rate)\ <\ 10\}\ \{set\ Opt(ref_rate)\ 10\}\n\ if\ \{\[catch\ \{set\ Url(\[set\ Opt(cur_pic)\])\}\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ Opt(cur_pic)\ \[lindex\ \[array\ names\ Url\]\ 0\]\n\ \}\n\ \n\ #######################\ Procedures\ ###################################\n\ \n\ #\ Get\ image\ from\ web\n\ proc\ get_image\ \{\ url\ \}\ \{\n\ \n\ \ \ \ \ for\ \{set\ i\ 1\}\ \{\$i\ <\ 4\}\ \{incr\ i\}\ \{\n\ \ \ \ \ \ \ \ set\ um\ \[http::geturl\ \$url\ -timeout\ \[expr\ \{1000\ +\ \$i\ *\ 3000\}\]\]\n\ \ \ \ \ \ \ \ http::wait\ \$um\n\ \n\ \ \ \ \ \ \ \ set\ ncode\ \[http::ncode\ \$um\]\n\ \ \ \ \ \ \ \ if\ \{\ \$ncode\ ==\ 200\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ break\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ http::cleanup\ \$um\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \ \ \ if\ \{\$i\ ==\ 4\}\ \{\n\ \ \ \ \ \ \ \ set\ htstat\ \[http::status\ \$um\]\n\ \ \ \ \ \ \ \ wm\ title\ .\ \"\$htstat\ -\ code\ =\ \$ncode\"\n\ \ \ \ \ \ \ \ http::cleanup\ \$um\n\ \ \ \ \ \ \ \ return\ \{\}\n\ \ \ \ \}\n\ \n\ \ \ \ set\ pic\ \[http::data\ \$um\]\n\ \ \ \ http::cleanup\ \$um\n\ \ \ \ return\ \$pic\n\ \}\n\ \n\ \n\ #\ Get\ and\ save\ all\ images\ \n\ proc\ get_all_images\ \{\ \}\ \{\n\ global\ Opt\ Url\n\ \n\ \ \ \ \ foreach\ img_id\ \[array\ names\ Url\]\ \{\n\ \ \ \ \ \ \ \ set\ pic\ \[get_image\ \$Url(\$img_id)\]\n\ \ \ \ \ \ \ \ if\ \{\$pic\ !=\ \{\}\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ save_img\ \[get_file_name\ \$img_id\]\ \$pic\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \}\n\ \n\ #\ Filename\ used\ to\ store\ image\n\ proc\ get_file_name\ \{img_id\}\ \{\n\ global\ Opt\ Url\n\ \n\ \ \ \ set\ ext\ \[file\ extension\ \$Url(\$img_id)\]\n\ \ \ \ \ set\ secs\ \[clock\ seconds\]\n\ \ \ \ \ set\ mins\ \[string\ index\ \[clock\ format\ \$secs\ -format\ \"%M\"\]\ 0\]0\n\ \ \ \ \ return\ \[clock\ format\ \$secs\ -format\ \"\$Opt(img_path)/\$\{img_id\}_%Y%m%d_%H\$mins\$ext\"\]\n\ \}\n\ \n\ #\ Get\ current\ image,\ display\ and\ save,\n\ #\ if\ repeat\ !=\ 0\ then\ start\ the\ timer\ for\ next\ download\ and\ get\ full\ set\n\ proc\ show_image\ \{\ \{repeat\ 0\}\ \}\ \{\n\ global\ Opt\ Url\n\ \n\ \ \ \ set\ img_id\ \$Opt(cur_pic)\n\ \ \ \ \ set\ url\ \$Url(\$img_id)\n\ \ \ \ \n\ \ \ \ #\ Get\ the\ image\n\ \ \ \ \ set\ pic\ \[get_image\ \$url\]\n\ \n\ \ \ \ #\ If\ picture\ found\n\ \ \ \ if\ \{\ \$pic\ !=\ \{\}\ \}\ \{\n\ \n\ \ \ \ \ \ \ \ \ #\ Use\ our\ file\ identifiers\ since\ filenames\ from\ Web\ can\ change\n\ \ \ \ \ \ \ \ set\ filename\ \[get_file_name\ \$img_id\]\n\ \n\ \ \ \ \ \ \ \ #\ Display\ in\ window\n\ \ \ \ \ \ \ \ if\ \{\ \$Opt(use_gui)\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ wm\ title\ .\ \[file\ tail\ \$filename\]\n\ \ \ \ \ \ \ \ \ \ \ \ catch\ \{image\ delete\ wea_img\}\n\ \ \ \ \ \ \ \ \ \ \ \ image\ create\ photo\ wea_img\ -data\ \$pic\n\ \ \ \ \ \ \ \ \ \ \ \ wm\ sizefrom\ .\ program\n\ \ \ \ \ \ \ \ \ \ \ \ .l\ configure\ -image\ wea_img\ \n\ \ \ \ \ \ \ \ \ \ \ \ set\ Opt(cur_idx)\ 0\n\ \ \ \ \ \ \ \ \}\n\ \n\ \ \ \ \ \ \ \ \ #\ Save\ image:\ use\ our\ identifiers\ since\ filenames\ from\ Web\ can\ change\n\ \ \ \ \ \ \ \ set\ image_file\ \[save_img\ \$filename\ \$pic\]\n\ \n\ \ \ \ \ \ \ \ #\ After\ the\ image\ is\ saved\ check\ if\ need\ to\ change\ the\ background\n\ \ \ \ \ \ \ \ if\ \{\$Opt(back)\}\ \{\ load_background\ \$image_file\ \}\n\ \ \ \ \ \}\n\ \n\ \ \ \ if\ \{\ \$repeat\ \}\ \{\n\ \ \ \ \ \ \ \ #\ get\ a\ new\ image\ after\ ref_rate\ min\n\ \ \ \ \ \ \ \ after\ \[expr\ \{\$Opt(ref_rate)\ *\ 60000\}\]\ show_image\ 1\n\ \ \ \ \ \ \ \ \ #\ get\ full\ set\n\ \ \ \ \ \ \ \ get_all_images\n\ \ \ \ \}\n\ \}\n\ \n\ proc\ show_img_file\ \{\ f\ \}\ \{\n\ \ \ \ \ wm\ title\ .\ \[file\ tail\ \$f\]\n\ \ \ \ set\ fd\ \[open\ \$f\ r\]\n\ \ \ \ fconfigure\ \$fd\ -translation\ binary\ -encoding\ binary\n\ \ \ \ set\ pic\ \[read\ \$fd\]\n\ \ \ \ close\ \$fd\n\ \ \ \ catch\ \{image\ delete\ wea_img\}\n\ \ \ \ image\ create\ photo\ wea_img\ -data\ \$pic\n\ \ \ \ .l\ configure\ -image\ wea_img\ \n\ \}\n\ \n\ #\ Cycle\ thru\ images\ previously\ downloaded\n\ proc\ cycle_img\ \{\}\ \{\n\ global\ Opt\n\ \n\ \ \ \ set\ name\ \$Opt(cur_pic)\n\ \ \ \ set\ files\ \ \ \[lsort\ \[glob\ -directory\ \$Opt(img_path)\ \$\{name\}*\]\]\n\ \ \ \ \ set\ cyctime\ \[expr\ \{\[clock\ seconds\]\ -\ \$Opt(cyc_hours)\ *\ 3600\}\]\n\ \ \ \ \ \n\ \ \ \ \ #\ Show\ images\ from\ the\ last\ cyc_hours\n\ \ \ \ foreach\ f\ \$files\ \{\n\ \ \ \ \ \ \ \ if\ \{\ \[file\ mtime\ \$f\]\ >\ \$cyctime\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ show_img_file\ \$f\n\ \ \ \ \ \ \ \ \ \ \ \ #\ wait\ before\ next\ image\n\ \ \ \ \ \ \ \ \ \ \ \ set\ state\ ok\n\ \ \ \ \ \ \ \ \ \ \ \ after\ \$Opt(cyc_rate)\ set\ state\ tout\n\ \ \ \ \ \ \ \ \ \ \ \ vwait\ state\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \ \ \ set\ Opt(cur_idx)\ 0\n\ \}\n\ \n\ #\ View\ old\ images\ with\ the\ back/forward\ buttons\n\ proc\ prev_img\ \{\ step\ \}\ \{\n\ global\ Opt\n\ \n\ \ \ \ set\ name\ \$Opt(cur_pic)\n\ \ \ \ set\ files\ \[lsort\ \[glob\ -directory\ \$Opt(img_path)\ \$\{name\}*\]\]\n\ \n\ \ \ \ incr\ Opt(cur_idx)\ \$step\n\ \ \ \ if\ \{\$Opt(cur_idx)\ >=\ \[llength\ \$files\]\}\ \{\n\ \ \ \ \ \ \ \ set\ Opt(cur_idx)\ \[expr\ \{\[llength\ \$files\]\ -\ 1\}\]\n\ \ \ \ \}\ elseif\ \{\$Opt(cur_idx)\ <\ 0\}\ \{\n\ \ \ \ \ \ \ \ set\ Opt(cur_idx)\ 0\n\ \ \ \ \}\n\ \n\ \ \ \ \ show_img_file\ \[lindex\ \$files\ end-\$Opt(cur_idx)\]\n\ \}\n\ \n\ #\ Save\ the\ image\n\ proc\ save_img\ \{\ filename\ pic\ \}\ \{\n\ \n\ \ \ \ #\ skip\ if\ already\ present\n\ \ \ \ if\ \{!\[file\ exists\ \$filename\]\}\ \{\n\ \ \ \ \ \ \ \ set\ fd\ \[open\ \$filename\ w\]\n\ \ \ \ \ \ \ \ fconfigure\ \$fd\ -translation\ binary\ -encoding\ binary\n\ \ \ \ \ \ \ \ puts\ \$fd\ \$pic\n\ \ \ \ \ \ \ \ close\ \$fd\n\ \ \ \ \ \ \ \ set\ filename\ \[dup_remove\ \$filename\]\n\ \ \ \ \}\ \n\ \ \ \ return\ \$filename\n\ \}\n\ \n\ #\ Remove\ dup\ file\ (checking\ previous,\ return\ name\ of\ file\ kept)\n\ proc\ dup_remove\ \{\ filename\ \}\ \{\n\ global\ Opt\n\ \n\ \ \ \ set\ file_glob\ \[string\ range\ \[file\ tail\ \$filename\]\ 0\ end-9\]\n\ \ \ \ set\ files\ \[lsort\ \[glob\ -directory\ \$Opt(img_path)\ \$\{file_glob\}*\ \]\]\n\ \ \ \ \n\ \ \ \ \ set\ prev_file\ \[lindex\ \$files\ end-1\]\n\ \ \ \ \ if\ \{\$prev_file\ ==\ \"\"\}\ \{\n\ \ \ \ \ \ \ \ return\ \$filename\n\ \ \ \ \}\n\ \ \ \ set\ f_size\ \[file\ size\ \$prev_file\]\ \n\ \ \ \ if\ \{\$f_size\ ==\ \[file\ size\ \$filename\]\}\ \{\n\ \ \ \ \ \ \ \ set\ fd\ \[open\ \$filename\ r\]\n\ \ \ \ \ \ \ \ fconfigure\ \$fd\ -translation\ binary\ -encoding\ binary\n\ \ \ \ \ \ \ \ set\ data1\ \[read\ \$fd\ \$f_size\]\n\ \ \ \ \ \ \ \ close\ \$fd\n\ \ \ \ \ \ \ \ set\ fd\ \[open\ \$prev_file\ r\]\n\ \ \ \ \ \ \ \ fconfigure\ \$fd\ -translation\ binary\ -encoding\ binary\n\ \ \ \ \ \ \ \ set\ data2\ \[read\ \$fd\ \$f_size\]\n\ \ \ \ \ \ \ \ close\ \$fd\n\ \ \ \ \ \ \ \ if\ \{\$data1\ ==\ \$data2\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ file\ delete\ \$filename\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \$prev_file\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \}\n\ \ \ \ return\ \$filename\n\ \}\n\ \n\ #\ Use\ helper\ to\ show\ image\ on\ desktop\ wallpaper\n\ proc\ load_background\ \{\ filename\ \}\ \{\n\ global\ Opt\n\ \n\ \ \ \ if\ \{\$::tcl_platform(platform)\ ==\ \"windows\"\}\ \{\n\ \ \ \ \ \ \ \ exec\ --\ \$Opt(iview)\ \[file\ nativename\ \$filename\]\ /resize=\$Opt(screen_size)\ /resample\ /aspectratio\ /sharpen=15\ /wall=0\ /killmesoftly\ &\n\ \ \ \ \}\ elseif\ \{\$::tcl_platform(platform)\ ==\ \"unix\"\}\ \{\n\ \ \ \ \ \ \ \ exec\ --\ \$Opt(xload)\ \[file\ nativename\ \$filename\]\ -onroot\ -colors\ 32\ &\n\ \ \ \ \}\n\ \}\n\ \n\ #\ Remove\ files\ older\ than\ Opt(keep_days)\n\ proc\ cleanup_old_files\ \{\ \}\ \{\n\ global\ Opt\n\ \n\ \ \ \ \ #\ 60\ *\ 60\ *\ 24\ =\ 86400\ s/day\n\ \ \ \ \ set\ oldtime\ \[expr\ \{\[clock\ seconds\]\ -\ \$Opt(keep_days)\ *\ 86400\}\]\n\ \n\ \ \ \ #\ scan\ all\ files\ and\ remove\ files\ modified\ more\ than\ keep_days\ ago\n\ \ \ \ set\ files\ \[glob\ -directory\ \$Opt(img_path)\ *\]\n\ \ \ \ foreach\ f\ \$files\ \{\n\ \ \ \ \ \ \ \ if\ \{\ \[file\ mtime\ \$f\]\ <\ \$oldtime\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ file\ delete\ \$f\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \ \ \ \ #\ tomorrow\ again\n\ \ \ \ \ after\ 86400000\ cleanup_old_files\n\ \}\n\ \n\ #\ Save\ configuration\ on\ exit\n\ proc\ write_ini\ \{\ filename\ \}\ \{\n\ global\ Opt\n\ \n\ \ \ \ \ set\ fd\ \[open\ \$filename\ w\]\n\ \ \ \ \ foreach\ item\ \[lsort\ \[array\ names\ Opt\]\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ puts\ \$fd\ \"set\ Opt(\$item)\ \\t\\\"\$Opt(\$item)\\\"\"\n\ \ \ \ \ \}\n\ \ \ \ \ close\ \$fd\n\ \}\n\ \n\ #######################################################\n\ #\ GUI\ \n\ #######################################################\n\ if\ \{\ \$Opt(use_gui)\ \}\ \{\n\ package\ require\ Tk\n\ package\ require\ Img\n\ \n\ \ \ \ image\ create\ bitmap\ play_bm\ -data\ \"\n\ #define\ play_width\ 12\n\ #define\ play_height\ 13\n\ static\ char\ play_bits\ =\ \{\n\ \ \ 0x00,0x00,0x08,0x00,0x18,0x00,0x38,0x00,0x78,0x00,0xf8,0x00,0xf8,\n\ \ \ 0x01,0xf8,0x00,0x78,0x00,0x38,0x00,0x18,0x00,0x08,0x00,0x00,0x00\n\ \}\"\n\ \n\ \ \ \ \ frame\ .b\n\ \ \ \ \ pack\ .b\ -side\ top\ -padx\ 2\ -fill\ x\n\ \n\ \ \ \ \ image\ create\ photo\ wea_img\ -width\ 900\ -height\ 650\n\ \ \ \ \ label\ .l\ -image\ wea_img\n\ \ \ \ \ pack\ \ .l\ -side\ bottom\ -fill\ both\n\ \ \n\ \ \ \ \ foreach\ i\ \[lsort\ \[array\ names\ Url\]\]\ \{\n\ \ \ \ \ \ \ \ set\ wn\ \[string\ tolower\ \$i\]\n\ \ \ \ \ \ \ \ button\ .b.\$wn\ -text\ \$i\ -command\ \"set\ Opt(cur_pic)\ \$i\;\ show_image\"\n\ \ \ \ \ \ \ \ pack\ .b.\$wn\ -side\ left\n\ \ \ \ \ \}\n\ \n\ \ \ \ #\ Wallpaper\n\ \ \ \ \ checkbutton\ .b.b\ -text\ Wall.\ -variable\ Opt(back)\n\ \ \ \ \ pack\ .b.b\ -side\ right\ \n\ \n\ \ \ \ \ #\ History\ and\ Animation\n\ \ \ \ frame\ .b.an\ \n\ \ \ \ \ pack\ .b.an\ -side\ right\ -padx\ 2\n\ \n\ \ \ \ button\ .b.an.bk\ -text\ <\ -command\ \{prev_img\ \ 1\}\n\ \ \ \ button\ .b.an.fw\ -text\ >\ -command\ \{prev_img\ -1\}\n\ \n\ \ \ \ label\ .b.an.l\ -text\ \"Hrs\"\n\ \ \ \ \ entry\ .b.an.cyce\ -width\ 3\ -textvariable\ Opt(cyc_hours)\n\ \ \ \ \ button\ .b.an.go\ -image\ play_bm\ -command\ cycle_img\n\ \n\ \ \ \ scale\ .b.an.sc\ -orient\ horizontal\ -width\ 10\ -length\ 110\ -showvalue\ 0\ \\\n\ \ \ \ \ \ \ \ -from\ 4\ -to\ 1000\ -variable\ Opt(cyc_rate)\ -tickinterval\ 0\ \n\ \ \ \ \ entry\ .b.an.cycr\ -width\ 4\ -textvariable\ Opt(cyc_rate)\n\ \ \ \ pack\ .b.an.bk\ .b.an.fw\ -side\ left\n\ \ \ \ \ pack\ .b.an.l\ .b.an.cyce\ .b.an.go\ .b.an.sc\ .b.an.cycr\ -side\ left\n\ \n\ \ \ \ \ wm\ protocol\ .\ WM_DELETE_WINDOW\ \{write_ini\ \$ini_file\;\ exit\}\n\ \ \ \ wm\ resizable\ .\ 0\ 0\n\ \}\n\ \n\ #\ Check\ if\ the\ image\ dir\ exists\n\ if\ \{!\[file\ isdirectory\ \$Opt(img_path)\]\}\ \{\n\ \ \ \ file\ mkdir\ \$Opt(img_path)\n\ \}\n\ \n\ #\ Start\ periodic\ downloads\ and\ show\ image\ if\ enabled\n\ http::config\ -useragent\ \"MSIE\ 5.0\"\n\ show_image\ 1\n\ \n\ #\ Check\ if\ old\ files\ need\ to\ be\ removed\n\ after\ 5000\ cleanup_old_files\n\ ======\n\n<<categories>>\ Application\ |\ Science\ |\ Animation} CALL {my revision {Weather Animations}} CALL {::oo::Obj445505 process revision/Weather+Animations} CALL {::oo::Obj445503 process}

-errorcode

NONE

-errorinfo

Unknow state transition: LINE -> END
    while executing
"error $msg"
    (class "::Wiki" method "render_wikit" line 6)
    invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
    (class "::Wiki" method "render" line 8)
    invoked from within
"my render $name $C"
    (class "::Wiki" method "revision" line 31)
    invoked from within
"my revision $page"
    (class "::Wiki" method "process" line 56)
    invoked from within
"$server process [string trim $uri /]"

-errorline

4