From e7ec53304dd479dbe5c35bc481f8a101c94da41a Mon Sep 17 00:00:00 2001 From: ana Date: Sun, 16 Oct 2022 14:26:16 +0200 Subject: [PATCH] final details to trasnfer online --- .~lock.data_trees.csv# | 1 + __pycache__/app.cpython-310.pyc | Bin 3303 -> 3168 bytes __pycache__/settings.cpython-310.pyc | Bin 297 -> 332 bytes app.py | 12 ++++++------ settings.py | 3 +++ static/style.css | 4 ++++ templates/book.html | 15 ++++++++------- 7 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 .~lock.data_trees.csv# diff --git a/.~lock.data_trees.csv# b/.~lock.data_trees.csv# new file mode 100644 index 0000000..17afa3e --- /dev/null +++ b/.~lock.data_trees.csv# @@ -0,0 +1 @@ +,ana,anafoor,16.10.2022 14:07,file:///home/ana/.config/libreoffice/4; \ No newline at end of file diff --git a/__pycache__/app.cpython-310.pyc b/__pycache__/app.cpython-310.pyc index 538f083beb11289932256be1107917cc8ad59f44..bb1f7b957622f6a00a052348f58a5467c85ac036 100644 GIT binary patch delta 943 zcmZ8f&rcIU6yBL`x7+P@DQ)>x5mrQG#ekp&69Hq?7$F+55Dl6%YiFQ~?RGOeM2*{U zfW$=QKt?@yf|Eb4oHQQ%2Tb(3@!(B8csC|SXSN;)o9vhO=Dm5}eBaEsuCJX&J)PDh z{wcp^%5QR;MmNZA4!zv`)OlmM7wIUCj3tO#HXzEN)^%wOEF4HmxQExWyJ|U^uM8 zB2!poK4_SZ%W>F4i+xru5>5uhY@wSRW>*u(*`vgfv!No~u&LG7q!vDsh&d_dHi<{X zN%B6wnli`L>yo*+bmyu!GGW2 zpz%}dKm`z*fAlyJH47YK&r$=R$lj-hz;*ULHJ^!|mrC(H8Ywx!F6)JfZr)4=1xyPN kDxv|q2qO=p*QZX@>S(2kr?@Q1KgC|@Juw3&*+;$b590#ld;kCd delta 1151 zcmZ8gOK%)S5T5FJZ13#s>}0)uV&iq#But_>I3|iLOh5`Ek&$wUZG-}nwRX4db@nmz zbWn)KvJ^+$tjILtoScBOPy7lFaGFEJ4e<*iMMO|FMqqiQ`g*3m?ynwQ^ZVEzlo z`$wxV3Gb7iq1{AFIfAwX>;s-*cOLnjzK{=Rw{@=@gR+tR$x_3(6!7XJ^A~Gi0?&)4&x9(0BXvt+CRgLsX1fsP0&uegQqD?b&lY_Oi$`uy-qqF zg3o3l1Qj2xJ5BgP2U%?&z$#n1DtsMgEORm|^Rg%dQ90ndbsegwS$)~kwXD7myF)t4 zhD0E$2W+>IHFnNCtBX+7I`AA-vIcfAx}#<&k1_MYy;-OHb6+Ug?yYGhrJ6DG-sf<^ zJoQFeD;?dH&B10Xeri&OgB^~(VanG&6zJt8;e(IL-{MI*4MOrsB?#|Ikz!*4(fF8 z_?GNTg_l~)$%iK5@iYg<0`7tLx5FIZEMOk4_~ociP}@xT6GsWZ1xvRnQc3rcO`45m z`m!IW?x`4R0f{}dw1E(S4-Mu6hmb{xp51z>77X~`?=2zS`3`WNxeD-I`2;Hjs|24S zZQ#@R`}EtVYG~aq41G;WhJ1WnzzpTul+g1k{qE#6smn)M84DLFbFTfq2lB vH?TGWHa^HWN5Qtd!C6>|Uy76uj;7G@460P2w=cK`qY diff --git a/app.py b/app.py index d0cd8de..5a07797 100644 --- a/app.py +++ b/app.py @@ -36,9 +36,9 @@ app = Flask(__name__) """ Shows the index page of the application """ -@app.route('/') -def index(): - return render_template('index.html') +# @app.route('/') +# def index(): +# return render_template('index.html') @@ -47,7 +47,7 @@ def index(): the app.route is the webaddress you need to create the template in templates, and specify what variables you want to use in that template """ -@app.route('/step1') +@app.route('/') def step_1(): locations = [] for element in data: @@ -100,7 +100,7 @@ def generate (): else: final_textlist = in_between(tokenized_text, nouns) final_text = " ".join(final_textlist) - print(final_textlist) + """ Insert your own Python code in this function. @@ -120,7 +120,7 @@ def generate (): r = Response(pdf, mimetype='application/pdf') r.headers.extend({ - 'Content-Disposition': 'attachment; filename="Title of the.pdf"' + 'Content-Disposition': 'attachment; filename="Dreaming with {} in {}.pdf"'.format(dream_tree, place) }) return r diff --git a/settings.py b/settings.py index e9824e1..f368c1f 100644 --- a/settings.py +++ b/settings.py @@ -1,3 +1,6 @@ +from pickle import FALSE + + PAGEDJS_BINARY_PATH = 'pagedjs-cli' # os.path.join(os.path.dirname(__file__), 'node_modules/pagedjs-cli/bin/paged') # Path to the pagedjs-cli executable # Find it on linux with `whereis pagedjs-cli` diff --git a/static/style.css b/static/style.css index c7c7f27..cf83d33 100644 --- a/static/style.css +++ b/static/style.css @@ -3,6 +3,10 @@ h1 { break-after: always; } +pre { + white-space: pre-wrap; +} + /** @page { size: 210mm 297mm; diff --git a/templates/book.html b/templates/book.html index 16d88d8..9507a2a 100644 --- a/templates/book.html +++ b/templates/book.html @@ -10,23 +10,24 @@ {% endif %} - Generated book + Dreaming with {{ dream_tree }} in {{ place }}

Dreaming with {{ dream_tree }} in {{ place }}

{{description_tree}}

-

Trees absorb CO2 from the air and generate oxygen. \ - In forests and parks, the concentration of trees is high and CO2 emissions are often low,\ - because traffic is inexistant. The air quality for humans is therefore generally better.\ - The hypothesis exists that the high concentration of trees allows for more lucid dreaming.\ - It is said as well that a personal relationship to a tree can enhance lucid dreaming as well,\ +

Trees absorb CO2 from the air and generate oxygen. + In forests and parks, the concentration of trees is high and CO2 emissions are often low, + because traffic is inexistant. The air quality for humans is therefore generally better. + The hypothesis exists that the high concentration of trees allows for more lucid dreaming. + It is said as well that a personal relationship to a tree can enhance lucid dreaming as well, even if the tree is living in an urban area

ENJOY YOUR DREAMS!

-

{{final_text}}

+
{{final_text}}

Credits

This work was developed by Ipek Burçak and An Mertens during the Anaïs Berck residency at Meyboom, Brussels in Sept-Oct 2022.

The dreams are a selection of Pandemic Dreams Archive, a project by Erick Felinto, Fabiane M. Borges, Lívia Diniz, Rafael Frazão and Tiago F. Pimentel.

+

Thanks to Gijs de Heij for the technical teaching & help!

\ No newline at end of file