PageRenderTime 15ms CodeModel.GetById 11ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/hyde/tests/ssp/ext/banner.py

http://github.com/hyde/hyde
Python | 18 lines | 12 code | 3 blank | 3 comment | 0 complexity | 581b079bf473858fb7463d52de020771 MD5 | raw file
 1from hyde.plugin import Plugin
 2
 3
 4class BannerPlugin(Plugin):
 5	"""
 6	Adds a comment banner to all generated html files
 7	"""
 8
 9	def text_resource_complete(self, resource, text):
10		banner = """
11<!--
12This file was produced with infinite love, care & sweat.
13Please dont copy. If you have to, please drop me a note.
14-->
15"""
16		if resource.source.kind == "html":
17			text = banner + text
18		return text