openwrite 0.10.4__tar.gz → 0.10.5__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 (74) hide show
  1. {openwrite-0.10.4/openwrite.egg-info → openwrite-0.10.5}/PKG-INFO +37 -2
  2. {openwrite-0.10.4 → openwrite-0.10.5}/README.md +36 -1
  3. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/routes/auth.py +7 -6
  4. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/routes/dashboard.py +6 -3
  5. {openwrite-0.10.4 → openwrite-0.10.5/openwrite.egg-info}/PKG-INFO +37 -2
  6. {openwrite-0.10.4 → openwrite-0.10.5}/pyproject.toml +1 -1
  7. {openwrite-0.10.4 → openwrite-0.10.5}/LICENSE +0 -0
  8. {openwrite-0.10.4 → openwrite-0.10.5}/MANIFEST.in +0 -0
  9. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/__init__.py +0 -0
  10. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/cli.py +0 -0
  11. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/db/__init__.py +0 -0
  12. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/db/base.py +0 -0
  13. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/gemini_multi.py +0 -0
  14. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/gemini_single.py +0 -0
  15. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/routes/admin.py +0 -0
  16. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/routes/blog.py +0 -0
  17. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/routes/federation.py +0 -0
  18. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/routes/main.py +0 -0
  19. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/routes/upload.py +0 -0
  20. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/IBMPlexSans-Regular.ttf +0 -0
  21. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/Merriweather.ttf +0 -0
  22. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/avatar.png +0 -0
  23. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/favicon.ico +0 -0
  24. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/logo.png +0 -0
  25. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/script/chart.js +0 -0
  26. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/script/highlight.min.js +0 -0
  27. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/script/openwrite.js +0 -0
  28. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/script/papaparse.min.js +0 -0
  29. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/script/showdown.min.js +0 -0
  30. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/script/showdown.min.js.map +0 -0
  31. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/script/site.compat.min.js +0 -0
  32. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/script/site.min.js +0 -0
  33. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/style/hl.css +0 -0
  34. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/style/style.css +0 -0
  35. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/style/themes/light.css +0 -0
  36. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/style/themes/obscura.css +0 -0
  37. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/style/themes/stickynote.css +0 -0
  38. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/style/themes/terminal.css +0 -0
  39. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/style/themes/warmnight.css +0 -0
  40. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/static/style/themes/windows98.css +0 -0
  41. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/admin.html +0 -0
  42. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/blog.html +0 -0
  43. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/blog_footer.html +0 -0
  44. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/blog_header.html +0 -0
  45. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/blog_preview.html +0 -0
  46. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/changepw.html +0 -0
  47. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/create.html +0 -0
  48. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/dashboard.html +0 -0
  49. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/discover.html +0 -0
  50. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/edit.html +0 -0
  51. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/footer.html +0 -0
  52. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/header.html +0 -0
  53. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/import.html +0 -0
  54. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/index.html +0 -0
  55. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/instances.html +0 -0
  56. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/login.html +0 -0
  57. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/new_post.html +0 -0
  58. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/post.html +0 -0
  59. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/preview.html +0 -0
  60. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/register.html +0 -0
  61. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/settings.html +0 -0
  62. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/templates/stats.html +0 -0
  63. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/utils/create_db.py +0 -0
  64. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/utils/db.py +0 -0
  65. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/utils/helpers.py +0 -0
  66. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/utils/i18n.json +0 -0
  67. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/utils/models.py +0 -0
  68. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite/utils/translations.py +0 -0
  69. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite.egg-info/SOURCES.txt +0 -0
  70. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite.egg-info/dependency_links.txt +0 -0
  71. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite.egg-info/entry_points.txt +0 -0
  72. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite.egg-info/requires.txt +0 -0
  73. {openwrite-0.10.4 → openwrite-0.10.5}/openwrite.egg-info/top_level.txt +0 -0
  74. {openwrite-0.10.4 → openwrite-0.10.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openwrite
3
- Version: 0.10.4
3
+ Version: 0.10.5
4
4
  License: GNU AFFERO GENERAL PUBLIC LICENSE
5
5
  Version 3, 19 November 2007
6
6
 
@@ -690,7 +690,7 @@ Dynamic: license-file
690
690
  ![logo](https://openwrite.io/static/logo.png)
691
691
  openwrite is a minimalist blogging platform built for writing freely, hosting independently, and publishing without noise.
692
692
 
693
- [![version](https://img.shields.io/badge/version-0.10.0-purple)](CHANGELOG.md)
693
+ ![PyPI - Version](https://img.shields.io/pypi/v/openwrite)
694
694
  [![License: AGPL-3.0-or-later](https://img.shields.io/badge/License-AGPL--3.0--or--later-blue.svg)](LICENSE)
695
695
  ![pythonver](https://img.shields.io/badge/python%20version-3.11-blue)
696
696
  ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/openwriteio/openwrite/python-tests.yml)
@@ -720,3 +720,38 @@ openwrite is a minimalist blogging platform built for writing freely, hosting in
720
720
  - Statistics per post
721
721
 
722
722
 
723
+ ## Installation
724
+
725
+ 1. To install openwrite, clone it with `pip`:
726
+
727
+ ```
728
+ pip install openwrite
729
+ ```
730
+
731
+ 2. Then run:
732
+
733
+ ```
734
+ openwrite init
735
+ ```
736
+
737
+ 3. Answer few questions about your instance to generate .env, database and create all necessary directories.
738
+ 4. Run:
739
+
740
+ ```
741
+ openwrite run
742
+ ```
743
+
744
+ to run it in foreground or:
745
+
746
+ ```
747
+ openwrite run -d
748
+ ```
749
+
750
+ to run it in background.
751
+
752
+ 5. Enjoy!
753
+
754
+
755
+ #### Docker
756
+
757
+ Docker image is still being prepared. Stay tuned!
@@ -1,7 +1,7 @@
1
1
  ![logo](https://openwrite.io/static/logo.png)
2
2
  openwrite is a minimalist blogging platform built for writing freely, hosting independently, and publishing without noise.
3
3
 
4
- [![version](https://img.shields.io/badge/version-0.10.0-purple)](CHANGELOG.md)
4
+ ![PyPI - Version](https://img.shields.io/pypi/v/openwrite)
5
5
  [![License: AGPL-3.0-or-later](https://img.shields.io/badge/License-AGPL--3.0--or--later-blue.svg)](LICENSE)
6
6
  ![pythonver](https://img.shields.io/badge/python%20version-3.11-blue)
7
7
  ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/openwriteio/openwrite/python-tests.yml)
@@ -31,3 +31,38 @@ openwrite is a minimalist blogging platform built for writing freely, hosting in
31
31
  - Statistics per post
32
32
 
33
33
 
34
+ ## Installation
35
+
36
+ 1. To install openwrite, clone it with `pip`:
37
+
38
+ ```
39
+ pip install openwrite
40
+ ```
41
+
42
+ 2. Then run:
43
+
44
+ ```
45
+ openwrite init
46
+ ```
47
+
48
+ 3. Answer few questions about your instance to generate .env, database and create all necessary directories.
49
+ 4. Run:
50
+
51
+ ```
52
+ openwrite run
53
+ ```
54
+
55
+ to run it in foreground or:
56
+
57
+ ```
58
+ openwrite run -d
59
+ ```
60
+
61
+ to run it in background.
62
+
63
+ 5. Enjoy!
64
+
65
+
66
+ #### Docker
67
+
68
+ Docker image is still being prepared. Stay tuned!
@@ -31,15 +31,16 @@ def register():
31
31
  if user:
32
32
  return render_template('register.html', error=g.trans["user_exists"])
33
33
 
34
- if request.form.get("frc-captcha-response") is None or request.form.get("frc-captcha-response") == ".ACTIVATED":
35
- return render_template('register.html', error=g.trans['invalid_captcha'])
34
+ if g.captcha:
35
+ if request.form.get("frc-captcha-response") is None or request.form.get("frc-captcha-response") == ".ACTIVATED":
36
+ return render_template('register.html', error=g.trans['invalid_captcha'])
36
37
 
37
- captcha_data = {'response': request.form.get("frc-captcha-response"), 'sitekey': g.fcaptcha_sitekey}
38
+ captcha_data = {'response': request.form.get("frc-captcha-response"), 'sitekey': g.fcaptcha_sitekey}
38
39
 
39
- resp = requests.post("https://global.frcapi.com/api/v2/captcha/siteverify", json=captcha_data, headers={"X-API-Key": g.fcaptcha_apikey})
40
+ resp = requests.post("https://global.frcapi.com/api/v2/captcha/siteverify", json=captcha_data, headers={"X-API-Key": g.fcaptcha_apikey})
40
41
 
41
- if json.loads(resp.text)['success'] != True:
42
- return render_template("register.html", error=resp.text)
42
+ if json.loads(resp.text)['success'] != True:
43
+ return render_template("register.html", error=resp.text)
43
44
 
44
45
  try:
45
46
  hashed = bcrypt.hashpw(form_password.encode('utf-8'), bcrypt.gensalt())
@@ -32,9 +32,10 @@ def create_blog():
32
32
  if g.user is None:
33
33
  return redirect("/login")
34
34
 
35
- count = g.db.query(Blog).filter_by(owner=g.user).count()
36
- if count >= int(g.blog_limit):
37
- return render_template("create.html", error="Blog limit reached!")
35
+ if int(g.blog_limit) > 0:
36
+ count = g.db.query(Blog).filter_by(owner=g.user).count()
37
+ if count >= int(g.blog_limit):
38
+ return render_template("create.html", error="Blog limit reached!")
38
39
 
39
40
  if request.method == "GET":
40
41
  return render_template("create.html")
@@ -51,6 +52,8 @@ def create_blog():
51
52
 
52
53
  form_index = request.form.get("index") or "off"
53
54
  form_access = request.form.get("access")
55
+ if form_access not in ("path", "domain"):
56
+ return render_template("create.html", error="Wrong access!")
54
57
 
55
58
  key = rsa.generate_private_key(
56
59
  public_exponent=65537,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openwrite
3
- Version: 0.10.4
3
+ Version: 0.10.5
4
4
  License: GNU AFFERO GENERAL PUBLIC LICENSE
5
5
  Version 3, 19 November 2007
6
6
 
@@ -690,7 +690,7 @@ Dynamic: license-file
690
690
  ![logo](https://openwrite.io/static/logo.png)
691
691
  openwrite is a minimalist blogging platform built for writing freely, hosting independently, and publishing without noise.
692
692
 
693
- [![version](https://img.shields.io/badge/version-0.10.0-purple)](CHANGELOG.md)
693
+ ![PyPI - Version](https://img.shields.io/pypi/v/openwrite)
694
694
  [![License: AGPL-3.0-or-later](https://img.shields.io/badge/License-AGPL--3.0--or--later-blue.svg)](LICENSE)
695
695
  ![pythonver](https://img.shields.io/badge/python%20version-3.11-blue)
696
696
  ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/openwriteio/openwrite/python-tests.yml)
@@ -720,3 +720,38 @@ openwrite is a minimalist blogging platform built for writing freely, hosting in
720
720
  - Statistics per post
721
721
 
722
722
 
723
+ ## Installation
724
+
725
+ 1. To install openwrite, clone it with `pip`:
726
+
727
+ ```
728
+ pip install openwrite
729
+ ```
730
+
731
+ 2. Then run:
732
+
733
+ ```
734
+ openwrite init
735
+ ```
736
+
737
+ 3. Answer few questions about your instance to generate .env, database and create all necessary directories.
738
+ 4. Run:
739
+
740
+ ```
741
+ openwrite run
742
+ ```
743
+
744
+ to run it in foreground or:
745
+
746
+ ```
747
+ openwrite run -d
748
+ ```
749
+
750
+ to run it in background.
751
+
752
+ 5. Enjoy!
753
+
754
+
755
+ #### Docker
756
+
757
+ Docker image is still being prepared. Stay tuned!
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "openwrite"
7
- version = "0.10.4"
7
+ version = "0.10.5"
8
8
  license = { file = "LICENSE" }
9
9
  dependencies = [
10
10
  "flask",
File without changes
File without changes
File without changes
File without changes