crieur 1.0.2__tar.gz → 1.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of crieur might be problematic. Click here for more details.
- {crieur-1.0.2 → crieur-1.0.4}/PKG-INFO +5 -3
- {crieur-1.0.2 → crieur-1.0.4}/README.md +3 -2
- {crieur-1.0.2 → crieur-1.0.4}/crieur/__init__.py +1 -1
- {crieur-1.0.2 → crieur-1.0.4}/crieur/cli.py +3 -1
- {crieur-1.0.2 → crieur-1.0.4}/crieur/generator.py +3 -2
- {crieur-1.0.2 → crieur-1.0.4}/crieur/templates/article.html +2 -2
- {crieur-1.0.2 → crieur-1.0.4}/crieur/templates/base.html +2 -2
- {crieur-1.0.2 → crieur-1.0.4}/crieur/templates/homepage.html +4 -4
- {crieur-1.0.2 → crieur-1.0.4}/crieur/templates/keyword.html +1 -1
- {crieur-1.0.2 → crieur-1.0.4}/crieur/templates/numero.html +1 -1
- {crieur-1.0.2 → crieur-1.0.4}/pyproject.toml +1 -0
- {crieur-1.0.2 → crieur-1.0.4}/.gitignore +0 -0
- {crieur-1.0.2 → crieur-1.0.4}/LICENSE +0 -0
- {crieur-1.0.2 → crieur-1.0.4}/crieur/__main__.py +0 -0
- {crieur-1.0.2 → crieur-1.0.4}/crieur/models.py +0 -0
- {crieur-1.0.2 → crieur-1.0.4}/crieur/statics/pico.css +0 -0
- {crieur-1.0.2 → crieur-1.0.4}/crieur/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crieur
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: A Static Revue Generator.
|
|
5
5
|
Project-URL: Homepage, https://gitlab.huma-num.fr/ecrinum/crieur
|
|
6
6
|
Project-URL: Issues, https://gitlab.huma-num.fr/ecrinum/crieur/-/issues
|
|
@@ -689,6 +689,7 @@ Requires-Dist: jinja2
|
|
|
689
689
|
Requires-Dist: minicli
|
|
690
690
|
Requires-Dist: mistune
|
|
691
691
|
Requires-Dist: python-slugify
|
|
692
|
+
Requires-Dist: pytz>=2025.2
|
|
692
693
|
Requires-Dist: pyyaml>=6.0.2
|
|
693
694
|
Requires-Dist: tzdata>=2025.2
|
|
694
695
|
Requires-Dist: unidecode
|
|
@@ -729,7 +730,7 @@ options:
|
|
|
729
730
|
-h, --help Show this help message and exit
|
|
730
731
|
|
|
731
732
|
Available commands:
|
|
732
|
-
|
|
733
|
+
|
|
733
734
|
version Return the current version.
|
|
734
735
|
generate Generate a new revue website.
|
|
735
736
|
stylo Initialize a new revue to current directory from Stylo.
|
|
@@ -749,11 +750,12 @@ help = output.decode().split("\n", 1)[1] # Remove Pandoc version.
|
|
|
749
750
|
cog.out(f"```\n{help}\n```")
|
|
750
751
|
]]] -->
|
|
751
752
|
```
|
|
752
|
-
[--source-path SOURCE_PATH]
|
|
753
|
+
[--target-path TARGET_PATH] [--source-path SOURCE_PATH]
|
|
753
754
|
|
|
754
755
|
options:
|
|
755
756
|
-h, --help show this help message and exit
|
|
756
757
|
--title, -t TITLE Title of the website (default: Crieur).
|
|
758
|
+
--base-url BASE_URL Base URL of the website, ending with / (default: /).
|
|
757
759
|
--target-path TARGET_PATH
|
|
758
760
|
Path where site is built (default: /public/).
|
|
759
761
|
--source-path SOURCE_PATH
|
|
@@ -26,7 +26,7 @@ options:
|
|
|
26
26
|
-h, --help Show this help message and exit
|
|
27
27
|
|
|
28
28
|
Available commands:
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
version Return the current version.
|
|
31
31
|
generate Generate a new revue website.
|
|
32
32
|
stylo Initialize a new revue to current directory from Stylo.
|
|
@@ -46,11 +46,12 @@ help = output.decode().split("\n", 1)[1] # Remove Pandoc version.
|
|
|
46
46
|
cog.out(f"```\n{help}\n```")
|
|
47
47
|
]]] -->
|
|
48
48
|
```
|
|
49
|
-
[--source-path SOURCE_PATH]
|
|
49
|
+
[--target-path TARGET_PATH] [--source-path SOURCE_PATH]
|
|
50
50
|
|
|
51
51
|
options:
|
|
52
52
|
-h, --help show this help message and exit
|
|
53
53
|
--title, -t TITLE Title of the website (default: Crieur).
|
|
54
|
+
--base-url BASE_URL Base URL of the website, ending with / (default: /).
|
|
54
55
|
--target-path TARGET_PATH
|
|
55
56
|
Path where site is built (default: /public/).
|
|
56
57
|
--source-path SOURCE_PATH
|
|
@@ -23,12 +23,14 @@ def version():
|
|
|
23
23
|
@cli
|
|
24
24
|
def generate(
|
|
25
25
|
title="Crieur",
|
|
26
|
+
base_url="/",
|
|
26
27
|
target_path: Path = Path() / "public",
|
|
27
28
|
source_path: Path = Path() / "sources",
|
|
28
29
|
):
|
|
29
30
|
"""Generate a new revue website.
|
|
30
31
|
|
|
31
32
|
:title: Title of the website (default: Crieur).
|
|
33
|
+
:base_url: Base URL of the website, ending with / (default: /).
|
|
32
34
|
:target_path: Path where site is built (default: /public/).
|
|
33
35
|
:source_path: Path where stylo source were downloaded (default: /sources/).
|
|
34
36
|
"""
|
|
@@ -39,7 +41,7 @@ def generate(
|
|
|
39
41
|
numeros.append(numero)
|
|
40
42
|
|
|
41
43
|
keywords = collect_keywords(numeros)
|
|
42
|
-
generate_html(title, numeros, keywords, target_path)
|
|
44
|
+
generate_html(title, base_url, numeros, keywords, target_path)
|
|
43
45
|
|
|
44
46
|
static_path_local = Path(__file__).parent / "statics"
|
|
45
47
|
shutil.copytree(static_path_local, target_path / "statics", dirs_exist_ok=True)
|
|
@@ -29,11 +29,12 @@ def markdown(value):
|
|
|
29
29
|
environment.filters["markdown"] = markdown
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
def generate_html(title, numeros, keywords, target_path):
|
|
32
|
+
def generate_html(title, base_url, numeros, keywords, target_path):
|
|
33
33
|
common_params = {
|
|
34
|
+
"title": title,
|
|
35
|
+
"base_url": base_url,
|
|
34
36
|
"numeros": numeros,
|
|
35
37
|
"keywords": keywords,
|
|
36
|
-
"title": title,
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
template_homepage = environment.get_template("homepage.html")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% extends "base.html" %}
|
|
2
2
|
|
|
3
3
|
{% block content %}
|
|
4
|
-
<h2><a href="
|
|
4
|
+
<h2><a href="{{ base_url }}numeros/{{ numero.name }}">{{ numero.name }}</a></h2>
|
|
5
5
|
|
|
6
6
|
<article>
|
|
7
7
|
<header>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
{% endif %}
|
|
21
21
|
|
|
22
22
|
{% for keyword in article.keywords %}
|
|
23
|
-
<a href="
|
|
23
|
+
<a href="{{ base_url }}mot-clef/{{ keyword.slug }}/">#{{ keyword.name }}</a>({{ keyword.articles|length }}){%- if not loop.last -%}, {% endif %}
|
|
24
24
|
{% endfor %}
|
|
25
25
|
</header>
|
|
26
26
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<!-- Lightest blank gif, avoids an extra query to the server. -->
|
|
16
16
|
<link rel="icon" href="data:;base64,iVBORw0KGgo=" />
|
|
17
17
|
<link rel="stylesheet"
|
|
18
|
-
href="
|
|
18
|
+
href="{{ base_url }}statics/pico.css" />
|
|
19
19
|
<style>
|
|
20
20
|
h1 {
|
|
21
21
|
text-align: center;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<body>
|
|
28
28
|
<main class="container">
|
|
29
29
|
<div class="content">
|
|
30
|
-
<h1><a href="
|
|
30
|
+
<h1><a href="{{ base_url }}">{{ title }}</a></h1>
|
|
31
31
|
{% block content %}
|
|
32
32
|
{% endblock content %}
|
|
33
33
|
</div>
|
|
@@ -59,14 +59,14 @@
|
|
|
59
59
|
{% block content %}
|
|
60
60
|
{% for slug, keyword in keywords.items() %}
|
|
61
61
|
{% if loop.index < 20 %}
|
|
62
|
-
<a href="
|
|
62
|
+
<a href="{{ base_url }}mot-clef/{{ keyword.slug }}/">#{{ keyword.name }}</a>({{ keyword.articles|length }}){%- if not loop.last -%}, {% endif %}
|
|
63
63
|
{% endif %}
|
|
64
64
|
{% endfor %}…
|
|
65
65
|
<details>
|
|
66
66
|
<summary role="button">Voir plus de mot-clés :</summary>
|
|
67
67
|
{% for slug, keyword in keywords.items() %}
|
|
68
68
|
{% if loop.index >= 20 %}
|
|
69
|
-
<a href="
|
|
69
|
+
<a href="{{ base_url }}mot-clef/{{ keyword.slug }}/">#{{ keyword.name }}</a>({{ keyword.articles|length }}){%- if not loop.last -%}, {% endif %}
|
|
70
70
|
{% endif %}
|
|
71
71
|
{% endfor %}
|
|
72
72
|
</details>
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
<article>
|
|
76
76
|
<header>
|
|
77
77
|
<hgroup>
|
|
78
|
-
<h2><a href="
|
|
78
|
+
<h2><a href="{{ base_url }}numero/{{ numero.name }}/">{{ numero.name }}</a></h2>
|
|
79
79
|
<p>Le {{ numero.articles.0.date.strftime('%d %B %Y') }}</p>
|
|
80
80
|
</hgroup>
|
|
81
81
|
</header>
|
|
82
82
|
<ul>
|
|
83
83
|
{% for article in numero.articles %}
|
|
84
|
-
<li><a href="
|
|
84
|
+
<li><a href="{{ base_url }}numero/{{ numero.name }}/article/{{ article.id }}/">{{ article.title_f }}</a></li>
|
|
85
85
|
{% endfor %}
|
|
86
86
|
</ul>
|
|
87
87
|
</article>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<div>
|
|
10
10
|
<ul>
|
|
11
11
|
{% for article in keyword.articles %}
|
|
12
|
-
<li><a href="
|
|
12
|
+
<li><a href="{{ base_url }}numero/{{ article.numero.name }}/article/{{ article.id }}/">{{ article.title_f }}</a></li>
|
|
13
13
|
{% endfor %}
|
|
14
14
|
</ul>
|
|
15
15
|
</div>
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
{% for article in numero.articles %}
|
|
60
60
|
<article>
|
|
61
61
|
<header>
|
|
62
|
-
<h3><a href="
|
|
62
|
+
<h3><a href="{{ base_url }}numero/{{ numero.name }}/article/{{ article.id }}/">{{ article.title_f }}</a></h3>
|
|
63
63
|
</header>
|
|
64
64
|
{{ article.subtitle_f|markdown }}
|
|
65
65
|
{% if article.authors %}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|