.
\ No newline at end of file
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..c0a8b45
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,2 @@
+# BOPIHIVE
+TODO: write readme
\ No newline at end of file
diff --git a/www.py b/www.py
new file mode 100644
index 0000000..7a861d1
--- /dev/null
+++ b/www.py
@@ -0,0 +1,44 @@
+"""
+ Bopihive
+ Copyright (C) 2024 fzorb
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+"""
+
+import jinja2
+import time
+from datetime import datetime
+import hashlib
+import os
+
+environment = jinja2.Environment(loader=jinja2.FileSystemLoader("www/templates/"))
+
+def renderIndex(ct, latest):
+ with open(f'./archive/{latest}/windows.zip', 'rb') as winFile:
+ bytes = winFile.read()
+ sha256Windows = hashlib.sha256(bytes).hexdigest()
+ sha512Windows = hashlib.sha512(bytes).hexdigest()
+ md5Windows = hashlib.md5(bytes).hexdigest()
+ with open(f'./archive/{latest}/linux.zip', 'rb') as linFile:
+ bytes = linFile.read()
+ sha256Linux = hashlib.sha256(bytes).hexdigest()
+ sha512Linux = hashlib.sha512(bytes).hexdigest()
+ md5Linux = hashlib.md5(bytes).hexdigest()
+
+ template = environment.get_template("index.html")
+ render = template.render(ct=datetime.fromtimestamp(int(ct)), latest=latest, render=datetime.now().strftime("%Y-%m-%d %H:%M:%S"), sha256Linux=sha256Linux, sha256Windows=sha256Windows, sha512Linux=sha512Linux, sha512Windows=sha512Windows, md5Linux=md5Linux, md5Windows=md5Windows)
+ os.remove("./www/output/index.html")
+ with open("./www/output/index.html", "x+") as file:
+ file.write(render)
\ No newline at end of file
diff --git a/www/output/index.html b/www/output/index.html
new file mode 100644
index 0000000..3223b4a
--- /dev/null
+++ b/www/output/index.html
@@ -0,0 +1 @@
+Bopihive Index PageBopihive - Bopimo! build archiving effort
This is the index page of the Bopihive project. A project which scrapes the /api/releases/client/latest
endpoint to archive any new versions of Bopimo! when they are released.
Latest version archived 1.0.9
at 2024-12-26 11:28:47
.
File hashes for 1.0.9
Windows
SHA256: 41cf5be8f7cf3528ce35d659402fbd65113c839a660e9eb86e928f3e9688ee94
md5: edfcc50d7c02a1d72a820eadb325abb2
SHA512: ecd9908a220426080e0d0bcefa48a9bba19e3f7f5fe5c7bc00ebd3c01c0676ed980acce9e9260ffa2e6cc5fc2ba1452c226ab1e4d593d8b522e6d76d233bd957
Linux
SHA256: bcddb9f623611fe8fc0f31ea0bec783019b30eab0e4fa208a06f9f4dec0d3b62
md5: 48229514d21e2ba5521bc7be33cb84f6
SHA512: d6e9373c910a760d01f1942368a1c7ef5bc8a4f5376d6781d8680100eff8d150d5120bf9d09031230780177a5611eaa26aec9a7277a1214c5edd953efbbfe3ba
Scour the archive
Page rendered 2024-12-26 11:29:14
Bopihive runs on free software licensed under the GPLv3
\ No newline at end of file
diff --git a/www/templates/index.html b/www/templates/index.html
new file mode 100644
index 0000000..7b4e7e5
--- /dev/null
+++ b/www/templates/index.html
@@ -0,0 +1 @@
+
Bopihive Index PageBopihive - Bopimo! build archiving effort
This is the index page of the Bopihive project. A project which scrapes the /api/releases/client/latest
endpoint to archive any new versions of Bopimo! when they are released.
Latest version archived {{ latest }}
at {{ ct }}
.
File hashes for {{latest}}
Windows
SHA256: {{sha256Windows}}
md5: {{md5Windows}}
SHA512: {{sha512Windows}}
Linux
SHA256: {{sha256Linux}}
md5: {{md5Linux}}
SHA512: {{sha512Linux}}
Scour the archive
Page rendered {{ render }}
Bopihive runs on free software licensed under the GPLv3
\ No newline at end of file