diff --git a/README.md b/README.md index 57765c6..f5246cf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Introduction -This zine helps in navigating the zine_maker code, a small software tool derived from pyPDF library. The code is written in Python, and provides a few scripts for creating covers, colophons, content, and also signatures for preparing a PDF for the printer. The scripts run with python version 3.x.x and we can feed to the scripts inputs and outputs. As an input, we give the path to a text file, which shall create the text and images content of the zine, and as an output we give a the path/filename of our choice. We can also run the scripts with no input nor output, in which case, they take as default parameters the readme text from the text/ folder and produce an output to either of the folders covers, colophons, body, or zines, depending on which script we are running each time. +This tutorial helps in navigating the zine_maker code, a small software tool derived from pyPDF library. The code is written in Python, and provides a few scripts for creating covers, colophons, content, and also signatures for preparing a PDF for the printer. The scripts run with python version 3.x.x and we can feed to the scripts inputs and outputs. As an input, we give the path to a text file, which shall create the text and images content of the zine, and as an output we give a the path/filename of our choice. We can also run the scripts with no input nor output, in which case, they take as default parameters the readme text from the text/ folder and produce an output to either of the folders covers, colophons, body, or zines, depending on which script we are running each time. # Get the code diff --git a/body/readme.pdf b/body/readme.pdf index 8b72e5c..5996c6b 100644 Binary files a/body/readme.pdf and b/body/readme.pdf differ diff --git a/colophons/colophon_readme.pdf b/colophons/colophon_readme.pdf index cc44dfc..8776851 100644 Binary files a/colophons/colophon_readme.pdf and b/colophons/colophon_readme.pdf differ diff --git a/doc_pdf.py b/doc_pdf.py index 2a101bf..7585730 100644 --- a/doc_pdf.py +++ b/doc_pdf.py @@ -13,7 +13,7 @@ def make(inputfile, output): max_height = 190 cell_width = 110 - cell_header_height = 26 + cell_header_height = 22 cell_height = 8 # set font for all text diff --git a/shuffle_pdf.py b/shuffle_pdf.py index da5c864..21d57e1 100644 --- a/shuffle_pdf.py +++ b/shuffle_pdf.py @@ -28,6 +28,7 @@ def shuffle_zine(finput, foutput): else: print("PDF saved as {}".format(foutput)) os.system("mv ./*_chapter.pdf ./.tmp") + os.system("rm ./.tmp/*_chapter.pdf") if __name__ == '__main__': diff --git a/zine_maker.py b/zine_maker.py index d300f56..6e19871 100644 --- a/zine_maker.py +++ b/zine_maker.py @@ -121,7 +121,9 @@ class Zine(FPDF): # check if we have a title elif line.startswith("
"): line = re.sub('($)', '', line) self.set_font(text_font, '', size=13) - self.set_text_color(0, 80, 115) + self.set_text_color(150, 0, 205) self.multi_cell(cell_width, cell_height, line, 0, align='C') elif line.startswith(""): @@ -275,7 +281,7 @@ class Zine(FPDF): # close the file title.close() - self.set_text_color(0, 0, 0, 0) + self.set_text_color(0, 0, 0) def colophon(self, text, colophon_font): f = open(text, 'r') @@ -296,7 +302,7 @@ class Zine(FPDF): text_font = 'Helvetica' # Go to 1.5 cm from bottom self.set_y(-12) - # self.set_text_color(0, 0, 0) + self.set_text_color(0, 0, 0) self.set_font(text_font, '', size=7) # Print current page number # self.cell(0, 7, '%s' % self.page_no(), 0, 0, 'C')