www.mtkn.jp

Manuscripts for my personal webpage.
git clone https://git.mtkn.jp/www.mtkn.jp
Log | Files | Refs | LICENSE

journal_update (396B)


      1 #!/bin/sh
      2 cd $(dirname $0)/..
      3 man=$(pwd)/man
      4 pub=$(pwd)/pub
      5 tmp=$(pwd)/.tmp
      6 
      7 #journal index
      8 grep "\<h1\>" $man/journal/posts/*.html | sort -r | sed 's/^.*journal\///;s/:<h1>/ /;s/<\/h1>//' |
      9 awk '{print $1,$1,$2}' | sed 's/^[^ 0-9]*\([0-9]*\)[^ ]*/\1/' | awk 'BEGIN{print "<h1>日記</h1><ul>"}END{print "</ul>"}{printf "<li>[%s]<a href=\"%s\">%s</a></li>\n",$1,$2,$3}' > $man/journal/index.html