From: tfheen Date: Sun, 4 Jan 2004 02:42:52 +0000 (+0000) Subject: add blogging support X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26a237a7b0abbad7a821547a0797fb4e441dd076;p=dotfiles add blogging support git-svn-id: file:///svn/tfheen/trunk/dotfiles@252 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- diff --git a/environment b/environment index 8ff0532..800f3b0 100644 --- a/environment +++ b/environment @@ -10,6 +10,26 @@ if [ `uname -s` = "FreeBSD" ] && alias | grep -q "alias ls"; then unalias ls fi +blog () { + if [ "$HOSTNAME" != "vawad.raw.no" ]; then + echo "You are not on vawad!" + return 1 + fi + if [ -z "$1" ]; then + CAT="$1" + else + CAT="/" + fi + + if [ -z "$2" ]; then + SUBJ="$(echo $2 | tr ' ' '_')" + else + SUBJ="blank_subject" + fi + + $EDITOR $HOME/blog/$CAT/$(date +"%Y-%m-%d-%H-%M")_$SUBJ +} + is_debian () { if [ -f /etc/debian_version ]; then return 0