github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

thomas11 / md-readme

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 5
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Generate Markdown-formatted READMEs from your Emacs Lisp file headers. — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Library header standards (Elisp manual D.8) once again. 
Thomas Kappler (author)
Mon Nov 23 00:23:47 -0800 2009
commit  415ad6f9b83bc01062af280e431f76a688c49109
tree    0ce4067deefee6b5513de46006dfd8449655dbd3
parent  df989ca82781839b701df4cf9ee202ab983fb29a
md-readme /
name age
history
message
file Makefile Loading commit data...
file README.md Mon Nov 23 00:23:47 -0800 2009 Library header standards (Elisp manual D.8) onc... [Thomas Kappler]
file md-readme.el Mon Nov 23 00:23:47 -0800 2009 Library header standards (Elisp manual D.8) onc... [Thomas Kappler]
README.md

md-readme.el --- Markdown-formatted READMEs for your ELisp

Copyright (C) 2009 Thomas Kappler

  • Author: Thomas Kappler tkappler@gmail.com
  • Created: 2009 November 07
  • Keywords: lisp, help, readme, markdown, header, documentation, github
  • URL: http://github.com/thomas11/md-readme/tree/master

This file is not part of GNU Emacs.

Licensed under the GPL version 3 or later.

Commentary

The git-based source code hosting site http://github.com has lately become popular for Emacs Lisp projects. Github has a feature that displays files named "README[.suffix]" automatically on a project's main page. If these files are formatted in Markdown, the formatting is interpreted. See http://github.com/guides/readme-formatting for more information.

Emacs Lisp files customarily have a header in a fairly standardized format. md-readme extracts this header, re-formats it to Markdown, and writes it to the file "README.md" in the same directory. If you put your code on github, you could have this run automatically, for instance upon saving the file or from a git pre-commit hook, so you always have an up-to-date README on github.

It recognizes headings, the GPL license disclaimer which is replaced by a shorter notice linking to the GNU project's license website, lists, and normal paragraphs. Lists are somewhat tricky to recognize automatically, and the program employs a very simple heuristic currently.

Dependencies

None.

Installation

(require 'md-readme), then you can call mdr-generate manually. I have not found a way to call it automatically that I really like, but here is one that works for me:

(require 'md-readme)
(dir-locals-set-class-variables
 'generate-README-with-md-readme
 '((emacs-lisp-mode . ((mdr-generate-readme . t)))))
(dolist (dir '("~/Projects/wpmail/" "~/Projects/md-readme/"))
  (dir-locals-set-directory-class
   dir 'generate-README-with-md-readme))
(add-hook 'after-save-hook 
          '(lambda () (if (boundp 'mdr-generate-readme) (mdr-generate))))

History

  • 2009-11: First release.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server