Skip to content

Instantly share code, notes, and snippets.

@leedo
Created February 17, 2010 17:30
Show Gist options
  • Save leedo/306837 to your computer and use it in GitHub Desktop.
Save leedo/306837 to your computer and use it in GitHub Desktop.
proc animate args {
 set urls {};
 set delay 0.5;
 for {set x 0} {$x<[llength $args]} {incr x} {
   set item [lindex $args $x];
   if {$item == "-delay"} {
     set delay [lindex $args [expr $x + 1]];
   } elseif {[regexp -nocase {^http} $item]} {
     lappend urls $item;
   }
 }
 set url http://prettybrd.com/ani?d=$delay&[apply ?  [inject $urls {} {{list img} {concat $list i $img}}]]#.gif;
 cache put animate url $url;
 return [magic noop [i.buttes $url]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment