Create a list of subnotes with headlines - jaap-karssenberg/zim-wiki GitHub Wiki
#!/bin/bash #print links to subnotes with headlines DIR=${1%.*} DIR2=$(sed 's/.*\/[^\/]*\///g' <<<"$DIR") for file in `find $DIR -type f -printf '%d\t%P\n' | sort -r -nk1 | cut -f2- ` do echo $DIR2/$file | cut -f 1 -d '.' | sed 's/^/[[/; s/\//:/g; s/$/]]/g'; SUBNOTE=$DIR/$file; cat $SUBNOTE | pcregrep -o1 -i '^\={1,6}([^=].*[^=])={1,6}$' | perl -ne 'print "*$_"' done