Unpxielterm: add support for lengthless speech bubbles
This commit is contained in:
parent
658c185760
commit
51645b1742
1 changed files with 2 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ def unpixelterm(text):
|
||||||
img.putpixel((x, y+1), (0, 0, 255, 127))
|
img.putpixel((x, y+1), (0, 0, 255, 127))
|
||||||
x += 1
|
x += 1
|
||||||
else: #(should be a) balloon
|
else: #(should be a) balloon
|
||||||
bw = int(re.match(r'\$balloon([0-9]*)\$', specialstr).group(1))
|
bw = int(re.match(r'\$balloon([0-9]*)\$', specialstr).group(1) or '1')
|
||||||
for i in range(x, x+bw):
|
for i in range(x, x+bw):
|
||||||
img.putpixel((i, y), (0, 255, 0, 127))
|
img.putpixel((i, y), (0, 255, 0, 127))
|
||||||
img.putpixel((i, y+1), (0, 255, 0, 127))
|
img.putpixel((i, y+1), (0, 255, 0, 127))
|
||||||
|
|
@ -98,6 +98,7 @@ if __name__ == '__main__':
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
for f in args.input:
|
for f in args.input:
|
||||||
|
print(f.name)
|
||||||
img, metadata = unpixelterm(f.read())
|
img, metadata = unpixelterm(f.read())
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
print('Metadata:')
|
print('Metadata:')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue