blob: 62dda5accb81d8fe2f621226d6ce5f382b6f0f07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/bin/perl
use strict;
use warnings;
open(INPUT, "<", "/home/liw/Journal/html/index.html");
while (<INPUT>) {
if (/^<li><span class="createlink">.*page=%2Ftag%2F([^&]*)&from=notes%2F.*\n$/) {
s//$1/;
my $tag = $_;
my $pathname = "/home/liw/Journal/src/tag/$tag.mdwn";
if (!-e $pathname) {
print "$tag\n";
open(OUTPUT, ">", $pathname);
print OUTPUT "[[!inline archive=yes pages=\"link(tag/$tag)\"]]\n";
close(OUTPUT);
}
}
}
|