crieur 1.6.0__tar.gz → 1.7.0__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.6.0 → crieur-1.7.0}/PKG-INFO +5 -1
- {crieur-1.6.0 → crieur-1.7.0}/README.md +4 -0
- {crieur-1.6.0 → crieur-1.7.0}/crieur/__init__.py +1 -1
- {crieur-1.6.0 → crieur-1.7.0}/crieur/cli.py +3 -2
- {crieur-1.6.0 → crieur-1.7.0}/crieur/generator.py +6 -1
- {crieur-1.6.0 → crieur-1.7.0}/.gitignore +0 -0
- {crieur-1.6.0 → crieur-1.7.0}/LICENSE +0 -0
- {crieur-1.6.0 → crieur-1.7.0}/crieur/__main__.py +0 -0
- {crieur-1.6.0 → crieur-1.7.0}/crieur/models.py +0 -0
- {crieur-1.6.0 → crieur-1.7.0}/crieur/statics/pico.css +0 -0
- {crieur-1.6.0 → crieur-1.7.0}/crieur/templates/article.html +0 -0
- {crieur-1.6.0 → crieur-1.7.0}/crieur/templates/author.html +0 -0
- {crieur-1.6.0 → crieur-1.7.0}/crieur/templates/base.html +0 -0
- {crieur-1.6.0 → crieur-1.7.0}/crieur/templates/homepage.html +0 -0
- {crieur-1.6.0 → crieur-1.7.0}/crieur/templates/keyword.html +0 -0
- {crieur-1.6.0 → crieur-1.7.0}/crieur/templates/numero.html +0 -0
- {crieur-1.6.0 → crieur-1.7.0}/crieur/utils.py +0 -0
- {crieur-1.6.0 → crieur-1.7.0}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crieur
|
|
3
|
-
Version: 1.
|
|
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
|
|
@@ -48,6 +48,7 @@ cog.out(f"```\n{help}\n```")
|
|
|
48
48
|
```
|
|
49
49
|
[--extra-vars EXTRA_VARS] [--target-path TARGET_PATH]
|
|
50
50
|
[--source-path SOURCE_PATH]
|
|
51
|
+
[--statics-path STATICS_PATH]
|
|
51
52
|
[--templates-path TEMPLATES_PATH] [--without-statics]
|
|
52
53
|
[--feed-limit FEED_LIMIT]
|
|
53
54
|
|
|
@@ -62,6 +63,9 @@ options:
|
|
|
62
63
|
--source-path SOURCE_PATH
|
|
63
64
|
Path where stylo source were downloaded (default:
|
|
64
65
|
/sources/).
|
|
66
|
+
--statics-path STATICS_PATH
|
|
67
|
+
Path where statics are located (default:
|
|
68
|
+
@crieur/statics/).
|
|
65
69
|
--templates-path TEMPLATES_PATH
|
|
66
70
|
--without-statics Do not copy statics if True (default: False).
|
|
67
71
|
--feed-limit FEED_LIMIT
|
|
@@ -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
|
-
|
|
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
|
|
@@ -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(
|
|
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
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|