mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-22 07:16:38 +00:00
IrcMiRCARTBot.py: include black-on-black border around map.
IrcMiRCARTBot.py: normalise imported map.
This commit is contained in:
parent
9eee59b501
commit
d79ea00164
@ -142,6 +142,17 @@ class IrcMiRCARTBot(IrcClient.IrcClient):
|
||||
return
|
||||
|
||||
canvasStore = MiRCARTCanvasImportStore(inFile=asciiTmpFilePath)
|
||||
numRowCols = 0
|
||||
for numRow in range(len(canvasStore.outMap)):
|
||||
numRowCols = max(numRowCols, len(canvasStore.outMap[numRow]))
|
||||
for numRow in range(len(canvasStore.outMap)):
|
||||
if len(canvasStore.outMap[numRow]) != numRowCols:
|
||||
for numColOff in range(numRowCols - len(canvasStore.outMap[numRow])):
|
||||
canvasStore.outMap[numRow].append([[1, 1], 0, " "])
|
||||
canvasStore.outMap[numRow].insert(0, [[1, 1], 0, " "])
|
||||
canvasStore.outMap[numRow].append([[1, 1], 0, " "])
|
||||
canvasStore.outMap.insert(0, [[[1, 1], 0, " "]] * len(canvasStore.outMap[0]))
|
||||
canvasStore.outMap.append([[[1, 1], 0, " "]] * len(canvasStore.outMap[0]))
|
||||
MiRCARTToPngFile(canvasStore.outMap, "DejaVuSansMono.ttf", 11).export(imgTmpFilePath)
|
||||
imgurResponse = self._uploadToImgur(imgTmpFilePath, "MiRCART image", "MiRCART image", "c9a6efb3d7932fd")
|
||||
if imgurResponse[0] == 200:
|
||||
|
Loading…
Reference in New Issue
Block a user