mirror of
https://github.com/oDinZu/callirhoe.git
synced 2025-02-22 00:04:52 -05:00
whitespace fix
This commit is contained in:
parent
282e4422b4
commit
6e256a74cd
@ -53,6 +53,8 @@ import lib.holiday as holiday
|
|||||||
import lib
|
import lib
|
||||||
|
|
||||||
from lib.plugin import *
|
from lib.plugin import *
|
||||||
|
|
||||||
|
|
||||||
# TODO: SEE IF IT CAN BE MOVED INTO lib.plugin ...
|
# TODO: SEE IF IT CAN BE MOVED INTO lib.plugin ...
|
||||||
def import_plugin(plugin_paths, cat, longcat, longcat2, listopt, preset):
|
def import_plugin(plugin_paths, cat, longcat, longcat2, listopt, preset):
|
||||||
"""import a plugin making it visible
|
"""import a plugin making it visible
|
||||||
@ -124,6 +126,7 @@ and do some magic with ImageMagick! ;)
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def add_list_option(parser, opt):
|
def add_list_option(parser, opt):
|
||||||
"""add a --list-I{plugins} option to parser
|
"""add a --list-I{plugins} option to parser
|
||||||
|
|
||||||
@ -132,6 +135,7 @@ def add_list_option(parser, opt):
|
|||||||
parser.add_option("--list-%s" % opt, action="store_true", dest="list_%s" % opt, default=False,
|
parser.add_option("--list-%s" % opt, action="store_true", dest="list_%s" % opt, default=False,
|
||||||
help="list available %s" % opt)
|
help="list available %s" % opt)
|
||||||
|
|
||||||
|
|
||||||
def get_parser():
|
def get_parser():
|
||||||
"""get the argument parser object
|
"""get the argument parser object
|
||||||
|
|
||||||
@ -185,6 +189,7 @@ def get_parser():
|
|||||||
help="modify a geometry variable")
|
help="modify a geometry variable")
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
||||||
def main_program():
|
def main_program():
|
||||||
parser = get_parser()
|
parser = get_parser()
|
||||||
|
|
||||||
@ -297,6 +302,7 @@ def main_program():
|
|||||||
(Style,Geometry,Language), hprovider, lib._version, loptions)
|
(Style,Geometry,Language), hprovider, lib._version, loptions)
|
||||||
renderer.render()
|
renderer.render()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
main_program()
|
main_program()
|
||||||
|
@ -290,15 +290,16 @@ class CalendarRenderer(object):
|
|||||||
self._draw_month(page.cr, grid.item_seq(k, self.options.grid_order == "column"),
|
self._draw_month(page.cr, grid.item_seq(k, self.options.grid_order == "column"),
|
||||||
month=m, year=y)
|
month=m, year=y)
|
||||||
num_placed += 1
|
num_placed += 1
|
||||||
if (y > yy[-1]): yy.append(y)
|
if y > yy[-1]:
|
||||||
|
yy.append(y)
|
||||||
if not self.options.month_with_year and not self.options.no_footer:
|
if not self.options.month_with_year and not self.options.no_footer:
|
||||||
year_str = str(yy[0]) if yy[0] == yy[-1] else "%s – %s" % (yy[0],yy[-1])
|
year_str = str(yy[0]) if yy[0] == yy[-1] else "%s – %s" % (yy[0],yy[-1])
|
||||||
draw_str(page.cr, text = year_str, rect = Rc, stroke_rgba = (0,0,0,0.5), scaling = -1,
|
draw_str(page.cr, text = year_str, rect = Rc, stroke_rgba = (0,0,0,0.5), scaling = -1,
|
||||||
align = (0,0), font = (extract_font_name(S.month.font),0,0))
|
align = (0,0), font = (extract_font_name(S.month.font),0,0))
|
||||||
if not self.options.no_footer:
|
if not self.options.no_footer:
|
||||||
draw_str(page.cr, text = "rendered by Callirhoe ver. %s" % self.version_string,
|
draw_str(page.cr, text = "rendered by Callirhoe ver. %s" % self.version_string,
|
||||||
rect = Rc, stroke_rgba = (0,0,0,0.5), scaling = -1, align = (1,0),
|
rect=Rc, stroke_rgba=(0, 0, 0, 0.5), scaling=-1, align=(1, 0),
|
||||||
font = (extract_font_name(S.month.font),1,0))
|
font=(extract_font_name(S.month.font), 1, 0))
|
||||||
num_pages_written += 1
|
num_pages_written += 1
|
||||||
page.end_page()
|
page.end_page()
|
||||||
if num_pages_written < num_pages:
|
if num_pages_written < num_pages:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user