3 STARTRE
='^;;; Commentary:$'
5 DATE
=$
(date +"%B %e, %Y %H:%M %Z")
7 echo "title: Markdown Mode for Emacs
8 description: A major mode for GNU Emacs for editing Markdown-formatted text files.
11 created: May 24, 2007 23:47 GMT
13 style: #badges { margin-bottom: 1.5rem; }
16 <a href=\"https://github.com/jrblevin/markdown-mode\"><img src=\"https://img.shields.io/github/stars/jrblevin/markdown-mode.svg?style=social&label=GitHub\" alt=\"GitHub\"/></a>
17 <a href=\"https://melpa.org/#/markdown-mode\"><img src=\"https://melpa.org/packages/markdown-mode-badge.svg\" alt=\"MELPA badge\"/></a>
18 <a href=\"https://stable.melpa.org/#/markdown-mode\"><img src=\"https://stable.melpa.org/packages/markdown-mode-badge.svg\" alt=\"MELPA stable badge\"/></a>
19 <a href=\"https://travis-ci.org/jrblevin/markdown-mode\"><img src=\"https://travis-ci.org/jrblevin/markdown-mode.svg?branch=master\" alt=\"Travis CI Build Status\"/></a>
20 <a href=\"https://leanpub.com/markdown-mode\"><img src=\"https://img.shields.io/badge/leanpub-guide-orange.svg\" alt=\"Guide to Markdown Mode for Emacs\"/></a>
23 echo "# Emacs Markdown Mode [![MELPA badge][melpa-badge]][melpa-link] [![MELPA stable badge][melpa-stable-badge]][melpa-stable-link] [![Travis CI Build Status][travis-badge]][travis-link] [![Guide to Markdown Mode for Emacs][leanpub-badge]][leanpub-link]
25 [melpa-link]: https://melpa.org/#/markdown-mode
26 [melpa-stable-link]: https://stable.melpa.org/#/markdown-mode
27 [melpa-badge]: https://melpa.org/packages/markdown-mode-badge.svg
28 [melpa-stable-badge]: https://stable.melpa.org/packages/markdown-mode-badge.svg
29 [travis-link]: https://travis-ci.org/jrblevin/markdown-mode
30 [travis-badge]: https://travis-ci.org/jrblevin/markdown-mode.svg?branch=master
31 [leanpub-link]: https://leanpub.com/markdown-mode
32 [leanpub-badge]: https://img.shields.io/badge/leanpub-guide-orange.svg
34 <!-- This file is autogenerated by webpage.sh from the comments at the top of
35 markdown-mode.el. Make edits there, not here. -->" > README.md
37 cat markdown-mode.el |\
38 # Keep only the Commentary section
39 awk "/$STARTRE/,/$STOPRE/" |\
40 # Remove the start and step regexps
41 grep -v "$STARTRE" |
grep -v "$STOPRE" |\
43 sed -e 's/^;;; \(.*\):$/## \1/' |\
44 # Remove leading spaces (but don't disturb pre blocks)
45 sed -e 's/^;;[ ]\{0,1\}//' |\
47 #sed -e 's/\(\[\[[^]\n]*\]\]\)/\\\1/g' |\
48 # Use Markdown-style backticks for single-quoted lisp code
49 sed -e 's/`\([^'\'']*\)'\''/`\1`/g' |\
50 # Use <kbd> tags for single characters (except `t`)
51 sed -e 's/`\([^`t]\)`/<kbd>\1<\/kbd>/g' |\
52 # Use <kbd> tags for TAB and RET keys
53 sed -e 's/`TAB`/<kbd>TAB<\/kbd>/g' |\
54 sed -e 's/`RET`/<kbd>RET<\/kbd>/g' |\
55 # Use <kbd> tags for keybindings prefixed by C, M, or S
56 sed -e 's/`\([CMS]-[^`]*\)`/<kbd>\1<\/kbd>/g' |\
57 # checkdoc wants Lisp to always be capitalized
58 sed -e 's/^\([ ]*\)``` Lisp$/\1```lisp/' |\
59 # Remove email addresses
60 sed -e 's/ <[^>]*@[^<]*> / /g' \
61 |
tee -a README.md
>> index.text