diff --git a/requirements.txt b/requirements.txt index cdff1bc..4e85565 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,8 @@ # Core application dependencies. +aksharamukha>=2.2,<3 flask>=2.3,<3 flask-cors>=4.0,<5 python-dotenv>=1.0,<2 pyyaml>=6.0,<7 uwsgi>=2.0,<2.1 +yiddish==0.0.21 diff --git a/scriptshifter/__init__.py b/scriptshifter/__init__.py index 8f324f5..ea34ebd 100644 --- a/scriptshifter/__init__.py +++ b/scriptshifter/__init__.py @@ -18,6 +18,11 @@ """ SMTP_HOST = environ.get("TXL_SMTP_HOST") +with open(path.join(path.dirname(APP_ROOT), "VERSION")) as fh: + version_info = fh.readlines() +GIT_TAG = version_info[0].strip() +GIT_COMMIT = version_info[1].strip() + logging.basicConfig( # filename=environ.get("TXL_LOGFILE", "/dev/stdout"), level=environ.get("TXL_LOGLEVEL", logging.WARN)) diff --git a/scriptshifter/rest_api.py b/scriptshifter/rest_api.py index fd6d119..0d77d11 100644 --- a/scriptshifter/rest_api.py +++ b/scriptshifter/rest_api.py @@ -10,7 +10,10 @@ from flask import Flask, jsonify, render_template, request from flask_cors import CORS -from scriptshifter import EMAIL_FROM, EMAIL_TO, SMTP_HOST, SMTP_PORT +from scriptshifter import ( + EMAIL_FROM, EMAIL_TO, + GIT_COMMIT, GIT_TAG, + SMTP_HOST, SMTP_PORT) from scriptshifter.exceptions import ApiError from scriptshifter.tables import list_tables, load_table from scriptshifter.trans import transliterate @@ -69,6 +72,7 @@ def index(): return render_template( "index.html", languages=list_tables(), + version_info=(GIT_TAG, GIT_COMMIT), feedback_form=SMTP_HOST is not None) diff --git a/scriptshifter/templates/layout.html b/scriptshifter/templates/layout.html index 83f317a..8da00e8 100644 --- a/scriptshifter/templates/layout.html +++ b/scriptshifter/templates/layout.html @@ -21,5 +21,9 @@

{{ title }}

+