From e1ccd3363672a0733f586075470dc2672ca79675815376415846d000f0c9e448 Mon Sep 17 00:00:00 2001 From: Nyx Date: Sat, 5 Apr 2025 23:59:04 -0500 Subject: [PATCH] start work --- app/app.py | 13 +++++++++++++ app/templates/fortune.j2 | 15 +++++++++++++++ app/templates/index.xht | 17 +++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 app/app.py create mode 100644 app/templates/fortune.j2 create mode 100644 app/templates/index.xht diff --git a/app/app.py b/app/app.py new file mode 100644 index 0000000..5fab025 --- /dev/null +++ b/app/app.py @@ -0,0 +1,13 @@ +from flask import Flask, render_template, make_response, send_from_directory +import os + +app = Flask(__name__) + +@app.route('/') +def index(): + return render_template('index.xht') + +@app.route('/fortune') +def fortune(): + fortune = os.run('/usr/bin/fortune') + return render_template('fortune.j2', fortune=fortune) \ No newline at end of file diff --git a/app/templates/fortune.j2 b/app/templates/fortune.j2 new file mode 100644 index 0000000..b0c82d2 --- /dev/null +++ b/app/templates/fortune.j2 @@ -0,0 +1,15 @@ + + + + + fortune as a service + + + +

fortune as a service

+

+ your fortune is: {{ fortune }} +

+ get a new fortune + \ No newline at end of file diff --git a/app/templates/index.xht b/app/templates/index.xht new file mode 100644 index 0000000..c7b47d0 --- /dev/null +++ b/app/templates/index.xht @@ -0,0 +1,17 @@ + + + + + fortune as a service + + + +

fortune as a service

+

+ fortune as a service is a simple web application that provides random fortunes, + from the /usr/bin/fortune command on Arch Linux, with our patent-pending AI Layer + 2 code execution engine. +

+ get a fortune + \ No newline at end of file