shithub: zet

ref: 44efe644d6962daaf2f299560633221fd43abcc3
dir: /zls/

View raw version
#!/bin/rc

rfork en
dir=`{basename -d `{src -n $0}}
. $dir/zlib

if(~ $1 '')
	files=*.txt
if not
	files=$*

fn construct {
	for (file in $files) {
		title=`{sed 1q $file}
		tags=`{ztag $file}
		echo $file^'	'^$"title^'	'^$"tags
	}
}

if(! test -f /mnt/acme/index) {
	zlist $files
	exit
}
wd=`{pwd}
cd /mnt/acme/new
echo name $wd/-Zettelkasten >ctl
@{cd $wd; zlist $files} > data
echo scratch >ctl
echo nomenu >ctl
echo nomark >ctl
echo clean >ctl