Skip to content

Commit 66a3340

Browse files
author
michael-n-cooper
committed
add metadata support
1 parent a6f503d commit 66a3340

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

create-techniques.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/bin/bash
2+
# $1 = technology
3+
# $2 = filename
4+
# $3 = type
5+
# $4 = title
26
cp techniques/technique-template.html ../technique-template.html
37
while [ $# -gt 0 ]
48
do
59
git checkout --orphan tech-$2
610
git rm -rf .
711
mkdir techniques/$1
812
cp ../technique-template.html techniques/$1/$2.html
9-
sed -i "s/Technique Title/$3/g" techniques/$1/$2.html
13+
sed -i "s/<p id=\"technology\"></p>/<p id=\"technology\">$1</p>/" techniques/$1/$2.html
14+
sed -i "s/<p id=\"type\"></p>/<p id=\"type\">$3</p>/" techniques/$1/$2.html
15+
sed -i "s/Technique Title/$4/g" techniques/$1/$2.html
1016
git add techniques/$1/$2.html
1117
git commit -m "Set up $2 technique"
1218
git push --set-upstream origin tech-$2
1319
shift
1420
shift
1521
shift
22+
shift
1623
done
1724
rm ../technique-template.html
1825
git checkout technique-setup

techniques/technique-template.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<h1>Technique Title</h1>
99
<section id="meta">
1010
<h2>Metadata</h2>
11-
<p id="id">ID: W##</p>
12-
<p id="technology">Technology: ARIA | CSS | Flash | General | HTML | PDF | Script | Server | Silverlight | SMIL | Text</p>
13-
<p id="type">Type: Technique | Failure</p>
11+
<p id="id"></p>
12+
<p id="technology"></p>
13+
<p id="type"></p>
1414
</section>
1515
<section id="applicability">
1616
<h2>When to Use</h2>

0 commit comments

Comments
 (0)