-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added tile command to cli #35
feat: added tile command to cli #35
Conversation
pdfly/tiles.py
Outdated
|
||
""" | ||
|
||
# Stanislav Ulrych <[email protected]>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't add such comments
pdfly/tiles.py
Outdated
ysize = PaperSize.A4.height | ||
|
||
writer = PdfWriter() | ||
destPage = writer.add_blank_page(width=xsize, height=ysize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow PEP-8:
destPage = writer.add_blank_page(width=xsize, height=ysize) | |
dest_page = writer.add_blank_page(width=xsize, height=ysize) |
pdfly/tiles.py
Outdated
sys.exit(1) | ||
finally: | ||
output_fh.close() | ||
# In 3.0, input files must stay open until output is written. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that true for Python 2.x as well ... and any programming language for that matter?
# In 3.0, input files must stay open until output is written. |
pdfly/tiles.py
Outdated
"tx": (i % xcount)*(xsize/xcount), | ||
"ty": -(i // xcount)*(ysize/ycount) | ||
} | ||
print(t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print(t) |
Can you share an example input / output here in the comments? |
Added
tile
command, which can be used for tiling multiple stickers for printing in sticker papers.