my $heredoc = q:to/END/;
1001 发现栏小程序主入口
1005 顶部搜索框的搜索结果页
1006 发现栏小程序主入口搜索框的搜索结果页
END
.say for $heredoc.split("\n");
.say for $heredoc.lines;
my @filenames = dir '.', test => all(/\.md$/);
for @filenames -> $filePath {
my $path = $filePath.path();
$path ~~ s/.md//;
my $date = DateTime.new(now);
my $head =
qq:heredoc 'EOT';
title: $path.IO.basename()
date: $date
tags: Perl6
categories: Perl 6
EOT
my @content = slurp $filePath;
spurt($filePath.path, "$head\n@content[]");
}
for $=finish.lines -> $line {
print $line if $line ~~ m|^'<s>'$| ^ff^ $line ~~ m|^'</s>'$|;
}
=finish
for $=finish.lines -> $line {
say 'insert into aladdin_user (name,password,gender,idgard,logo,sign,mail) values (' ~
($line.split: /<[\s+ |]>/, :skip-empty)»."e.join(",") ~ ");";
}
sub quote(Str $ele) {
return '"' ~ $ele ~ '"';
}
=finish