zine_maker/colophon.py
Mara Karagianni 5b507017a6 make a module
2021-12-08 14:56:42 +02:00

40 lines
899 B
Python

import sys
from zine_maker import Zine
def make_colophon():
# Variables
text_font_size = 12
# set font for all text
zine = Zine(orientation="P", unit="mm", format="A5")
# cover font
zine.add_font(
'CasaleNBP', '', r"/home/mara/.fonts/CasaletwoNbp-Bp4V.ttf", uni=True)
cover_font = 'CasaleNBP'
# text font
zine.add_font(
'Kpalter', '',
r"/home/mara/.fonts/KpProgrammerAlternatesNbp-Zg1q.ttf", uni=True)
text_font = 'Kpalter'
zine.set_font(text_font, '', size=text_font_size)
zine.colophon(inputfile)
zine.output(output)
if __name__ == '__main__':
# input text and output pdf
if len(sys.argv) > 1:
if len(sys.argv) == 3:
output = sys.argv[2]
inputfile = sys.argv[1]
else:
inputfile = "./text/colophon.txt"
output = './covers/colophon.pdf'
make_colophon()