public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: /
Date: Wed, 22 Jun 2011 08:18:26 +0000 (UTC)	[thread overview]
Message-ID: <3d6d93ab74484fca1ad5e9c3cee1d8384bc89b99.mgorny@gentoo> (raw)

commit:     3d6d93ab74484fca1ad5e9c3cee1d8384bc89b99
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 22 06:45:38 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun 22 06:45:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=3d6d93ab

Add a simple HTML skel to the doc output.

---
 setup.py |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/setup.py b/setup.py
index 7cf346f..aa0e9f5 100755
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,23 @@ class DocCommand(Command):
 			sys.stderr.write('Doc generation requires the markdown module:\nhttp://www.freewisdom.org/projects/python-markdown\n')
 			sys.exit(1)
 
-		m = markdown.Markdown()
+		class PMSTSExts(markdown.Extension):
+			class HTMLSkelAdder(markdown.postprocessors.Postprocessor):
+				def run(self, text):
+					return '''<?xml version="1.0" encoding="utf-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>%s</title>
+</head>
+<body>
+''' % 'XXX' + text + '''
+</body>
+</html>'''
+
+			def extendMarkdown(self, md, md_globals):
+				md.postprocessors.add('htmlskeladder', self.HTMLSkelAdder(), '_end')
+
+		m = markdown.Markdown(extensions = [PMSTSExts()])
 		for f in self.docs:
 			d = '%s.html' % os.path.splitext(f)[0]
 			print('Creating %s (from %s)' % (d, f))



             reply	other threads:[~2011-06-22  8:18 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22  8:18 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-04 16:49 [gentoo-commits] proj/pms-test-suite:master commit in: / Michał Górny
2012-01-02 22:03 Michał Górny
2011-08-20  6:23 Michał Górny
2011-08-14 15:04 Michał Górny
2011-08-13  8:54 Michał Górny
2011-08-08 22:15 Michał Górny
2011-07-31 14:57 Michał Górny
2011-07-31 14:43 Michał Górny
2011-07-10 10:12 Michał Górny
2011-06-29 12:58 Michał Górny
2011-06-28  7:13 Michał Górny
2011-06-28  7:13 Michał Górny
2011-06-25  8:39 Michał Górny
2011-06-25  8:39 Michał Górny
2011-06-23 21:14 Michał Górny
2011-06-23 16:28 Michał Górny
2011-06-22 11:50 Michał Górny
2011-06-22  8:18 Michał Górny
2011-06-19 10:54 Michał Górny
2011-06-08 12:44 Michał Górny
2011-06-05 18:37 Michał Górny
2011-05-31 19:18 Michał Górny
2011-05-31 19:18 Michał Górny
2011-05-31 18:10 Michał Górny
2011-05-31 18:10 Michał Górny
2011-05-29 17:55 Michał Górny
2011-05-27  6:21 Michał Górny
2011-05-26  7:25 Michał Górny
2011-05-25 20:40 Michał Górny
2011-05-25 18:18 Michał Górny
2011-05-24 14:28 Michał Górny
2011-05-16 20:00 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d6d93ab74484fca1ad5e9c3cee1d8384bc89b99.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox