mirror of
https://github.com/oDinZu/callirhoe.git
synced 2025-02-22 00:04:52 -05:00
swappable W,H in iso pagespec
git-svn-id: https://callirhoe.googlecode.com/svn/trunk@17 81c8bb96-aa45-f2e2-0eef-c4fa4a15c6df
This commit is contained in:
parent
a811749b17
commit
694a66081f
@ -20,6 +20,7 @@
|
||||
# TODO:
|
||||
|
||||
# allow to change background color (fill), other than white
|
||||
# page spec parse errors
|
||||
# mobile themes (e.g. 800x480)
|
||||
# photo support
|
||||
# implement DATA SOURCES
|
||||
@ -87,9 +88,9 @@ parser.add_option("--landscape", action="store_true", dest="landscape", default=
|
||||
parser.add_option("--dpi", type="float", default=72.0,
|
||||
help="set DPI (for raster output) [%default]")
|
||||
parser.add_option("--paper", default="a4",
|
||||
help="set paper type; PAPER can be an ISO paper type (a0..a9) or of the "
|
||||
help="set paper type; PAPER can be an ISO paper type (a0..a9 or a0w..a9w) or of the "
|
||||
"form W:H; positive values correspond to W or H mm, negative values correspond to "
|
||||
"-W or -H pixels [%default]")
|
||||
"-W or -H pixels; 'w' suffix swaps width & height [%default]")
|
||||
parser.add_option("--border", type="float", default=3,
|
||||
help="set border size (in mm) [%default]")
|
||||
|
||||
|
@ -21,7 +21,7 @@ class dom:
|
||||
mw_split = (0.7,0.2)
|
||||
|
||||
header_size = footer_size = (0.8,0.1)
|
||||
header_align = 0.1
|
||||
header_align = 0.15
|
||||
footer_align = 0.15
|
||||
hf_hsplit = (0.33,0.1)
|
||||
hf_vsplit = (0.5,0.4)
|
||||
@ -33,4 +33,4 @@ class month:
|
||||
sloppy_dy = 0
|
||||
padding = 1.5
|
||||
|
||||
#class page:
|
||||
#class page:
|
||||
|
@ -38,6 +38,9 @@ def page_spec(spec = None):
|
||||
if len(spec) == 2 and spec[0].lower() == 'a':
|
||||
k = int(spec[1])
|
||||
return (ISOPAGE[k+1], ISOPAGE[k])
|
||||
if len(spec) == 3 and spec[0].lower() == 'a' and spec[2].lower() == 'w':
|
||||
k = int(spec[1])
|
||||
return (ISOPAGE[k], ISOPAGE[k+1])
|
||||
if ':' in spec:
|
||||
s = spec.split(':')
|
||||
w, h = float(s[0]), float(s[1])
|
||||
|
Loading…
x
Reference in New Issue
Block a user