initial commit
This commit is contained in:
commit
5b839e0543
174 changed files with 12261 additions and 0 deletions
20
werc/apps/blagh/convert.rc
Executable file
20
werc/apps/blagh/convert.rc
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env rc
|
||||
|
||||
path=($PLAN9/bin/ $path)
|
||||
|
||||
for(p in *.md) {
|
||||
echo
|
||||
echo '========================='
|
||||
echo p $p
|
||||
pp=`{echo $p | sed 's/^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])[\-_](.*).md$/\1 \2 \3 \4/' }
|
||||
echo pp $pp
|
||||
|
||||
d=$pp(1)^'/'^$pp(2)^'/'^$pp(3)^'/'^$pp(4)^'/'
|
||||
|
||||
mkdir -p $d
|
||||
echo $pp(4) | sed -e 's/^[0-9]_//; s/_/ /g;' > $d/index.md
|
||||
echo '=================================' >> $d/index.md
|
||||
echo >> $d/index.md
|
||||
cat $p >> $d/index.md
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue