# Blosxom Plugin: memoran
# Author(s): ogane  
# Version: 2005/01/08
# Blosxom Home/Docs/Licensing: http://www.raelity.org/apps/blosxom/

package memoran;

# --- Configration Variables -----
my $fn = '/path/to/memo.txt';
# --------------------------------

$body = '';
$title = '';

sub start {
	1;
}

sub foot {
	my($pkg, $currentdir, $foot_ref) = @_;

	open(FILE, "$fn");
	@a = <FILE>;
	close(FILE);

	$body = "<ul>";
	
	$i = 0;
	foreach (@a) {
		if ($i == 0){
			$title = $_;
			$i = 1;
			next;
		}

		$line = $_;

		SWITCH: {
			$line = "<del>$_</del>", last SWITCH  if s/^#//;
			$line = "<strong>$_</strong>", last SWITCH  if s/^\*//;
		}

		$line = "<li>$line</li>";
		$body .= $line;

	}

	$body .= "</ul>";

	1;
}

1;
