Ejemplo n.º 1
0
def run(pagesize=None, verbose=0, outDir=None):
    import os
    from reportlab.tools.docco.rl_doc_utils import setStory, getStory, RLDocTemplate, defaultPageSize
    from reportlab.tools.docco import rl_doc_utils
    from reportlab.lib.utils import open_and_read, _RL_DIR
    if not outDir: outDir = os.path.join(_RL_DIR,'docs')
    destfn = os.path.join(outDir,'userguide.pdf')
    doc = RLDocTemplate(destfn,pagesize = pagesize or defaultPageSize)

    #this builds the story
    setStory()
    G = {}
    exec 'from reportlab.tools.docco.rl_doc_utils import *' in G, G
    for f in (
        'ch1_intro',
        'ch2_graphics',
        'ch2a_fonts',
        'ch3_pdffeatures',
        'ch4_platypus_concepts',
        'ch5_paragraphs',
        'ch6_tables',
        'ch7_custom',
        'ch9_future',
        'app_demos',
        ):
        exec open_and_read(f+'.py',mode='t') in G, G
    del G

    story = getStory()
    if verbose: print 'Built story contains %d flowables...' % len(story)
    doc.build(story)
    if verbose: print 'Saved "%s"' % destfn
Ejemplo n.º 2
0
def run(pagesize=None, verbose=1, outDir=None):
    import os
    from reportlab.tools.docco.rl_doc_utils import setStory, getStory, RLDocTemplate, defaultPageSize
    from reportlab.tools.docco import rl_doc_utils
    from reportlab.lib.utils import open_and_read, _RL_DIR
    if not outDir: outDir = os.path.join(_RL_DIR,'docs')
    destfn = os.path.join(outDir,'graphguide.pdf')
    doc = RLDocTemplate(destfn,pagesize = pagesize or defaultPageSize)

    #this builds the story
    setStory()
    G = {}
    exec 'from reportlab.tools.docco.rl_doc_utils import *' in G, G
    doc = RLDocTemplate(destfn,pagesize = pagesize or defaultPageSize)
    for f in (
        'ch1_intro',
        'ch2_concepts',
        'ch3_shapes',
        'ch4_widgets',
        'ch5_charts',
        ):
        exec open_and_read(f+'.py',mode='t') in G, G
    del G

    story = getStory()
    if verbose: print 'Built story contains %d flowables...' % len(story)
    doc.build(story)
    if verbose: print 'Saved "%s"' % destfn
Ejemplo n.º 3
0
def run(pagesize=None, verbose=0, outDir=None):
    import os
    from reportlab.tools.docco.rl_doc_utils import setStory, getStory, RLDocTemplate, defaultPageSize
    from reportlab.tools.docco import rl_doc_utils
    from reportlab.lib.utils import open_and_read, _RL_DIR
    if not outDir: outDir = os.path.join(_RL_DIR, 'docs')
    destfn = os.path.join(outDir, 'userguide.pdf')
    doc = RLDocTemplate(destfn, pagesize=pagesize or defaultPageSize)

    #this builds the story
    setStory()
    G = {}
    exec 'from reportlab.tools.docco.rl_doc_utils import *' in G, G
    for f in (
            'ch1_intro',
            'ch2_graphics',
            'ch2a_fonts',
            'ch3_pdffeatures',
            'ch4_platypus_concepts',
            'ch5_paragraphs',
            'ch6_tables',
            'ch7_custom',
            'ch9_future',
            'app_demos',
    ):
        exec open_and_read(f + '.py', mode='t') in G, G
    del G

    story = getStory()
    if verbose: print 'Built story contains %d flowables...' % len(story)
    doc.build(story)
    if verbose: print 'Saved "%s"' % destfn
