From bf53a2b208efa7dc2181482d91fda153281ae52b Mon Sep 17 00:00:00 2001 From: Nyako Date: Tue, 26 May 2026 17:31:44 +0300 Subject: [PATCH] 3s --- config.json | 3 + db.json | 1 + run.py | 31 +++ templates/analytics.html | 418 +++++++++++++++++++++++++++++++++++++++ templates/index.html | 233 ++++++++++++++++++++++ templates/post.html | 267 +++++++++++++++++++++++++ 6 files changed, 953 insertions(+) create mode 100644 config.json create mode 100644 db.json create mode 100644 run.py create mode 100644 templates/analytics.html create mode 100644 templates/index.html create mode 100644 templates/post.html diff --git a/config.json b/config.json new file mode 100644 index 0000000..9f1d2b4 --- /dev/null +++ b/config.json @@ -0,0 +1,3 @@ +{ + "port":8084 +} \ No newline at end of file diff --git a/db.json b/db.json new file mode 100644 index 0000000..25f2254 --- /dev/null +++ b/db.json @@ -0,0 +1 @@ +{"_default": {"1": {"name": "Alex", "age": 25}}} \ No newline at end of file diff --git a/run.py b/run.py new file mode 100644 index 0000000..861e3d8 --- /dev/null +++ b/run.py @@ -0,0 +1,31 @@ +from system_module import db, gelbooru, logger +from flask import Flask, render_template +import json + +CONFIG_ROOT = json.load(open("config.json", "r", encoding="utf-8")) +CONFIG_PORT = CONFIG_ROOT["port"] + +app = Flask(__name__) + +@app.route("/") +def index(): + return render_template("index.html") + + +@app.route("/analytics") +def analytics(): + return render_template("analytics.html") + + +@app.route("/post/") +def post(post_id): + return render_template("post.html") + + +@app.route("/api", methods=["GET", "POST"]) +def api(): + return "", 204 + + +if __name__ == "__main__": + app.run(host="0.0.0.0", port=CONFIG_PORT) \ No newline at end of file diff --git a/templates/analytics.html b/templates/analytics.html new file mode 100644 index 0000000..db523a5 --- /dev/null +++ b/templates/analytics.html @@ -0,0 +1,418 @@ + + + + + + Analytics - LocalBooru + + + + +
+ + 📊 Analytics +
+ +
    +
    +
    + +
    +

    Database Analytics

    + + +
    + + + + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..bfda831 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,233 @@ + + + + + + LocalBooru + + + + +
    + + 📊 Analytics +
    + +
      +
      +
      + + + + +
      +
      + +
      +
      Results (0)
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/templates/post.html b/templates/post.html new file mode 100644 index 0000000..c601a7d --- /dev/null +++ b/templates/post.html @@ -0,0 +1,267 @@ + + + + + + Post - LocalBooru + + + + +
      + +
      + +
        +
        +
        + +
        +
        Загрузка поста...
        +
        + + + + \ No newline at end of file