print versions ready to be printed!

This commit is contained in:
manetta 2019-03-25 23:45:25 +01:00
parent 61766e9cd0
commit ed26bc4450
9 changed files with 7598 additions and 10 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
*/__pycache__ *__pycache__*

View File

@ -64,7 +64,7 @@ else:
out += create_cover('data_workers', language, steps=1) out += create_cover('data_workers', language, steps=1)
# Insert counters page # Insert counters page
out += insert_counters_page() out += sinus_jj()
# Tmp elements to save content that is outside the section tags # Tmp elements to save content that is outside the section tags
about = '' about = ''
@ -128,9 +128,9 @@ for element in soup.body.section.contents:
# Add extra pages, to make sure the new zones always start on the right page # Add extra pages, to make sure the new zones always start on the right page
if zone.lower() == 'oracles': if zone.lower() == 'oracles':
out += insert_counters_page() out += sinus_jj()
if zone.lower() == 'readers' or zone.lower() == 'lecteurs': if zone.lower() == 'readers' or zone.lower() == 'lecteurs':
out += insert_counters_page() out += sinus_jj()
# Add zone cover # Add zone cover
cover = create_cover(zone.lower(), language, steps=1) cover = create_cover(zone.lower(), language, steps=1)

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,6 +1,7 @@
#! /etc/bin/python3 #! /etc/bin/python3
import random, re, subprocess import random, re, subprocess
from math import sin
from hyphen import Hyphenator from hyphen import Hyphenator
import textwrap import textwrap
@ -10,8 +11,8 @@ import nltk
from nltk.tokenize import RegexpTokenizer from nltk.tokenize import RegexpTokenizer
tokenizer = RegexpTokenizer(r'[\s\W\w]\w+[\s\W\w\.]|^\w+|\w+$') # initialize tokenizer tokenizer = RegexpTokenizer(r'[\s\W\w]\w+[\s\W\w\.]|^\w+|\w+$') # initialize tokenizer
# language = 'fr' language = 'fr'
language = 'en' # language = 'en'
def selfwritten_linebreaks(string, linelength): def selfwritten_linebreaks(string, linelength):
count = 1 count = 1
@ -396,3 +397,30 @@ def insert_pagenumbers(pages):
line = (' ' * page * 2) + str(page) line = (' ' * page * 2) + str(page)
new += line + '\n' new += line + '\n'
return new return new
def sinus_jj():
line_width = 110
line_height = 70
out = ''
count = 0
for x in range(line_width * line_height):
if count == 10:
count = 0
s = int((sin(5 * x) + 1) * 10)
print(s)
out += str(count) + (' ' * s)
count += 1
page = ''
linenumber = 0
for i, c in enumerate(out):
if i % line_width == 0:
range_start = linenumber * line_width
range_end = range_start + line_width
page += out[range_start:range_end] + '\n'
linenumber += 1
lines = page.split('\n')
page = '\n'.join(lines[:69]) + '\n'
return page

BIN
logos.pdf

Binary file not shown.

View File

@ -40,8 +40,8 @@
inkscape:pageopacity="0.0" inkscape:pageopacity="0.0"
inkscape:pageshadow="2" inkscape:pageshadow="2"
inkscape:zoom="1.4" inkscape:zoom="1.4"
inkscape:cx="586.70364" inkscape:cx="431.3465"
inkscape:cy="405.46949" inkscape:cy="88.326633"
inkscape:document-units="mm" inkscape:document-units="mm"
inkscape:current-layer="g943" inkscape:current-layer="g943"
showgrid="false" showgrid="false"
@ -71,7 +71,7 @@
transform="matrix(1.5535331,0,0,1.5535331,-107.80599,-154.48735)"> transform="matrix(1.5535331,0,0,1.5535331,-107.80599,-154.48735)">
<g <g
id="g1001" id="g1001"
transform="matrix(0.99037148,0,0,0.99037148,1.5642691,2.6914492)"> transform="matrix(0.99037148,0,0,0.99037148,1.5642691,7.8007705)">
<image <image
width="9.7445831" width="9.7445831"
height="4.9210143" height="4.9210143"

Before

Width:  |  Height:  |  Size: 519 KiB

After

Width:  |  Height:  |  Size: 519 KiB