Skip to content

Instantly share code, notes, and snippets.

@leedo
Created February 5, 2010 21:43
Show Gist options
  • Save leedo/296294 to your computer and use it in GitHub Desktop.
Save leedo/296294 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 [magick noop [i.buttes $url]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment