Attachment 'PDFControl1_0_0.py'

Download

   1 # -*- coding: iso-8859-1 -*-
   2 """
   3     MoinMoin - PDFControl macro to control the PDF action plugin output
   4 
   5     Dedicated for HTMLDOC aspecially for the PDF action plugin this macro
   6     allow to control the processing of HTMLDOC.
   7 
   8     A overview about available features gives the HTMLDOC documentation:
   9     http://www.htmldoc.org/documentation.php/Comments.html#COMMENTS
  10 
  11     @copyright: 2006  Raphael Bossek <raphael.bossek@solutions4linux.de>
  12     @license: GNU GPL, see COPYING for details.
  13 """
  14 
  15 def execute (macro, args):
  16 	msg = u''
  17 	if args:
  18 		msg += u'<!-- %s -->' % (args,)
  19 		if macro.form.has_key(u'button_preview'):
  20 			msg += u'<span style="cursor: help; border-bottom: 1px dashed;" title="PDFControl: %s">&nbsp;&para;</span>' % (args,)
  21 	elif macro.form.has_key(u'button_preview'):
  22 		_ = macro.request.getText
  23 		msg += macro.formatter.paragraph (1, css_class='error')
  24 		msg += macro.formatter.smiley(u'/!\\')
  25 		msg += macro.formatter.text(u' ')
  26 		msg += macro.formatter.strong(1)
  27 		msg += macro.formatter.text(_(u'Empty PDFControl macro option.'))
  28 		msg += macro.formatter.text(u' ')
  29 		msg += macro.formatter.text(_(u'To get an overview about HTMLDOC\'s control options please refer to the online help:'))
  30 		msg += macro.formatter.text(u' ')
  31 		msg += macro.formatter.url (1, u'http://www.htmldoc.org/documentation.php/Comments.html#COMMENTS')
  32 		msg += macro.formatter.text(_(u'HTMLDOC help'))
  33 		msg += macro.formatter.url(0)
  34 		msg += macro.formatter.linebreak(0)
  35 		msg += macro.formatter.smiley(u'(!)')
  36 		msg += macro.formatter.text(u' ')
  37 		msg += macro.formatter.text(_(u'To start a new page within the PDF document enter:'))
  38 		msg += macro.formatter.text(u' ')
  39 		msg += macro.formatter.code(1)
  40 		msg += macro.formatter.text(u'[[PDFControl(NEW PAGE)]]')
  41 		msg += macro.formatter.code(0)
  42 		msg += macro.formatter.strong(0)
  43 		msg += macro.formatter.paragraph(0)
  44 
  45 	return msg

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2006-08-31 06:04:20, 1.8 KB) [[attachment:PDFControl1_0_0.py]]
  • [get | view] (2006-11-14 21:57:24, 2.0 KB) [[attachment:PDFControl1_0_1.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.