Bump to v1.0.8: Add raw Markdown source view with emojis and update deployment version.
This commit is contained in:
parent
2e2c42285b
commit
ce2a9a03de
10
app.py
10
app.py
|
|
@ -11,7 +11,7 @@ app = Flask(__name__)
|
||||||
app.secret_key = os.environ.get("FLASK_SECRET_KEY", "prod-secret-7721")
|
app.secret_key = os.environ.get("FLASK_SECRET_KEY", "prod-secret-7721")
|
||||||
|
|
||||||
metrics = PrometheusMetrics(app)
|
metrics = PrometheusMetrics(app)
|
||||||
metrics.info('app_info', 'Application info', version='1.0.6')
|
metrics.info('app_info', 'Application info', version='1.0.8')
|
||||||
|
|
||||||
conversion_counter = metrics.counter(
|
conversion_counter = metrics.counter(
|
||||||
'txt2md_conversions_total', 'Total number of text conversions'
|
'txt2md_conversions_total', 'Total number of text conversions'
|
||||||
|
|
@ -38,6 +38,7 @@ else:
|
||||||
@app.route("/", methods=["GET", "POST"])
|
@app.route("/", methods=["GET", "POST"])
|
||||||
def index():
|
def index():
|
||||||
converted_html = None
|
converted_html = None
|
||||||
|
markdown_content = ""
|
||||||
original_text = ""
|
original_text = ""
|
||||||
|
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
|
|
@ -63,7 +64,12 @@ def index():
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
flash(f"Error during processing: {str(e)}", "error")
|
flash(f"Error during processing: {str(e)}", "error")
|
||||||
|
|
||||||
return render_template("index.html", original_text=original_text, converted_html=converted_html)
|
return render_template(
|
||||||
|
"index.html",
|
||||||
|
original_text=original_text,
|
||||||
|
converted_html=converted_html,
|
||||||
|
markdown_content=markdown_content
|
||||||
|
)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
debug_mode = os.environ.get("FLASK_DEBUG", "False").lower() == "true"
|
debug_mode = os.environ.get("FLASK_DEBUG", "False").lower() == "true"
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ spec:
|
||||||
serviceAccountName: txt2md-sa
|
serviceAccountName: txt2md-sa
|
||||||
containers:
|
containers:
|
||||||
- name: txt2md
|
- name: txt2md
|
||||||
image: europe-west3-docker.pkg.dev/project-84ddd43d-e408-4cb9-8cb/txt2md-repo/txt2md:v1.0.6
|
image: europe-west3-docker.pkg.dev/project-84ddd43d-e408-4cb9-8cb/txt2md-repo/txt2md:v1.0.8
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5000
|
- containerPort: 5000
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,10 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="output-section">
|
<section class="output-section">
|
||||||
<h2>Formatted Output</h2>
|
<h2>Markdown Output</h2>
|
||||||
|
<textarea class="markdown-output" readonly placeholder="Raw Markdown will appear here...">{{ markdown_content }}</textarea>
|
||||||
|
|
||||||
|
<h2>Formatted Preview</h2>
|
||||||
<div class="preview">
|
<div class="preview">
|
||||||
{% if converted_html %}
|
{% if converted_html %}
|
||||||
{{ converted_html | safe }}
|
{{ converted_html | safe }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue