crieur 1.6.0__py3-none-any.whl → 1.7.0__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.6.0"
3
+ VERSION = "1.7.0"
4
4
  ROOT_DIR = Path(__file__).parent
crieur/cli.py CHANGED
@@ -27,6 +27,7 @@ def generate(
27
27
  extra_vars: str = "",
28
28
  target_path: Path = Path() / "public",
29
29
  source_path: Path = Path() / "sources",
30
+ statics_path: Path = Path(__file__).parent / "statics",
30
31
  templates_path: Path = Path(__file__).parent / "templates",
31
32
  without_statics: bool = False,
32
33
  feed_limit: int = 10,
@@ -38,6 +39,7 @@ def generate(
38
39
  :extra_vars: stringified JSON extra vars passed to the templates.
39
40
  :target_path: Path where site is built (default: /public/).
40
41
  :source_path: Path where stylo source were downloaded (default: /sources/).
42
+ :statics_path: Path where statics are located (default: @crieur/statics/).
41
43
  :template_path: Path where templates are located (default: @crieur/templates/).
42
44
  :without_statics: Do not copy statics if True (default: False).
43
45
  :feed_limit: Number of max items in the feed (default: 10).
@@ -63,8 +65,7 @@ def generate(
63
65
  generate_feed(title, base_url, numeros, extra_vars, target_path, number=feed_limit)
64
66
 
65
67
  if not without_statics:
66
- static_path_local = Path(__file__).parent / "statics"
67
- shutil.copytree(static_path_local, target_path / "statics", dirs_exist_ok=True)
68
+ shutil.copytree(statics_path, target_path / "statics", dirs_exist_ok=True)
68
69
 
69
70
 
70
71
  @cli
crieur/generator.py CHANGED
@@ -2,6 +2,7 @@ import json
2
2
  import locale
3
3
  import shutil
4
4
  from datetime import datetime, timedelta, timezone
5
+ from pathlib import Path
5
6
 
6
7
  import mistune
7
8
  from feedgen.feed import FeedGenerator
@@ -27,7 +28,11 @@ def markdown(value):
27
28
  def generate_html(
28
29
  title, base_url, numeros, keywords, authors, extra_vars, target_path, templates_path
29
30
  ):
30
- environment = Env(loader=FileSystemLoader(str(templates_path)))
31
+ environment = Env(
32
+ loader=FileSystemLoader(
33
+ [str(templates_path), str(Path(__file__).parent / "templates")]
34
+ )
35
+ )
31
36
  environment.filters["slugify"] = slugify_
32
37
  environment.filters["markdown"] = markdown
33
38
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crieur
3
- Version: 1.6.0
3
+ Version: 1.7.0
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
@@ -754,6 +754,7 @@ cog.out(f"```\n{help}\n```")
754
754
  ```
755
755
  [--extra-vars EXTRA_VARS] [--target-path TARGET_PATH]
756
756
  [--source-path SOURCE_PATH]
757
+ [--statics-path STATICS_PATH]
757
758
  [--templates-path TEMPLATES_PATH] [--without-statics]
758
759
  [--feed-limit FEED_LIMIT]
759
760
 
@@ -768,6 +769,9 @@ options:
768
769
  --source-path SOURCE_PATH
769
770
  Path where stylo source were downloaded (default:
770
771
  /sources/).
772
+ --statics-path STATICS_PATH
773
+ Path where statics are located (default:
774
+ @crieur/statics/).
771
775
  --templates-path TEMPLATES_PATH
772
776
  --without-statics Do not copy statics if True (default: False).
773
777
  --feed-limit FEED_LIMIT
@@ -1,7 +1,7 @@
1
- crieur/__init__.py,sha256=OTKpyo3mBk05AW9jx7vHsWhKpHveyDwTU6fnJyxLxWo,77
1
+ crieur/__init__.py,sha256=I-oN_DJHUd7dkTJ8uqE26Pn84CyxcOXovlL7I7N4yNE,77
2
2
  crieur/__main__.py,sha256=bYt9eEaoRQWdejEHFD8REx9jxVEdZptECFsV7F49Ink,30
3
- crieur/cli.py,sha256=MyqGylQE691ILFnR_58925erUbluC30FrOLuok0PAB8,5737
4
- crieur/generator.py,sha256=wbMeE0jCEy7kw8jhjscoeTjj8nyRPv6jqA76ZQeCdg8,4386
3
+ crieur/cli.py,sha256=trYYSwcYsyPoWluZSVLoSA-8w86uQy3Wnw_w6724g8k,5809
4
+ crieur/generator.py,sha256=WeDqYNnAhkauBrY4R5zNXfWfYdDS73HdSeFcLEKmZU0,4491
5
5
  crieur/models.py,sha256=KrW6gy7z0RzDBdUAd2VgwzcNkMOpdRPnu9JxvkNGZ8c,8727
6
6
  crieur/utils.py,sha256=kIdxpd5LgVv13Lx2aEXzjQttBDtcppRlwNsH0vwX8f0,1566
7
7
  crieur/statics/pico.css,sha256=VdrimW9PLcEIzqJ__s062OrwBj_Jb6jZIwbtdqOtM-w,93407
@@ -11,8 +11,8 @@ crieur/templates/base.html,sha256=4ZOLAnmle0_m8Y3lWT6wcH8f-_7SymxEDeIUzDQNnks,16
11
11
  crieur/templates/homepage.html,sha256=7YG7kA4AFuyrSuqWeFAVj09ogwsybE7w0-NKMLWms5s,2994
12
12
  crieur/templates/keyword.html,sha256=Hv3Ep3R6oN5pBw14gfQT-aeqEiuFiatmVZLWn5hR1e4,428
13
13
  crieur/templates/numero.html,sha256=F7hCaAHJ1WRWxD_zfhJzyLaiwXblJWJF7DUTy41Mnu8,1849
14
- crieur-1.6.0.dist-info/METADATA,sha256=OCG3y13RZyHppOrUhjvC5v_WO7e1bJj6Vd1TedJYRNk,45046
15
- crieur-1.6.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
- crieur-1.6.0.dist-info/entry_points.txt,sha256=edmbmPxs9QXyvSMpPJBDPGw3vZOJEKqXJhysYNx3QSM,43
17
- crieur-1.6.0.dist-info/licenses/LICENSE,sha256=F5acw9_laHeyi4wPmQyf_ttyz81VqCIwScwO8C1FhXU,34519
18
- crieur-1.6.0.dist-info/RECORD,,
14
+ crieur-1.7.0.dist-info/METADATA,sha256=pRi6qHf6g3NveR_--Or1AuMCMEOfTXL0pay7A_PyqEc,45237
15
+ crieur-1.7.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
+ crieur-1.7.0.dist-info/entry_points.txt,sha256=edmbmPxs9QXyvSMpPJBDPGw3vZOJEKqXJhysYNx3QSM,43
17
+ crieur-1.7.0.dist-info/licenses/LICENSE,sha256=F5acw9_laHeyi4wPmQyf_ttyz81VqCIwScwO8C1FhXU,34519
18
+ crieur-1.7.0.dist-info/RECORD,,
File without changes