aboutsummaryrefslogtreecommitdiff
path: root/em
blob: 62d6d26c240badc7486c7d84b8a0bf8d5a4f69d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/rc

# em -- limited hypertext markup language

if(~ $#* 0){
	ramfs -p
	file=/tmp/file
	cat > $file
}
if not
	file=$1

if(~ $#linktext 0) linktext=link
hrefs=`'
'{emcollect $file}
for(href in $hrefs){
	parts=`'=
'{echo $href}
	ref$parts(1)=$parts(2)
}

emparse $file