monochromatic

monochromatic blog: http://blog.z3bra.org
git clone git://z3bra.org/monochromatic
Log | Files | Refs

commit dc52531819f392f55fca7efd20e171747014458d
parent 5721a2527447e61fbca2fc67e8d30abe5d3ac3e6
Author: z3bra <willy@mailoo.org>
Date:   Tue, 18 Nov 2014 21:49:38 +0100

changed my mind on presentation (feed + main page)

Diffstat:
feeds.sh | 4+++-
publi.sh | 8++------
2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/feeds.sh b/feeds.sh @@ -1,5 +1,7 @@ #!/bin/sh +BASEURL="http://blog.z3bra.org" + test -z "$1" && echo "usage: `basename $0` <input file>" && exit 1 cat << EOF @@ -17,7 +19,7 @@ EOF # -e "s/^$/<\/description>\\n<\/item>/" \ # -e "s/^# \[\(.*\)\](\(.*\))/<item>\n<title>\1<\/title>\n<guid>\2<\/guid>/" \ # -e "s/<guid>/&http:\/\/blog.z3bra.org/" $1 -sed 's^* [x0-9a-f]* - \[\(.*\)\](\(.*\))<item><title>\1</title><guid>\2</guid></item>' $1 +sed "s^* [x0-9a-f]* - \[\(.*\)\](\(.*\))<item><title>\1</title><guid>$BASEURL\2</guid></item>" $1 cat << EOF </channel> diff --git a/publi.sh b/publi.sh @@ -4,16 +4,12 @@ link=$(ls -l last.txt | sed 's^.*-> /') test -z "$EDITOR" && EDITOR=vi -sed 2q last.txt > tmp.txt +sed '1s/^# /* 0x0000 - /;1p;d' last.txt > tmp.txt sed -i "s(#)(${link/.txt/.html})" tmp.txt -echo "input a small description of the article.." >> tmp.txt - $EDITOR tmp.txt -echo >> tmp.txt - -sed '' index.txt >> tmp.txt +cat index.txt >> tmp.txt sed 10q tmp.txt