|
|
@@ -1,10 +1,15 @@
|
|
|
# Init
|
|
|
import os
|
|
|
import re
|
|
|
+import ctypes
|
|
|
|
|
|
from route.tool.func import *
|
|
|
from route import *
|
|
|
|
|
|
+if platform.system() == 'Linux':
|
|
|
+ for for_a in os.listdir("route_go"):
|
|
|
+ os.system('chmod +x ./route_go/' + for_a)
|
|
|
+
|
|
|
# Init-Version
|
|
|
with open('version.json', encoding = 'utf8') as file_data:
|
|
|
version_list = json.loads(file_data.read())
|
|
|
@@ -311,12 +316,15 @@ app.route('/list/document/all/<int:num>')(list_title_index)
|
|
|
|
|
|
# /list/document/long
|
|
|
app.route('/list/document/long')(list_long_page)
|
|
|
+app.route('/list/document/long/<int:arg_num>')(list_long_page)
|
|
|
|
|
|
# /list/document/short
|
|
|
app.route('/list/document/short', defaults = { 'tool' : 'short_page' })(list_long_page)
|
|
|
+app.route('/list/document/short/<int:arg_num>', defaults = { 'tool' : 'short_page' })(list_long_page)
|
|
|
|
|
|
# /list/file
|
|
|
app.route('/list/file')(list_image_file)
|
|
|
+app.route('/list/file/<int:arg_num>')(list_image_file)
|
|
|
|
|
|
# /list/admin
|
|
|
# /list/admin/list
|
|
|
@@ -638,6 +646,28 @@ app.route('/setting/skin_set', methods = ['POST', 'GET'])(main_setting_skin_set)
|
|
|
|
|
|
app.route('/easter_egg')(main_func_easter_egg)
|
|
|
|
|
|
+def main_easter_egg_go():
|
|
|
+ with get_db_connect() as conn:
|
|
|
+ print(platform.machine())
|
|
|
+ if platform.system() == 'Linux':
|
|
|
+ if platform.machine() in ["AMD64", "x86_64"]:
|
|
|
+ data = os.popen(os.path.join(".", "route_go", "bin", "main_easter_egg.amd64.bin")).read()
|
|
|
+ else:
|
|
|
+ data = os.popen(os.path.join(".", "route_go", "bin", "main_easter_egg.arm64.bin")).read()
|
|
|
+ else:
|
|
|
+ if platform.machine() in ["AMD64", "x86_64"]:
|
|
|
+ data = os.popen(os.path.join(".", "route_go", "bin", "main_easter_egg.amd64.exe")).read()
|
|
|
+ else:
|
|
|
+ data = os.popen(os.path.join(".", "route_go", "bin", "main_easter_egg.arm64.exe")).read()
|
|
|
+
|
|
|
+ return easy_minify(flask.render_template(skin_check(),
|
|
|
+ imp = ['Easter Egg', wiki_set(), wiki_custom(), wiki_css([0, 0])],
|
|
|
+ data = data,
|
|
|
+ menu = 0
|
|
|
+ ))
|
|
|
+
|
|
|
+app.route('/easter_egg_go')(main_easter_egg_go)
|
|
|
+
|
|
|
# views -> view
|
|
|
app.route('/view/<path:name>')(main_view)
|
|
|
app.route('/views/<path:name>')(main_view)
|