Browse Source

print versions ready to be printed!

master
manetta 6 years ago
parent
commit
ed26bc4450
  1. 2
      .gitignore
  2. 6
      create_all.py
  3. 3640
      data-workers.en.manual-edit.txt
  4. BIN
      data-workers.en.publication.pdf
  5. 3920
      data-workers.fr.manual-edit.txt
  6. BIN
      data-workers.fr.publication.pdf
  7. 32
      functions.py
  8. BIN
      logos.pdf
  9. 6
      logos.svg

2
.gitignore

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

6
create_all.py

@ -64,7 +64,7 @@ else:
out += create_cover('data_workers', language, steps=1)
# Insert counters page
out += insert_counters_page()
out += sinus_jj()
# Tmp elements to save content that is outside the section tags
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
if zone.lower() == 'oracles':
out += insert_counters_page()
out += sinus_jj()
if zone.lower() == 'readers' or zone.lower() == 'lecteurs':
out += insert_counters_page()
out += sinus_jj()
# Add zone cover
cover = create_cover(zone.lower(), language, steps=1)

3640
data-workers.en.manual-edit.txt

File diff suppressed because it is too large

BIN
data-workers.en.publication.pdf

Binary file not shown.

3920
data-workers.fr.manual-edit.txt

File diff suppressed because it is too large

BIN
data-workers.fr.publication.pdf

Binary file not shown.

32
functions.py

@ -1,6 +1,7 @@
#! /etc/bin/python3
import random, re, subprocess
from math import sin
from hyphen import Hyphenator
import textwrap
@ -10,8 +11,8 @@ import nltk
from nltk.tokenize import RegexpTokenizer
tokenizer = RegexpTokenizer(r'[\s\W\w]\w+[\s\W\w\.]|^\w+|\w+$') # initialize tokenizer
# language = 'fr'
language = 'en'
language = 'fr'
# language = 'en'
def selfwritten_linebreaks(string, linelength):
count = 1
@ -396,3 +397,30 @@ def insert_pagenumbers(pages):
line = (' ' * page * 2) + str(page)
new += line + '\n'
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.

6
logos.svg

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

Before

Width:  |  Height:  |  Size: 519 KiB

After

Width:  |  Height:  |  Size: 519 KiB

Loading…
Cancel
Save