def setPaperSize(self,s): """Set the paper size to a known size.""" sizes = PaperSize.getPaperSize(s) if sizes is None: print >>sys.stderr, "Unknown paper size: %s" % s self.shortUsage() self.paperWidth = sizes[0] self.paperHeight = sizes[1]
def setPaperSize(self, s): """Set the paper size to a known size.""" sizes = PaperSize.getPaperSize(s) if sizes is None: print >> sys.stderr, "Unknown paper size: %s" % s self.shortUsage() self.paperWidth = sizes[0] self.paperHeight = sizes[1]
def setPageSize(self,s): """Set the page size to a known size.""" sizes = PaperSize.getPaperSize(s) if sizes is None: print >>sys.stderr, "Unknown page size: %s" % s self.shortUsage() self.pageWidth = sizes[0] self.pageHeight = sizes[1] # Adjust font sizes with respect to A5, on a square root scale. self.adjustSizesForPageSize()
def setPageSize(self, s): """Set the page size to a known size.""" sizes = PaperSize.getPaperSize(s) if sizes is None: print >> sys.stderr, "Unknown page size: %s" % s self.shortUsage() self.pageWidth = sizes[0] self.pageHeight = sizes[1] # Adjust font sizes with respect to A5, on a square root scale. self.adjustSizesForPageSize()
def __init__(self, myname, opts): self.myname = myname self.opts = opts self.usageStrings[0] = self.usageStrings[0] % myname # first init the instance variables. self.pageNumber = 0 # Page number count self.currentJDaysLeft = -1 # Days left in year self.setStartDate(DateTime.DateTime(DateTime.now().year+1)) # Adjusted time, next year self.paperSize = 'a5' # Page sizes. Default to a5. wh = PaperSize.getPaperSize(self.paperSize) self.pageWidth = wh[0] self.pageHeight = wh[1] self.paperWidth = wh[0] self.paperHeight = wh[1] self.pageXOffset = 0.0 self.pageYOffset = 0.0 self.translatePage = 0 self.translateXOffset = 0.0 self.translateYOffset = 0.0 self.iMargin = 12.0 # Page layout options self.oMargin = 5.0 # self.bMargin = 5.0 # self.tMargin = 5.0 # self.coverTitleFontSize = 20.0 # self.titleFontSize = 7.0 # self.titleFontName = "Times-Bold" # self.titleFontNoBoldName = "Times" # self.subtitleFontSize = 4.0 # self.subtitleFontName = "Helvetica" # self.subtitleFontNoBoldName = "Helvetica" # self.personalinfoFontName = "Times-Bold" # self.personalinfoFixedFontName = "Courier-Bold" # self.titleY = -1 # Distance from bottom to title, calc from page size self.titleLineY = -1 # self.titleGray = 0.8 # Background for titles on some pages self.underlineThick = 0.2 # Thickness of title lines etc self.lineSpacing = 6.0 # Spacing for writing lines self.evenPage = 0 # even and odd pages self.out = None # Output file self.outName = 'diary.ps' # Output file name self.outNameSet = False # True if the output name set by command line opt. self.nAddressPages = 6 # Default self.nNotesPages = 6 # self.nPlannerYears = 2 # self.largePlanner = False # Default: no large planner self.coverImage = None # Pic for the cover page. self.coverPageImage = None # Pic for the whole cover page. self.appointments = False # Different "styles" for different people. self.appointmentTimes = True # Print appointment times or not self.appointmentWidth = 35 # Width of appointments (as percentage) self.colour = False # If true, print images in colour self.moon = False # If true, print moon phases self.northernHemisphereMoon = False # If true, print northern hemisphere moon phases self.layout = self.defaultLayout self.debugBoxes = False # If true, draw faint boxes around things for debugging self.debugVersion = False # If true, print version info on inside cover. self.debugWholePageBoxes = False# If true, draw faint boxes around all pages. self.pageRegistrationMarks=False# Print marks to show where to cut. self.events = {} # Events to draw on each page, from .calendar file. self.drawEventImages = False # If true, draw event images self.nWeeksBefore = 0 # Print this number of weeks before the current year. self.nWeeksAfter = 0 self.smiley = True self.imagePages = [] self.manPages = [] self.epsPages = [] self.title = None self.pdf = False self.pcal = False self.pcalPlanner = False self.perpetualCalendars = False self.calendarPages = True self.nExpensePages = 2 self.griddedLogbookPages = False self.griddedNotesPages = False self.griddedLogbookPages = False self.dayTitleBoxes = True self.dayTitleShading = "all" self.shading = True self.nLogbookPages = 100 self.lineColour = [0,0,0] self.personalInfoNoWork = False self.configOptions = ConfigParser() self.configOptions.read( (expanduser("~/.makediaryrc"), ".makediaryrc", "makediaryrc") ) self.createMonthCalendars() self.parseOptions() self.readDotCalendar()
def __init__(self, myname, opts): self.myname = myname self.opts = opts self.usageStrings[0] = self.usageStrings[0] % myname # first init the instance variables. self.pageNumber = 0 # Page number count self.currentJDaysLeft = -1 # Days left in year self.setStartDate(DateTime.DateTime(DateTime.now().year + 1)) # Adjusted time, next year self.paperSize = 'a5' # Page sizes. Default to a5. wh = PaperSize.getPaperSize(self.paperSize) self.pageWidth = wh[0] self.pageHeight = wh[1] self.paperWidth = wh[0] self.paperHeight = wh[1] self.pageXOffset = 0.0 self.pageYOffset = 0.0 self.translatePage = 0 self.translateXOffset = 0.0 self.translateYOffset = 0.0 self.iMargin = 12.0 # Page layout options self.oMargin = 5.0 # self.bMargin = 5.0 # self.tMargin = 5.0 # self.coverTitleFontSize = 20.0 # self.titleFontSize = 7.0 # self.titleFontName = "Times-Bold" # self.titleFontNoBoldName = "Times" # self.subtitleFontSize = 4.0 # self.subtitleFontName = "Helvetica" # self.subtitleFontNoBoldName = "Helvetica" # self.personalinfoFontName = "Times-Bold" # self.personalinfoFixedFontName = "Courier-Bold" # self.titleY = -1 # Distance from bottom to title, calc from page size self.titleLineY = -1 # self.titleGray = 0.8 # Background for titles on some pages self.underlineThick = 0.2 # Thickness of title lines etc self.lineSpacing = 6.0 # Spacing for writing lines self.evenPage = 0 # even and odd pages self.out = None # Output file self.outName = 'diary.ps' # Output file name self.outNameSet = False # True if the output name set by command line opt. self.nAddressPages = 6 # Default self.nNotesPages = 6 # self.nPlannerYears = 2 # self.largePlanner = False # Default: no large planner self.coverImage = None # Pic for the cover page. self.coverPageImage = None # Pic for the whole cover page. self.appointments = False # Different "styles" for different people. self.appointmentTimes = True # Print appointment times or not self.appointmentWidth = 35 # Width of appointments (as percentage) self.colour = False # If true, print images in colour self.moon = False # If true, print moon phases self.northernHemisphereMoon = False # If true, print northern hemisphere moon phases self.layout = self.defaultLayout self.debugBoxes = False # If true, draw faint boxes around things for debugging self.debugVersion = False # If true, print version info on inside cover. self.debugWholePageBoxes = False # If true, draw faint boxes around all pages. self.pageRegistrationMarks = False # Print marks to show where to cut. self.events = {} # Events to draw on each page, from .calendar file. self.drawEventImages = False # If true, draw event images self.nWeeksBefore = 0 # Print this number of weeks before the current year. self.nWeeksAfter = 0 self.smiley = True self.imagePages = [] self.manPages = [] self.epsPages = [] self.title = None self.pdf = False self.pcal = False self.pcalPlanner = False self.perpetualCalendars = False self.calendarPages = True self.nExpensePages = 2 self.griddedLogbookPages = False self.griddedNotesPages = False self.griddedLogbookPages = False self.dayTitleBoxes = True self.dayTitleShading = "all" self.shading = True self.nLogbookPages = 100 self.lineColour = [0, 0, 0] self.personalInfoNoWork = False self.configOptions = ConfigParser() self.configOptions.read( (expanduser("~/.makediaryrc"), ".makediaryrc", "makediaryrc")) self.createMonthCalendars() self.parseOptions() self.readDotCalendar()