joomla export avec epub
This commit is contained in:
parent
f1493a380d
commit
a81be06d9b
10888
joomla-export/export/cijl_content.csv
Normal file
10888
joomla-export/export/cijl_content.csv
Normal file
File diff suppressed because it is too large
Load Diff
@ -44,9 +44,8 @@ def get_articles():
|
|||||||
|
|
||||||
query = '''
|
query = '''
|
||||||
SELECT id, title, introtext,created FROM cijliness.cijl_content
|
SELECT id, title, introtext,created FROM cijliness.cijl_content
|
||||||
WHERE state = 1 AND featured = 1
|
WHERE state = 1
|
||||||
ORDER BY created ASC
|
ORDER BY id ASC;
|
||||||
LIMIT 5000;
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
cursor.execute(query)
|
cursor.execute(query)
|
||||||
@ -73,14 +72,18 @@ def get_articles():
|
|||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index():
|
def index():
|
||||||
"""Render base.html with articles."""
|
"""Render base.html with articles."""
|
||||||
print(os.getcwd())
|
|
||||||
articles = get_articles()
|
articles = get_articles()
|
||||||
|
|
||||||
if articles is not None:
|
if articles is not None:
|
||||||
context = {'articles': articles}
|
context = {'articles': articles}
|
||||||
|
output = render_template('base.html', **context)
|
||||||
|
with open("rendered.html", "w") as f:
|
||||||
|
f.write(output)
|
||||||
|
|
||||||
return render_template('base.html', **context)
|
return render_template('base.html', **context)
|
||||||
|
|
||||||
return "Failed to fetch articles."
|
return "Failed to fetch articles."
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run()
|
app.run()
|
||||||
|
index()
|
BIN
joomla-export/liness-ebook-2024-06-12.epub
Normal file
BIN
joomla-export/liness-ebook-2024-06-12.epub
Normal file
Binary file not shown.
23689
joomla-export/rendered.html
Normal file
23689
joomla-export/rendered.html
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,16 +8,26 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1>Welcome to My EBook</h1>
|
<h1>
|
||||||
|
<img class="logo" src="http://cdn.onlinewebfonts.com/svg/img_433734.png" alt="pingouin">
|
||||||
|
Liness - Linux en Essonne</h1>
|
||||||
|
<p>
|
||||||
|
Cet ebook présente l'intégralité des articles de <a href="Liness.org">Liness.org</a>
|
||||||
|
</p>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{
|
body{
|
||||||
width: 40rem;
|
margin: 0 auto;
|
||||||
|
width: 80ch;
|
||||||
padding: 4rem;
|
padding: 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article{
|
.article{
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logo{
|
||||||
|
width : 10rem;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
@ -30,11 +40,32 @@
|
|||||||
<div dangerouslySetInnerHTML={{ article.introtext|safe }}>
|
<div dangerouslySetInnerHTML={{ article.introtext|safe }}>
|
||||||
{{ article.introtext }}
|
{{ article.introtext }}
|
||||||
</div>
|
</div>
|
||||||
|
<hr>
|
||||||
</section>
|
</section>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>No articles found.</p>
|
<p>No articles found.</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</main>
|
</main>
|
||||||
|
<footer>
|
||||||
|
<h2>
|
||||||
|
Mentions légales
|
||||||
|
</h2>
|
||||||
|
Raison sociale : LINESS
|
||||||
|
|
||||||
|
Adresse :
|
||||||
|
|
||||||
|
Association LinEss - Linux Essonne -
|
||||||
|
|
||||||
|
Chez Pasal Kouai
|
||||||
|
|
||||||
|
2 rue Condorcet
|
||||||
|
|
||||||
|
91260 Juvisy sur Orge
|
||||||
|
|
||||||
|
Directeur de la publication : Didier Clermonté mail : adm(at)liness.org
|
||||||
|
|
||||||
|
|
||||||
|
</footer>
|
||||||
<!-- Add any JavaScript scripts or external resources here -->
|
<!-- Add any JavaScript scripts or external resources here -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user