~royniang/lib

7b41e484cd650986491405751846a4780878b74b — roy niang 4 months ago 72acf28
Some improvement and safety measures.
3 files changed, 9 insertions(+), 6 deletions(-)

M bin/md
M bin/pdf
M themes/rio/XOK9
M bin/md => bin/md +3 -3
@@ 4,7 4,7 @@ ppi=157
if(test -e /bin/netsurf)
	browser=netsurf
if not
	browser=mothra
	browser='mothra -a'

if(! test -e /bin/markdown){
	echo 'You need discount (see 9front’s extras)'


@@ 12,10 12,10 @@ if(! test -e /bin/markdown){
}

if(~ $#* 0){
	echo 'Usage: md file'
	echo 'Usage: md [file]'
	exit
}
d=$1
f=`{basename $d}
c='<meta charset="utf-8" />' # netsurf needs this
window -cd `{pwd} 'ramfs;echo '''$c''' > /tmp/'$f'.html; markdown -f 1.0 '$d' >> /tmp/'$f'.html; '$browser' file:///tmp/'$f'.html'
window -r 50 50 800 800 -cd `{pwd} 'ramfs;echo '''$c''' > /tmp/'$f'.html; markdown -f 1.0 '$d' >> /tmp/'$f'.html; '$browser' file:///tmp/'$f'.html'

M bin/pdf => bin/pdf +5 -2
@@ 2,12 2,15 @@
ppi=157

if(~ $#* 0){
	echo 'Usage: pdf file page'
	echo 'Usage: pdf [file] [page]'
	exit
}

d=$1
if(~ $#2 1)

if(~ $#2 1){
	p=$2
	window -cd `{pwd} page -R -p $ppi -j $d!$p $d
}
if not
	window -cd `{pwd} page -R -p $ppi $d

M themes/rio/XOK9 => themes/rio/XOK9 +1 -1
@@ 1,4 1,4 @@
rioback	/usr/royniang/docs/pic/wallpapers/abs.img
rioback	dddddd
back	e2e8e8
high	abb7ba
border	abb7ba