Plugins

There are a variety of plugins that modify the behavior of album. Furthermore, if you know a little perl, you can write your own!

Here is a list of individual plugins, as well as links to the plugin files.

Plugins require v3.10 or higher to run!

<: my $ALBUM = "/WWW/web/MarginalHacks.com/Hacks/album"; my $PLUGINS = "$ALBUM/plugins"; my $PLUGINS_URL = "plugins"; my $alb = "/data/proj/album/album"; $alb = "/WWW/web/MarginalHacks.com/bin/album" unless -x $alb; $alb = "album" unless -x $alb; open(LIST,"$alb -list_plugins_crf |") || die("Couldn't run $alb -list_plugins_crf\n"); my $show = 1; my %plugins; while () { if (/^PLUGIN: (.+);;(.*);;(.*);;(.*)/) { my $file = $1; $plugins{$file}{version} = $2; $plugins{$file}{author} = $3; $plugins{$file}{url} = $4; my @desc; while () { last if /^END_PLUGIN: $file;;$/; push(@desc,$_); } $plugins{$file}{desc} = \@desc; } } sub safe_url { my ($url) = @_; $url =~ s|mailto:(.+)\@(.+)|mailto:$1 -AT- NOSPAM$2|g; $url =~ s|(href=['"])(?=http)|$1/redir.cgi?|g; $url =~ s|(href=)([^'"])|$1/redir.cgi?$2|g; $url; } my $plugins = 0; foreach my $file ( sort keys %plugins ) { my $p = $plugins{$file}; my ($version,$author,$url,@desc) = ($p->{version},$p->{author},$p->{url},@{$p->{desc}}); $author =~ s/ and /,
/g; my $plugin = $file; $show = $plugin =~ /^examples/ ? 0 : 1; next unless $show; $plugin =~ s/.alp$//; if ($plugin =~ m|(.+)/([^/]+)$|) { my ($path,$file) = ($1,$2); $plugin = "$path/$file"; } $url =~ s|http://||g; $author = safe_url($author); my $Author = "$author"; # Convert to html.. @desc = map { s//>/g; $_; } @desc; while($desc[-1] =~ /^\s*$/) { pop(@desc); } # shorten longer descs if ($#desc>3) { my $id = "plugins".++$plugins; my $splice = $desc[1] =~ /\S/ ? 2 : 1; $desc[$splice] .= < .. (expand) \n"); } @desc = map { s/^\s*$/

/g; s/^\s/  /g; $_; } @desc; print <

PLUG } :>
Plugin Description

$plugin
$Author
@desc