Use line-[beginning|end]-position consistently instead of aliases
[markdown-mode.git] / webpage.sh
blob76ce4b7f9c8dae116c4af565be39853ead9041c6
1 #!/bin/sh
3 STARTRE='^;;; Commentary:$'
4 STOPRE='^\f$'
5 DATE=$(date +"%B %e, %Y %H:%M %Z")
7 echo "title: Emacs Markdown Mode
8 description: A major mode for GNU Emacs for editing Markdown-formatted text files.
9 markup: markdown
10 icon: emacs
11 city: Columbus
12 created: May 24, 2007 23:47 GMT
13 modified: $DATE" > index.text
15 cat markdown-mode.el |\
16 # Keep only the Commentary section
17 awk "/$STARTRE/,/$STOPRE/" |\
18 # Remove the start and step regexps
19 grep -v "$STARTRE" | grep -v "$STOPRE" |\
20 # Convert headers
21 sed -e 's/^;;; \(.*\):$/\n## \1/' |\
22 # Remove leading spaces (but don't disturb pre blocks)
23 sed -e 's/^;;[ ]\{0,1\}//' |\
24 # Escape wiki links
25 #sed -e 's/\(\[\[[^]\n]*\]\]\)/\\\1/g' |\
26 # Use Markdown-style backticks for single-quoted lisp code
27 sed -e 's/`\([^'\'']*\)'\''/`\1`/g' |\
28 # Use <kbd> tags for keybindings
29 sed -e 's/`\([CM]-[^`]*\)`/<kbd>\1<\/kbd>/g' |\
30 # Remove email addresses
31 sed -e 's/ <.*@.*> / /g' \
32 >> index.text