platzky 0.2.1__tar.gz → 0.2.2__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.
Files changed (34) hide show
  1. {platzky-0.2.1 → platzky-0.2.2}/PKG-INFO +1 -1
  2. {platzky-0.2.1 → platzky-0.2.2}/platzky/db/graph_ql_db.py +12 -2
  3. {platzky-0.2.1 → platzky-0.2.2}/pyproject.toml +1 -1
  4. {platzky-0.2.1 → platzky-0.2.2}/README.md +0 -0
  5. {platzky-0.2.1 → platzky-0.2.2}/platzky/__init__.py +0 -0
  6. {platzky-0.2.1 → platzky-0.2.2}/platzky/blog/__init__.py +0 -0
  7. {platzky-0.2.1 → platzky-0.2.2}/platzky/blog/blog.py +0 -0
  8. {platzky-0.2.1 → platzky-0.2.2}/platzky/blog/comment_form.py +0 -0
  9. {platzky-0.2.1 → platzky-0.2.2}/platzky/config.py +0 -0
  10. {platzky-0.2.1 → platzky-0.2.2}/platzky/db/__init__.py +0 -0
  11. {platzky-0.2.1 → platzky-0.2.2}/platzky/db/db.py +0 -0
  12. {platzky-0.2.1 → platzky-0.2.2}/platzky/db/db_loader.py +0 -0
  13. {platzky-0.2.1 → platzky-0.2.2}/platzky/db/google_json_db.py +0 -0
  14. {platzky-0.2.1 → platzky-0.2.2}/platzky/db/json_db.py +0 -0
  15. {platzky-0.2.1 → platzky-0.2.2}/platzky/db/json_file_db.py +0 -0
  16. {platzky-0.2.1 → platzky-0.2.2}/platzky/models.py +0 -0
  17. {platzky-0.2.1 → platzky-0.2.2}/platzky/platzky.py +0 -0
  18. {platzky-0.2.1 → platzky-0.2.2}/platzky/plugin_loader.py +0 -0
  19. {platzky-0.2.1 → platzky-0.2.2}/platzky/plugins/redirections/entrypoint.py +0 -0
  20. {platzky-0.2.1 → platzky-0.2.2}/platzky/plugins/sendmail/entrypoint.py +0 -0
  21. {platzky-0.2.1 → platzky-0.2.2}/platzky/seo/seo.py +0 -0
  22. {platzky-0.2.1 → platzky-0.2.2}/platzky/static/blog.css +0 -0
  23. {platzky-0.2.1 → platzky-0.2.2}/platzky/templates/404.html +0 -0
  24. {platzky-0.2.1 → platzky-0.2.2}/platzky/templates/base.html +0 -0
  25. {platzky-0.2.1 → platzky-0.2.2}/platzky/templates/blog.html +0 -0
  26. {platzky-0.2.1 → platzky-0.2.2}/platzky/templates/body_meta.html +0 -0
  27. {platzky-0.2.1 → platzky-0.2.2}/platzky/templates/feed.xml +0 -0
  28. {platzky-0.2.1 → platzky-0.2.2}/platzky/templates/head_meta.html +0 -0
  29. {platzky-0.2.1 → platzky-0.2.2}/platzky/templates/home.html +0 -0
  30. {platzky-0.2.1 → platzky-0.2.2}/platzky/templates/page.html +0 -0
  31. {platzky-0.2.1 → platzky-0.2.2}/platzky/templates/post.html +0 -0
  32. {platzky-0.2.1 → platzky-0.2.2}/platzky/templates/robots.txt +0 -0
  33. {platzky-0.2.1 → platzky-0.2.2}/platzky/templates/sitemap.xml +0 -0
  34. {platzky-0.2.1 → platzky-0.2.2}/platzky/www_handler.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: platzky
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Not only blog engine
5
5
  License: MIT
6
6
  Requires-Python: >=3.10,<4.0
@@ -26,14 +26,24 @@ def db_from_config(config: GraphQlDbConfig):
26
26
  return GraphQL(config.endpoint, config.token)
27
27
 
28
28
 
29
- def _standarize_post(post):
29
+ def _standarize_comment(
30
+ comment,
31
+ ): # TODO add tests for checking stadarization of comments
32
+ return {
33
+ "author": comment["author"],
34
+ "comment": comment["comment"],
35
+ "date": comment["createdAt"],
36
+ }
37
+
38
+
39
+ def _standarize_post(post): # TODO add tests for checking stadarization of posts
30
40
  return {
31
41
  "author": post["author"]["name"],
32
42
  "slug": post["slug"],
33
43
  "title": post["title"],
34
44
  "excerpt": post["excerpt"],
35
45
  "contentInMarkdown": post["contentInRichText"]["html"],
36
- "comments": post["comments"],
46
+ "comments": [_standarize_comment(comment) for comment in post["comments"]],
37
47
  "tags": post["tags"],
38
48
  "language": post["language"],
39
49
  "coverImage": {
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "platzky"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "Not only blog engine"
5
5
  authors = []
6
6
  license = "MIT"
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