#!/usr/bin/perl use strict; use warnings; open(INPUT, "<", "/srv/http/journal/journal/index.html"); while () { if (/^
  • .*page=people%2F([^&]*).*\n$/) { s//$1/; my $basename = $_; my @names = split /\./, $_; my @Names = map ucfirst, @names; my $family = shift @Names; my $given = join ' ', @Names; my $realname = "$family, $given"; my $pathname = "/home/liw/Journal/src/people/$basename.mdwn"; if (!-e $pathname) { print "$realname\n"; open(OUTPUT, ">", $pathname); print OUTPUT "[[!meta title=\"$realname\"]]\n\n"; print OUTPUT "[[!inline feeds=no "; print OUTPUT "pages=\"notes/* and !notes/*/* and "; print OUTPUT "link(people/$basename)\"]]\n"; close(OUTPUT); } } }