docs/userguide/genuserguide.py
changeset 494 54257447cfe9
parent 444 f939b29eca9a
child 495 13cb53ed7fdf
equal deleted inserted replaced
493:89dbc0b19ede 494:54257447cfe9
     1 #!/bin/env python
     1 #!/bin/env python
     2 ###############################################################################
     2 #copyright ReportLab Inc. 2000
     3 #
     3 #see license.txt for license details
     4 #   ReportLab Public License Version 1.0
     4 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/docs/userguide/genuserguide.py?cvsroot=reportlab
     5 #
     5 #$Header: /tmp/reportlab/docs/userguide/genuserguide.py,v 1.36 2000/10/25 08:57:45 rgbecker Exp $
     6 #   Except for the change of names the spirit and intention of this
     6 __version__=''' $Id: genuserguide.py,v 1.36 2000/10/25 08:57:45 rgbecker Exp $ '''
     7 #   license is the same as that of Python
       
     8 #
       
     9 #   (C) Copyright ReportLab Inc. 1998-2000.
       
    10 #
       
    11 #
       
    12 # All Rights Reserved
       
    13 #
       
    14 # Permission to use, copy, modify, and distribute this software and its
       
    15 # documentation for any purpose and without fee is hereby granted, provided
       
    16 # that the above copyright notice appear in all copies and that both that
       
    17 # copyright notice and this permission notice appear in supporting
       
    18 # documentation, and that the name of ReportLab not be used
       
    19 # in advertising or publicity pertaining to distribution of the software
       
    20 # without specific, written prior permission. 
       
    21 # 
       
    22 #
       
    23 # Disclaimer
       
    24 #
       
    25 # ReportLab Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
       
    26 # SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
       
    27 # IN NO EVENT SHALL ReportLab BE LIABLE FOR ANY SPECIAL, INDIRECT
       
    28 # OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
       
    29 # OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
       
    30 # OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
       
    31 # PERFORMANCE OF THIS SOFTWARE. 
       
    32 #
       
    33 ###############################################################################
       
    34 #   $Log: genuserguide.py,v $
       
    35 #   Revision 1.35  2000/08/24 13:33:13  rgbecker
       
    36 #   Added  Mac Intro
       
    37 #
       
    38 #   Revision 1.34  2000/08/24 11:30:29  rgbecker
       
    39 #   Preformatted docco added
       
    40 #
       
    41 #   Revision 1.33  2000/08/02 13:11:31  rgbecker
       
    42 #   Table cell updates
       
    43 #
       
    44 #   Revision 1.32  2000/07/18 13:29:19  dinu_gherman
       
    45 #   removed header dashes.
       
    46 #
       
    47 #   Revision 1.31  2000/07/14 10:49:22  rgbecker
       
    48 #   Added space, optional bullet and eg after spacing
       
    49 #
       
    50 #   Revision 1.30  2000/07/13 20:36:02  aaron_watters
       
    51 #   various mods
       
    52 #
       
    53 #   Revision 1.29  2000/07/13 12:38:56  rgbecker
       
    54 #   More demos in appendix
       
    55 #
       
    56 #   Revision 1.28  2000/07/13 12:18:32  rgbecker
       
    57 #   begin app_demos.py
       
    58 #
       
    59 #   Revision 1.27  2000/07/13 11:59:45  rgbecker
       
    60 #   Added some more
       
    61 #
       
    62 #   Revision 1.26  2000/07/10 23:56:09  andy_robinson
       
    63 #   Paragraphs chapter pretty much complete.  Fancy cover.
       
    64 #
       
    65 #   Revision 1.25  2000/07/10 14:20:15  andy_robinson
       
    66 #   Broke up the user guide into chapters.
       
    67 #
       
    68 #   Revision 1.24  2000/07/10 12:00:17  andy_robinson
       
    69 #   More work on chapter 1
       
    70 #
       
    71 #   Revision 1.23  2000/07/08 13:24:27  andy_robinson
       
    72 #   Broke out chapter 1
       
    73 #
       
    74 #   Revision 1.22  2000/07/08 12:52:25  andy_robinson
       
    75 #   Separated out actual text from genuserguide, so it can be broken into
       
    76 #   chapters.
       
    77 #
       
    78 #   Revision 1.21  2000/07/07 22:55:31  andy_robinson
       
    79 #   Added paragraph examples and widget to User Guide
       
    80 #
       
    81 #   Revision 1.20  2000/07/07 16:18:37  rgbecker
       
    82 #   More on paragraphs
       
    83 #
       
    84 #   Revision 1.19  2000/07/07 15:09:21  rgbecker
       
    85 #   Start on Paragraph
       
    86 #
       
    87 #   Revision 1.18  2000/07/06 15:38:15  rgbecker
       
    88 #   Started on Tables added EmbeddedCode utility
       
    89 #
       
    90 #   Revision 1.17  2000/07/05 16:06:01  rgbecker
       
    91 #   Platypus Start
       
    92 #
       
    93 #   Revision 1.16  2000/07/04 22:22:40  andy_robinson
       
    94 #   Tidied up genuserguide.py, especially figure handling; began
       
    95 #   adding PDF special features docco
       
    96 #
       
    97 #   Revision 1.15  2000/07/03 16:03:31  andy_robinson
       
    98 #   Changes to heading structure
       
    99 #
       
   100 #   Revision 1.14  2000/07/03 15:50:31  andy_robinson
       
   101 #   Pushed down most existing lessons one level; added
       
   102 #   functions heading1..heading3 for building story
       
   103 #   unambiguously; spelled Hugh Hefner right!
       
   104 #
       
   105 #   Revision 1.13  2000/07/03 09:51:38  rgbecker
       
   106 #   abspath is 1.5.2 only
       
   107 #   
       
   108 #   Revision 1.12  2000/06/28 16:10:00  rgbecker
       
   109 #   Fix unwanted 'i'
       
   110 #   
       
   111 #   Revision 1.11  2000/06/28 14:52:43  rgbecker
       
   112 #   Documentation changes
       
   113 #   
       
   114 #   Revision 1.10  2000/06/27 10:09:48  rgbecker
       
   115 #   Minor cosmetic changes
       
   116 #   
       
   117 #   Revision 1.9  2000/06/23 21:09:03  aaron_watters
       
   118 #   text text and more text
       
   119 #   
       
   120 #   Revision 1.8  2000/06/22 19:05:24  aaron_watters
       
   121 #   added quickhack for font changes in paragraphs and lots of new text
       
   122 #   
       
   123 #   Revision 1.7  2000/06/22 13:55:59  aaron_watters
       
   124 #   showPage resets all state parameters warning.
       
   125 #   
       
   126 #   Revision 1.6  2000/06/22 13:35:28  aaron_watters
       
   127 #   textobject and pathobject methods, among other things
       
   128 #   
       
   129 #   Revision 1.5  2000/06/21 21:19:29  aaron_watters
       
   130 #   colors, line styles, more examples
       
   131 #   
       
   132 #   Revision 1.4  2000/06/21 15:16:05  aaron_watters
       
   133 #   Lots of graphical examples added
       
   134 #   
       
   135 #   Revision 1.3  2000/06/20 20:31:42  aaron_watters
       
   136 #   typos and more examples
       
   137 #   
       
   138 #   Revision 1.2  2000/06/19 21:13:02  aaron_watters
       
   139 #   2nd try. more text
       
   140 #   
       
   141 #   Revision 1.1  2000/06/17 02:57:56  aaron_watters
       
   142 #   initial checkin. user guide generation framework.
       
   143 #   
       
   144 __version__=''' $Id: genuserguide.py,v 1.35 2000/08/24 13:33:13 rgbecker Exp $ '''
       
   145 
     7 
   146 
     8 
   147 __doc__ = """
     9 __doc__ = """
   148 This module contains the script for building the user guide.
    10 This module contains the script for building the user guide.
   149 """
    11 """
   156 from stylesheet import getStyleSheet
    18 from stylesheet import getStyleSheet
   157 styleSheet = getStyleSheet()
    19 styleSheet = getStyleSheet()
   158 
    20 
   159 #from reportlab.platypus.doctemplate import SimpleDocTemplate
    21 #from reportlab.platypus.doctemplate import SimpleDocTemplate
   160 from reportlab.lib.units import inch
    22 from reportlab.lib.units import inch
   161 from reportlab.lib.pagesizes import letter
    23 from reportlab.lib.pagesizes import letter, A4
   162 from reportlab.platypus import Paragraph, Spacer, Preformatted,\
    24 from reportlab.platypus import Paragraph, Spacer, Preformatted,\
   163             PageBreak, CondPageBreak, Flowable, Table, TableStyle, \
    25             PageBreak, CondPageBreak, Flowable, Table, TableStyle, \
   164             NextPageTemplate, KeepTogether, Image, XPreformatted
    26             NextPageTemplate, KeepTogether, Image, XPreformatted
   165 from reportlab.lib.styles import ParagraphStyle
    27 from reportlab.lib.styles import ParagraphStyle
   166 from reportlab.lib import colors
    28 from reportlab.lib import colors
   521         _story = []
   383         _story = []
   522     return _story
   384     return _story
   523 
   385 
   524         
   386         
   525 def run():
   387 def run():
   526     doc = RLDocTemplate('userguide.pdf',pagesize = letter)
   388     doc = RLDocTemplate('userguide.pdf',pagesize = A4)
   527 
   389 
   528 
   390 
   529     #this builds the story    
   391     #this builds the story    
   530     #resetStory()
   392     #resetStory()
   531 
   393