print versions ready to be printed!
This commit is contained in:
parent
61766e9cd0
commit
ed26bc4450
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
*/__pycache__
|
*__pycache__*
|
||||||
|
@ -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)
|
||||||
|
3640
data-workers.en.manual-edit.txt
Normal file
3640
data-workers.en.manual-edit.txt
Normal file
File diff suppressed because it is too large
Load Diff
BIN
data-workers.en.publication.pdf
Normal file
BIN
data-workers.en.publication.pdf
Normal file
Binary file not shown.
3920
data-workers.fr.manual-edit.txt
Normal file
3920
data-workers.fr.manual-edit.txt
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
32
functions.py
32
functions.py
@ -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
|
@ -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 |
Loading…
Reference in New Issue
Block a user