aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-06-17 21:35:46 -0400
committerB. Stack <bgstack15@gmail.com>2023-06-24 08:23:00 -0400
commit19066806a046625abbe0babfcdcb75cacdf4ce61 (patch)
treec0220c8cd9847d408cc69fb6fd4288c23f598b97
parentdisallow ext-auth user to change nickname (diff)
downloadnewspipe-19066806a046625abbe0babfcdcb75cacdf4ce61.tar.gz
newspipe-19066806a046625abbe0babfcdcb75cacdf4ce61.tar.bz2
newspipe-19066806a046625abbe0babfcdcb75cacdf4ce61.zip
add better branding, and do not use git for version
-rw-r--r--newspipe/templates/about.html1
-rw-r--r--newspipe/templates/about_more.html2
-rw-r--r--newspipe/web/__init__.py11
-rw-r--r--newspipe/web/views/views.py4
4 files changed, 7 insertions, 11 deletions
diff --git a/newspipe/templates/about.html b/newspipe/templates/about.html
index 45703ea0..973c086e 100644
--- a/newspipe/templates/about.html
+++ b/newspipe/templates/about.html
@@ -12,6 +12,7 @@
<p>{{ _('Found a bug? Report it <a href="https://todo.sr.ht/~cedric/newspipe">here</a>.') }}
{{ _('A documentation is available <a href="https://man.sr.ht/~cedric/newspipe">here</a>.') }}</p>
<p><a href="{{ url_for('about_more') }}">{{ _('More information') }}</a> {{ _('about this instance.') }}</p>
+ <p><a href="{{ git_url }}">This fork's source</a></p>
</div>
</div>
<br />
diff --git a/newspipe/templates/about_more.html b/newspipe/templates/about_more.html
index 0df05852..6f01681f 100644
--- a/newspipe/templates/about_more.html
+++ b/newspipe/templates/about_more.html
@@ -5,7 +5,7 @@
<div class="col">
<h2>{{ _('Information about this instance') }}</h2>
<ul class="list-group">
- <li class="list-group-item">{{ _('Newspipe version') }}: <em><a href="{{ version_url }}">{{newspipe_version}}</a></em></li>
+ <li class="list-group-item">{{ _('Newspipe version') }}: <em>{{newspipe_version}}</em></li>
<li class="list-group-item">{{ _('Python version') }}: <em>{{python_version}}</em></li>
<li class="list-group-item">{{ _('Registration') }}: <em>{{registration}}</em></li>
<li class="list-group-item">{{ _('Number of users') }}: <em>{{nb_users}}</em></li>
diff --git a/newspipe/web/__init__.py b/newspipe/web/__init__.py
index 9cd78b88..cbda2235 100644
--- a/newspipe/web/__init__.py
+++ b/newspipe/web/__init__.py
@@ -10,11 +10,6 @@ import subprocess
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
-__version__ = (
- os.environ.get("PKGVER")
- or subprocess.run(
- ["git", "-C", BASE_DIR, "describe", "--tags"], stdout=subprocess.PIPE
- )
- .stdout.decode()
- .strip()
-)
+# bgstack15
+__version__ = "v9.5.1"
+__git_url__ = "https://bgstack15.ddns.net/cgit/newspipe"
diff --git a/newspipe/web/views/views.py b/newspipe/web/views/views.py
index bb7bff2f..52d4e175 100644
--- a/newspipe/web/views/views.py
+++ b/newspipe/web/views/views.py
@@ -17,7 +17,7 @@ from newspipe.bootstrap import application
from newspipe.bootstrap import talisman
from newspipe.controllers import FeedController
from newspipe.controllers import UserController
-from newspipe.web import __version__
+from newspipe.web import __version__, __git_url__
from newspipe.web.lib.view_utils import etag_match
logger = logging.getLogger(__name__)
@@ -88,7 +88,7 @@ def popular():
@current_app.route("/about", methods=["GET"])
@etag_match
def about():
- return render_template("about.html", contact=application.config["ADMIN_EMAIL"])
+ return render_template("about.html", contact=application.config["ADMIN_EMAIL"], git_url=__git_url__)
@current_app.route("/about/more", methods=["GET"])
bgstack15