Input

book: Create a structured PDF document with headings, chapters, etc.
webpage: Specifies that the HTML sources are unstructured (plain web pages.) A page break is inserted between each file or URL in the output.
continuous: Specifies that the HTML sources are unstructured (plain web pages.) No page breaks are inserted between each file or URL in the output.
Title of the document for the front page.
Extract the first heading of the document and use it as title. If checked the title field has no effect.
The title image or HTML page. These file has to be an attachments!
Specify document version to be displayed on the title page.
Intellectual property owner of this document.
Copyright notice for this document.
Information about who and when modified the document are applied at the end.

Output

Specifies the output format.
Grayscale document  Title page
Compression :   JPEG big images 

Pagina

 
User defined page size 
Choose one of the predefined standard sizes or select user defined.
Specifies the page size using a standard name or in points (no suffix or ##x##pt), inches (##x##in), centimeters (##x##cm), or millimeters (##x##mm).
Set the target browser width in pixels (400-1200). This determines the page scaling of images.
   2-Sided   Landscape
   
   
   
Specifies the margin size using points (no suffix or ##x##pt), inches (##x##in), centimeters (##x##cm), or millimeters (##x##mm). Keep empty for default value.
Left
Middle
Right
Sets the page header to use on body pages.
Left
Middle
Right
Sets the page footer to use on body pages.

Indice

Sets the number of levels in the table-of-contents. Empty for unlimited levels.
   Numbered headings Check to number all of the headings in the document.
Sets the title for the table-of-contents. Empty for default title.
Left
Middle
Right
Sets the page header to use on table-of-contents pages.
Left
Middle
Right
Sets the page footer to use on table-of-contents pages.

Colors

Enter the HTML color for the body (background).
Enter the image file for the body (background). These file has to be an attachments!
Enter the HTML color for the text.
Sets the color of links.
Enables generation of links in PDF files.

Fonts

Set the default size of text.
Set the spacing between lines of text.
Choose the default typeface (font) of text.
Choose the default typeface (font) of headings.
Set the size of header and footer text.
Choose the font for header and footer text.
Change the encoding of the text in document.
Check to embed font in the output file.

PDF

Controls the initial viewing mode for the document.
Document: Displays only the docuemnt pages.
Outline: Display the table-of-contents outline as well as the document pages.
Full-screen: Displays pages on the whole screen; this mode is used primarily for presentations.
Controls the initial layout of document pages on the screen.
Single: Displays a single page at a time.
One column: Displays a single column of pages at a time.
Two column left/right: Display two columns of pages at a time; the first page is displayed in the left or right column as selected.
Choose the initial page that will be shown.

Security

Check to number all of the headings in the document.
 Versione stampabile   Modify
 Copy   Annotate
Specifies the document permissions.
Specifies the user password to restrict viewing permissions on this PDF document. Empty for no encryption.
Specifies the owner password to control who can change document permissions etc. If this field is left blank, a random 32-character password is generated so that no one can change the document.

Expert

Specify language to use for date and time format.
Shrink code blocks on page.
Show line numbers for code blocks.
Make spaces visable by dots (·) instead of white spaces.
Make line breaks visable by a extra character (¶) at the end.
Enable this feature if you searching for problems or intent to report a bug report

About

Version 2.4.2 (MoinMoin 1.9.7)


MoinMoin - Generate PDF document using HTMLDOC

This action script generate PDF documents from a Wiki site using
the HTMLDOC (http://www.htmldoc.org) software packages which has
to be preinstalled first.

Copy this script in your's MoinMoin action script plugin directory.

Thanks goes to Pascal Bauermeister who initiated the implementaion.
Lot of things changes since then but the idear using HTMLDOC is the
main concept of this implementation.

Please visit the homepage for further informations:
http://moinmo.in/ActionMarket/PdfAction

@copyright: (C) 2006 Pascal Bauermeister
@copyright: (C) 2006-2010 Raphael Bossek <raphael.bossek@solutions4linux.de>
@license: GNU GPL, see COPYING for details

       

Italiano English
Modifica History Actions

olsrtopologylogger.py

   1 # Copyright 2006 clauz at ninux dot org
   2 # released under the GNU Public License
   3 # 
   4 # OLSR Topology Logger. Dumps dot files from the OLSR dot plugin (http://www.olsr.org).
   5 # Usage: olsrtopologylogger.py [-t timeoutseconds] [-s sleepseconds] [{+,-}h]
   6 #                 [-x n] hostname [port]
   7 # 
   8 #         -t timeoutseconds       set the read timeout to timeoutseconds (default 120).
   9 #         -s sleepseconds         pause sleepseconds between reads (default 300).
  10 #         +h                      use human-readable date and time for filenames.
  11 #         -h                      use floating point seconds since the epoch for filenames (default).
  12 #         -x n            read and dump to file n times (-1=infinite) (default -1)
  13 #         hostname                the hostname
  14 #         port                    the port (default 2004)
  15 # 
  16 # example: olsrtopologylogger.py -x 3 -s 3 localhost
  17 
  18 import telnetlib
  19 import time
  20 import sys
  21 
  22 params={
  23 'PORT':2004, #tcp
  24 'HOST':'127.0.0.1',
  25 'TIMEOUT':120,
  26 'SLEEP':300,
  27 'HUMANREADABLE':False,
  28 'TIMES':-1,
  29 'EXT':'.dot'
  30 }
  31 
  32 def readfromdotplugin(host='127.0.0.1',port='2004',timeout=120, exitonerror=True):
  33 	try:
  34 		dotcon=telnetlib.Telnet(host,port)
  35 	except:
  36 		sys.stderr.write("Error. Can't connect to %s:%s.\n" % (host,port))
  37 		if exitonerror:
  38 			sys.exit(2)
  39 		else:
  40 			return ""
  41 	dotoutput=""
  42 	dotoutput=dotcon.read_until('}',timeout)
  43 	dotoutput+='\n'
  44 	dotcon.close()
  45 	return dotoutput
  46 #readfromdotplugin
  47 	
  48 def gettimestamp(humanreadable=False):
  49 	if humanreadable:
  50 		ts=time.asctime()
  51 		ts=ts.replace(' ','_')
  52 		ts=ts.replace(':','.')
  53 	else:
  54 		ts=time.time()	#seconds since the epoch
  55 	return ts
  56 #gettimestamp
  57 
  58 def processoptions(argvlist,params):
  59 	if len(argvlist)<2:
  60 		instructions= "OLSR Topology Logger. Dumps dot files from the OLSR dot plugin (http://www.olsr.org).\n"
  61 		instructions+="Usage: %s [-t timeoutseconds] [-s sleepseconds] [{+,-}h] \n" % (argvlist[0])
  62 		instructions+="\t\t[-x n] hostname [port]\n\n"
  63 		instructions+="\t-t timeoutseconds\tset the read timeout to timeoutseconds (default %d).\n" % (params['TIMEOUT'],)
  64 		instructions+="\t-s sleepseconds  \tpause sleepseconds between reads (default %d).\n" % (params['SLEEP'],)
  65 		instructions+="\t+h               \tuse human-readable date and time for filenames"
  66 		if params['HUMANREADABLE']:
  67 			instructions+=" (default).\n"
  68 		else:
  69 			instructions+=".\n"
  70 		instructions+="\t-h               \tuse floating point seconds since the epoch for filenames"
  71 		if not params['HUMANREADABLE']:
  72 			instructions+=" (default).\n"
  73 		else:
  74 			instructions+=".\n"
  75 		instructions+="\t-x n           \tread and dump to file n times (-1=infinite) (default %s)\n" % (params['TIMES'],)
  76 		instructions+="\thostname         \tthe hostname\n"
  77 		instructions+="\tport             \tthe port (default %s)\n" % (params['PORT'],)
  78 # 		print instructions
  79 		sys.stderr.write(instructions)
  80 		sys.exit(1)
  81 	else:
  82 		i=1
  83 		while i<len(argvlist):
  84 			arg=argvlist[i]
  85 			if arg=='+h':
  86 				params['HUMANREADABLE']=True
  87 			elif arg=='-h':
  88 				params['HUMANREADABLE']=False
  89 			elif arg=='-t':
  90 				try:
  91 					timeoutseconds=argvlist[i+1]
  92 					params['TIMEOUT']=int(timeoutseconds)
  93 					i+=1
  94 				except:
  95 					pass
  96 			elif arg=='-s':
  97 				try:
  98 					sleepseconds=argvlist[i+1]
  99 					params['SLEEP']=int(sleepseconds)
 100 					i+=1
 101 				except:
 102 					pass
 103  			elif arg=='-x':
 104 				try:
 105 					n=argvlist[i+1]
 106 					params['TIMES']=int(n)
 107 					i+=1
 108 				except:
 109 					pass
 110 			else:
 111 				params['HOST']=arg
 112 				try:
 113 					port=argvlist[i+1]
 114 					params['PORT']=int(port)
 115 					i+=1
 116 				except:
 117 					pass
 118 			i+=1
 119 #processoptions		
 120 
 121 
 122 if __name__=="__main__":
 123 	
 124 	processoptions(sys.argv,params)
 125 	
 126 	try:
 127 		firstiteration=True
 128 		iterations=params['TIMES']	
 129 		while iterations==-1 or iterations>0:
 130 			print "reading..."
 131 			dotoutput=readfromdotplugin(params['HOST'],params['PORT'],params['TIMEOUT'],firstiteration)
 132 			firstiteration=False
 133 			timestamp=gettimestamp(params['HUMANREADABLE'])
 134 			
 135 			filename='%s' % (timestamp,)
 136 			filename+=params['EXT']
 137 			
 138 			try:
 139 				try:
 140 					dotfile=file(filename,'r')
 141 					dotfile.close()
 142 					erstr="Warning! File %s already exists! Skipping...",(filename,)
 143 # 					sys.stderr.write(erstr)
 144 					print erstr
 145 				except IOError:
 146 					dotfile=file(filename,'w')
 147 					dotfile.write(dotoutput)
 148 					dotfile.close()
 149 					print "%s: %s created." % (time.asctime(),filename)
 150 			except:
 151 				sys.stderr.write("I/O Error!!")
 152 				sys.exit(2)
 153 			
 154 			
 155 			print "sleeping %d seconds..." % (params['SLEEP'],)
 156 			time.sleep(params['SLEEP'])
 157 			
 158 			if iterations>0: 
 159 				iterations-=1
 160 		#while
 161 	except KeyboardInterrupt:
 162 		pass