From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QZIeA-0002kd-Cd for garchives@archives.gentoo.org; Wed, 22 Jun 2011 08:18:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0D2661C12D; Wed, 22 Jun 2011 08:18:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id CD1E21C12A for ; Wed, 22 Jun 2011 08:18:27 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5C9802AC00D for ; Wed, 22 Jun 2011 08:18:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 488D68003C for ; Wed, 22 Jun 2011 08:18:26 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <3d6d93ab74484fca1ad5e9c3cee1d8384bc89b99.mgorny@gentoo> Subject: [gentoo-commits] proj/pms-test-suite:master commit in: / X-VCS-Repository: proj/pms-test-suite X-VCS-Files: setup.py X-VCS-Directories: / X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 3d6d93ab74484fca1ad5e9c3cee1d8384bc89b99 Date: Wed, 22 Jun 2011 08:18:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: da57f489ec9fa6ec373631ab12f3b83f commit: 3d6d93ab74484fca1ad5e9c3cee1d8384bc89b99 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Wed Jun 22 06:45:38 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Wed Jun 22 06:45:38 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3D3d6d93ab 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) =20 - m =3D markdown.Markdown() + class PMSTSExts(markdown.Extension): + class HTMLSkelAdder(markdown.postprocessors.Postprocessor): + def run(self, text): + return ''' + + + %s + + +''' % 'XXX' + text + ''' + +''' + + def extendMarkdown(self, md, md_globals): + md.postprocessors.add('htmlskeladder', self.HTMLSkelAdder(), '_end') + + m =3D markdown.Markdown(extensions =3D [PMSTSExts()]) for f in self.docs: d =3D '%s.html' % os.path.splitext(f)[0] print('Creating %s (from %s)' % (d, f))