mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-22 15:26:37 +00:00
mirc2png.py:MiRCART.__init__(): move defaults from main().
This commit is contained in:
parent
4f56b9c783
commit
3b29343e15
@ -165,7 +165,7 @@ class MiRCART:
|
|||||||
self.inCurColourSpec = ""; self.state = self.State.STATE_CHAR;
|
self.inCurColourSpec = ""; self.state = self.State.STATE_CHAR;
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ Initialisation method
|
# {{{ Initialisation method
|
||||||
def __init__(self, inFilePath, imgFilePath, fontFilePath, fontSize):
|
def __init__(self, inFilePath, imgFilePath, fontFilePath="DejaVuSansMono.ttf", fontSize=11):
|
||||||
self.inFilePath = inFilePath; self.inFile = open(inFilePath, "r");
|
self.inFilePath = inFilePath; self.inFile = open(inFilePath, "r");
|
||||||
self.inLines = self.inFile.readlines()
|
self.inLines = self.inFile.readlines()
|
||||||
self.inColsMax = self.getMaxCols(self.inLines)
|
self.inColsMax = self.getMaxCols(self.inLines)
|
||||||
@ -192,8 +192,8 @@ class MiRCART:
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Entry point
|
# Entry point
|
||||||
def main(argv0, inFilePath, imgFilePath, fontFilePath="DejaVuSansMono.ttf", fontSize=11):
|
def main(*argv):
|
||||||
_MiRCART = MiRCART(inFilePath, imgFilePath, fontFilePath, fontSize)
|
_MiRCART = MiRCART(*argv[1:])
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if ((len(sys.argv) - 1) < 2)\
|
if ((len(sys.argv) - 1) < 2)\
|
||||||
or ((len(sys.argv) - 1) > 4):
|
or ((len(sys.argv) - 1) > 4):
|
||||||
|
Loading…
Reference in New Issue
Block a user