File: demo_context.py

package info (click to toggle)
relatorio 0.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,600 kB
  • sloc: python: 1,945; sh: 10; makefile: 9
file content (16 lines) | stat: -rw-r--r-- 432 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

from os.path import abspath, dirname, join

# test data
from common import inv

from relatorio import Report

# PDF
if __name__ == '__main__':
    print("generating output_basic.pdf... ", end='')
    report = Report(abspath(join(dirname(__file__), 'basic.tex')),
        'application/pdf')
    content = report(o=inv).render().getvalue()
    open(join(dirname(__file__), 'output_basic.pdf'), 'wb').write(content)
    print("done")