final details to trasnfer online

master
ana 2 years ago
parent 97081bf0b9
commit e7ec53304d

@ -0,0 +1 @@
,ana,anafoor,16.10.2022 14:07,file:///home/ana/.config/libreoffice/4;

Binary file not shown.

@ -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

@ -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`

@ -3,6 +3,10 @@ h1 {
break-after: always;
}
pre {
white-space: pre-wrap;
}
/**
@page {
size: 210mm 297mm;

@ -10,23 +10,24 @@
<script src="{{ url_for('static', filename='js/paged.polyfill.js') }}"></script>
<!-- <script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script> -->
{% endif %}
<title>Generated book</title>
<title>Dreaming with {{ dream_tree }} in {{ place }}</title>
</head>
<body>
<h1>Dreaming with {{ dream_tree }} in {{ place }}</h1>
<p>{{description_tree}}</p>
<p>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,\
<p>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</p>
<h2>ENJOY YOUR DREAMS!</h2>
<p>{{final_text}}</p>
<pre>{{final_text}}</pre>
<h2>Credits</h2>
<p>This work was developed by Ipek Burçak and An Mertens during the Anaïs Berck residency at Meyboom, Brussels in Sept-Oct 2022.</p>
<p>The dreams are a selection of <a href = "https://archivedream.wordpress.com/">Pandemic Dreams Archive</a>, a project by Erick Felinto, Fabiane M. Borges, Lívia Diniz, Rafael Frazão and Tiago F. Pimentel.</p>
<p>Thanks to Gijs de Heij for the technical teaching & help!</p>
</body>
</html>
Loading…
Cancel
Save