Ejemplo n.º 4
0
def run(pagesize=None, verbose=1, outDir=None):
    import os
    from reportlab.tools.docco.rl_doc_utils import setStory, getStory, RLDocTemplate, defaultPageSize
    from reportlab.tools.docco import rl_doc_utils
    from reportlab.lib.utils import open_and_read, _RL_DIR
    if not outDir: outDir = os.path.join(_RL_DIR,'docs')
    destfn = os.path.join(outDir,'graphguide.pdf')
    doc = RLDocTemplate(destfn,pagesize = pagesize or defaultPageSize)

    #this builds the story
    setStory()
    G = {}
    exec 'from reportlab.tools.docco.rl_doc_utils import *' in G, G
    doc = RLDocTemplate(destfn,pagesize = pagesize or defaultPageSize)
    for f in (
        'ch1_intro',
        'ch2_concepts',
        'ch3_shapes',
        'ch4_widgets',
        'ch5_charts',
        ):
        exec open_and_read(f+'.py',mode='t') in G, G
    del G

    story = getStory()
    if verbose: print 'Built story contains %d flowables...' % len(story)
    doc.build(story)
    if verbose: print 'Saved "%s"' % destfn
Ejemplo n.º 5
0
def run(pagesize=None, verbose=0, outDir=None):
    import os
    from reportlab.tools.docco.rl_doc_utils import setStory, getStory, RLDocTemplate, defaultPageSize
    from reportlab.tools.docco import rl_doc_utils
    from reportlab.lib.utils import open_and_read, _RL_DIR
    if not outDir:
        outDir = '../manuals/'  #os.path.join(_RL_DIR,'docs')
        if not os.path.isdir(outDir):
            os.mkdir(outDir)
    destfn = os.path.join(outDir, 'X4 - Installazione.pdf')
    doc = RLDocTemplate(destfn, pagesize=pagesize or defaultPageSize)
    doc.title = 'X4 Setup'
    doc.subject = 'Manuale di installazione di X4GA'
    doc.author = 'Astra S.r.l.'

    #this builds the story
    setStory()
    G = {}
    exec 'from reportlab.tools.docco.rl_doc_utils import *' in G, G
    for f in (
            'ch1_intro',
            'ch2_dbengine',
            'ch3_workstation',
            #'ch3_pdffeatures',
            #'ch4_platypus_concepts',
            #'ch5_paragraphs',
            #'ch6_tables',
            #'ch7_custom',
            #'ch9_future',
            #'app_demos',
    ):
        exec open_and_read(f + '.py', mode='t') in G, G
    del G

    story = getStory()
    if verbose: print 'Built story contains %d flowables...' % len(story)
    doc.build(story)
    if verbose: print 'Saved "%s"' % destfn
Ejemplo n.º 6
0
def run(pagesize=None, verbose=0, outDir=None):
    import os
    from reportlab.tools.docco.rl_doc_utils import setStory, getStory, RLDocTemplate, defaultPageSize
    from reportlab.tools.docco import rl_doc_utils
    from reportlab.lib.utils import open_and_read, _RL_DIR
    if not outDir: 
        outDir = '../manuals/'#os.path.join(_RL_DIR,'docs')
        if not os.path.isdir(outDir):
            os.mkdir(outDir)
    destfn = os.path.join(outDir,'X4 - Installazione.pdf')
    doc = RLDocTemplate(destfn,pagesize = pagesize or defaultPageSize)
    doc.title = 'X4 Setup'
    doc.subject = 'Manuale di installazione di X4GA'
    doc.author = 'Astra S.r.l.'

    #this builds the story
    setStory()
    G = {}
    exec 'from reportlab.tools.docco.rl_doc_utils import *' in G, G
    for f in (
        'ch1_intro',
        'ch2_dbengine',
        'ch3_workstation',
        #'ch3_pdffeatures',
        #'ch4_platypus_concepts',
        #'ch5_paragraphs',
        #'ch6_tables',
        #'ch7_custom',
        #'ch9_future',
        #'app_demos',
        ):
        exec open_and_read(f+'.py',mode='t') in G, G
    del G

    story = getStory()
    if verbose: print 'Built story contains %d flowables...' % len(story)
    doc.build(story)
    if verbose: print 'Saved "%s"' % destfn