~ubuntu-branches/debian/sid/pyx/sid

« back to all changes in this revision

Viewing changes to contrib/dviconvert.py

  • Committer: Bazaar Package Importer
  • Author(s): Stuart Prescott
  • Date: 2011-05-20 00:13:52 UTC
  • mto: (9.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20110520001352-odcuqpdezuusbbw1
Tags: upstream-0.11.1
Import upstream version 0.11.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
 
# -*- coding: ISO-8859-1 -*-
3
 
#
4
 
#
5
 
# Copyright (C) 2005 Andr� Wobst <wobsta@users.sourceforge.net>
6
 
#
7
 
# epstopng is free software; you can redistribute it and/or modify
 
2
# -*- encoding: utf-8 -*-
 
3
#
 
4
#
 
5
# Copyright (C) 2005-2011 André Wobst <wobsta@users.sourceforge.net>
 
6
#
 
7
# dviconvert is free software; you can redistribute it and/or modify
8
8
# it under the terms of the GNU General Public License as published by
9
9
# the Free Software Foundation; either version 2 of the License, or
10
10
# (at your option) any later version.
20
20
 
21
21
from optparse import OptionParser
22
22
from pyx import *
23
 
from pyx import bbox, dvifile, version
 
23
from pyx import bbox, version
 
24
from pyx.dvi import dvifile
24
25
 
25
26
parser = OptionParser(usage="usage: %prog [-b] [-p paperformat] -o output-file dvi-file",
26
27
                      version="%prog " + version.version)
39
40
 
40
41
if options.paperformat:
41
42
    options.paperformat = getattr(document.paperformat, options.paperformat)
42
 
df = dvifile.dvifile(args[0], dvifile.readfontmap(["psfonts.map"]))
 
43
df = dvifile.DVIfile(args[0])
43
44
d = document.document()
44
45
while 1:
45
46
    dvipage = df.readpage()