crieur 1.0.4__py3-none-any.whl → 1.0.5__py3-none-any.whl

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/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  from pathlib import Path
2
2
 
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
4
4
  ROOT_DIR = Path(__file__).parent
crieur/models.py CHANGED
@@ -20,19 +20,21 @@ class Numero(YAMLWizard):
20
20
 
21
21
  loaded_articles = []
22
22
  for article in self.articles:
23
+ article_slug = slugify(article["article"]["title"])
23
24
  article_folder = (
24
- yaml_path.parent
25
- / f"{article['article']['title']}-{article['article']['_id']}"
25
+ yaml_path.parent / f"{article_slug}-{article['article']['_id']}"
26
26
  )
27
- article_yaml_path = article_folder / f"{article['article']['title']}.yaml"
27
+ article_yaml_path = article_folder / f"{article_slug}.yaml"
28
28
  try:
29
29
  loaded_article = Article.from_yaml_file(article_yaml_path)
30
30
  except ComposerError:
31
31
  loaded_article = Article.from_yaml(
32
32
  article_yaml_path.read_text().split("---")[1]
33
33
  )
34
+ if not loaded_article.id:
35
+ loaded_article.id = article_slug
34
36
  loaded_article.content_md = (
35
- article_folder / f"{article['article']['title']}.md"
37
+ article_folder / f"{article_slug}.md"
36
38
  ).read_text()
37
39
  loaded_article.images_path = (
38
40
  article_folder / "images"
@@ -46,10 +48,10 @@ class Numero(YAMLWizard):
46
48
 
47
49
  @dataclass
48
50
  class Article(YAMLWizard):
49
- id: str
50
51
  title: str
51
52
  title_f: str
52
53
  date: Optional[DatePattern["%Y/%m/%d"]] # noqa: F722
54
+ id: str = ""
53
55
  subtitle: str = ""
54
56
  subtitle_f: str = ""
55
57
  content_md: str = ""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crieur
3
- Version: 1.0.4
3
+ Version: 1.0.5
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
@@ -1,8 +1,8 @@
1
- crieur/__init__.py,sha256=zlDH-Tc42iSvpV7K5YU5o4r3Ng239oxDEqBCZQDwN8Y,77
1
+ crieur/__init__.py,sha256=_Cm28IL8svdeNFJUhC5K6KyLSaWia9_WoEXOK-4lBRM,77
2
2
  crieur/__main__.py,sha256=bYt9eEaoRQWdejEHFD8REx9jxVEdZptECFsV7F49Ink,30
3
3
  crieur/cli.py,sha256=-H9yMG0vT5pJXAL5GP7zf5qisi3KzoIhjG1LUXz9p10,4423
4
4
  crieur/generator.py,sha256=LHFR93DYogcvfEoudnXn5BI7LiQ7M71VXE-Q4uWshOY,2501
5
- crieur/models.py,sha256=C-eqCa5Ce1hNGv89Ta3ZhSixT06h0am_MG-mO7FNjjo,3658
5
+ crieur/models.py,sha256=8xEJvP-G81PY4rEPR7fAgahIqu2phzJPELiB8jiKP8A,3753
6
6
  crieur/utils.py,sha256=kIdxpd5LgVv13Lx2aEXzjQttBDtcppRlwNsH0vwX8f0,1566
7
7
  crieur/statics/pico.css,sha256=VdrimW9PLcEIzqJ__s062OrwBj_Jb6jZIwbtdqOtM-w,93407
8
8
  crieur/templates/article.html,sha256=9-5wfVvwyu-IRDB33TUjO2dwNDDTOdxr_Qw3RpwghvM,1149
@@ -10,8 +10,8 @@ crieur/templates/base.html,sha256=T1VALdpGLtG-tVYDcziLHQQbYWFvAs4FDRBL_olO2mc,14
10
10
  crieur/templates/homepage.html,sha256=Z6ODT-FVLUT0BjpVNaIOqGp-8rrJYeKbJE37wsGapUU,2458
11
11
  crieur/templates/keyword.html,sha256=dNcq8fxRG9tDIoTJnKfzlaukyr25gHBRDXauAe2qlI8,428
12
12
  crieur/templates/numero.html,sha256=R_lBPiXMeSLGWCvy-4U4X1tJuNQHpK-dVVe3DaVtQ9o,1882
13
- crieur-1.0.4.dist-info/METADATA,sha256=PE6rDQHSiEQ7FxRyzfSBSXCxQwU4gSXkLOmdltQz46M,44515
14
- crieur-1.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
- crieur-1.0.4.dist-info/entry_points.txt,sha256=edmbmPxs9QXyvSMpPJBDPGw3vZOJEKqXJhysYNx3QSM,43
16
- crieur-1.0.4.dist-info/licenses/LICENSE,sha256=F5acw9_laHeyi4wPmQyf_ttyz81VqCIwScwO8C1FhXU,34519
17
- crieur-1.0.4.dist-info/RECORD,,
13
+ crieur-1.0.5.dist-info/METADATA,sha256=AEEy78TNm8a2iFLE-CHBJ2ghuRrALJqoT_GXl2OtdCU,44515
14
+ crieur-1.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
+ crieur-1.0.5.dist-info/entry_points.txt,sha256=edmbmPxs9QXyvSMpPJBDPGw3vZOJEKqXJhysYNx3QSM,43
16
+ crieur-1.0.5.dist-info/licenses/LICENSE,sha256=F5acw9_laHeyi4wPmQyf_ttyz81VqCIwScwO8C1FhXU,34519
17
+ crieur-1.0.5.dist-info/RECORD,,
File without changes