Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 17 lines (16 sloc) 0.407 kb
#!/bin/bash
d=$(date '+%Y-%m-%d')
! [ -d $d ] && mkdir $d
read -p "Title? " t && echo $t \
|tr '[:upper:]' '[:lower:]'\
|perl -pi -e 's/[^a-z0-9-]+/-/g;s/-+/-/g;s/^-|-$//g'\
|(cat; echo "")\
|while read f; do
f="$d/$f"
! [ -d "$f" ] && mkdir -p "$f"
rm "$f/index.html" &>/dev/null
f="$f/README.markdown"
! [ -f "$f" ] && echo "# $t" > "$f"
$EDITOR "$f" && git add "$f" && git commit
done
./archive.sh
Jump to Line
Something went wrong with that request. Please try again.