mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-22 12:27:59 +01:00
forgot staging + build pdf
This commit is contained in:
parent
70f6ebc966
commit
bf43882ca4
2 changed files with 4 additions and 4 deletions
|
@ -255,7 +255,7 @@ class PonysayTool():
|
||||||
printpony = sys.stdout.buf[:-1].split('\n')
|
printpony = sys.stdout.buf[:-1].split('\n')
|
||||||
ponyonlyheight = len(printpony)
|
ponyonlyheight = len(printpony)
|
||||||
sys.stdout = stdout
|
sys.stdout = stdout
|
||||||
dimensions.append((ponywidth, ponyheight, ponyonlyheight, ponyfile))
|
dimensions.append((ponywidth, ponyheight, ponyonlyheight, ponyfile[:-5]))
|
||||||
(widths, heights, onlyheights) = ([], [], [])
|
(widths, heights, onlyheights) = ([], [], [])
|
||||||
for item in dimensions:
|
for item in dimensions:
|
||||||
widths .append(item[0], item[3])
|
widths .append(item[0], item[3])
|
||||||
|
@ -266,7 +266,7 @@ class PonysayTool():
|
||||||
for pair in ((widths, 'widths'), (heights, 'heights'), (onlyheights, 'onlyheights')):
|
for pair in ((widths, 'widths'), (heights, 'heights'), (onlyheights, 'onlyheights')):
|
||||||
(items, dimfile) = pair
|
(items, dimfile) = pair
|
||||||
dimfile = (ponydir + '/' + dimfile).replace('//'. '/')
|
dimfile = (ponydir + '/' + dimfile).replace('//'. '/')
|
||||||
ponies = '/'.join([item[1] for item in items])
|
ponies = [item[1] for item in items]
|
||||||
dims = []
|
dims = []
|
||||||
last = -1
|
last = -1
|
||||||
index = 0
|
index = 0
|
||||||
|
@ -279,8 +279,8 @@ class PonysayTool():
|
||||||
index += 1
|
index += 1
|
||||||
if last >= 0:
|
if last >= 0:
|
||||||
dims.append((last, index))
|
dims.append((last, index))
|
||||||
dims = [dim[0] + '/' + dim[1] + '/' for dim in dims]
|
dims = ''.join([('%i/%i/' % (dim[0], len('/'.join(ponies[:dim[1]])))) for dim in dims])
|
||||||
data = '/' + ''.join(dims) + '/' + ponies + '/'
|
data = '/' + str(len(dims)) + '/' + dims + '/'.join(ponies) + '/'
|
||||||
with open(dimfile, 'wb') as file:
|
with open(dimfile, 'wb') as file:
|
||||||
file.write(data.encode('utf8'))
|
file.write(data.encode('utf8'))
|
||||||
file.flush()
|
file.flush()
|
||||||
|
|
BIN
ponysay.pdf
BIN
ponysay.pdf
Binary file not shown.
Loading…
Reference in a new issue