-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshadow.pl
42 lines (37 loc) · 868 Bytes
/
shadow.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use strict;
use 5.10.0;
## s|\(hargrove\)|[John Hargrove]($linktext/hargrove/)|;
## s|\(are\)|__Elisha Are__|;
my $linktext = "{{site.subdomainurl}}/team";
my %rep;
while(<>){
next if /^##/;
next if /^$/;
last if /^---/;
chomp;
my ($tag, $name, $lname) = split /\t/, $_;
if (defined $lname){
$name = "[$name]($linktext/$lname/)";
} else {
$name = "__$name" . "__";
}
$rep{$tag}=$name;
}
while(<>){
last if m|/HEAD|;
}
while(<>){
chomp;
## Use SHADOW for resources, events and event notes for future
## It blocks the whole line
## Save HIDE for things we're hoping to reveal this year
## It only blocks things that follow it
## NOTE for shorter (part-line) notes, to help the goal of getting rid of HIDE as workshop progresses
next if /SHADOW/;
s/HIDE.*//;
s/NOTE.*//;
while (my ($tag, $str) = each %rep) {
s/\($tag\)/$str/;
}
say;
}