ソースを参照

Merge pull request #2618 from openNAMU/tmp

Tmp
잉여개발기 2 ヶ月 前
コミット
3fc542ff72

+ 47 - 49
app.py

@@ -586,11 +586,11 @@ app.route('/filter/extension_filter/add', methods = ['POST', 'GET'], defaults =
 app.route('/filter/extension_filter/del/<everything:name>', defaults = { 'tool' : 'extension_filter' })(filter_all_delete)
 
 # Func-list
-app.route('/list/document/old', defaults = { 'set_type' : 'old' })(list_old_page)
-app.route('/list/document/old/<int:num>', defaults = { 'set_type' : 'old' })(list_old_page)
+app.route('/list/document/old')(golang_view())
+app.route('/list/document/old/<int:num>')(golang_view())
 
-app.route('/list/document/new', defaults = { 'set_type' : 'new' })(list_old_page)
-app.route('/list/document/new/<int:num>', defaults = { 'set_type' : 'new' })(list_old_page)
+app.route('/list/document/new')(golang_view())
+app.route('/list/document/new/<int:num>')(golang_view())
 
 app.route('/list/document/no_link')(list_no_link)
 app.route('/list/document/no_link/<int:num>')(list_no_link)
@@ -604,11 +604,11 @@ app.route('/list/document/need/<int:arg_num>')(list_please)
 app.route('/list/document/all')(list_title_index)
 app.route('/list/document/all/<int:num>')(list_title_index)
 
-app.route('/list/document/long')(list_long_page)
-app.route('/list/document/long/<int:arg_num>')(list_long_page)
+app.route('/list/document/long')(golang_view())
+app.route('/list/document/long/<int:arg_num>')(golang_view())
 
-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)
+app.route('/list/document/short')(golang_view())
+app.route('/list/document/short/<int:arg_num>')(golang_view())
 
 app.route('/list/file')(list_image_file)
 app.route('/list/file/<int:arg_num>')(list_image_file)
@@ -879,10 +879,10 @@ app.route('/api/raw_exist/<everything:name>', defaults = { 'exist_check' : 'on'
 app.route('/api/raw_rev/<int(signed = True):rev>/<everything:name>')(api_w_raw)
 app.route('/api/raw/<everything:name>')(api_w_raw)
 
-app.route('/api/xref/<int:page>/<everything:name>')(api_w_xref)
-app.route('/api/xref_this/<int:page>/<everything:name>', defaults = { 'xref_type' : '2' })(api_w_xref)
+app.route('/api/xref/<int:page>/<everything:name>')(golang_view())
+app.route('/api/xref_this/<int:page>/<everything:name>')(golang_view())
 
-app.route('/api/random')(api_w_random)
+app.route('/api/random')(golang_view())
 
 app.route('/api/bbs/w/<sub_code>')(api_bbs_w)
 app.route('/api/bbs/w/comment/<sub_code>')(api_bbs_w_comment_exter)
@@ -891,70 +891,70 @@ app.route('/api/bbs/w/comment_one/<sub_code>')(api_bbs_w_comment_one_exter)
 app.route('/api/version', defaults = { 'version_list' : version_list })(api_version)
 app.route('/api/skin_info')(api_skin_info)
 app.route('/api/skin_info/<name>')(api_skin_info)
-app.route('/api/user_info/<user_name>')(api_user_info)
+app.route('/api/user_info/<user_name>')(golang_view())
 
 app.route('/api/thread/<int:topic_num>/<int:s_num>/<int:e_num>')(api_topic)
 app.route('/api/thread/<int:topic_num>/<tool>')(api_topic)
 app.route('/api/thread/<int:topic_num>')(api_topic)
 
-app.route('/api/search/<everything:name>')(api_func_search_exter)
-app.route('/api/search_page/<int:num>/<everything:name>')(api_func_search_exter)
-app.route('/api/search_data/<everything:name>', defaults = { 'search_type' : 'data' })(api_func_search_exter)
-app.route('/api/search_data_page/<int:num>/<everything:name>', defaults = { 'search_type' : 'data' })(api_func_search_exter)
+app.route('/api/search/<everything:name>')(golang_view())
+app.route('/api/search_page/<int:num>/<everything:name>')(golang_view())
+app.route('/api/search_data/<everything:name>', defaults = { 'search_type' : 'data' })(golang_view())
+app.route('/api/search_data_page/<int:num>/<everything:name>', defaults = { 'search_type' : 'data' })(golang_view())
 
-app.route('/api/recent_change')(api_list_recent_change_exter)
-app.route('/api/recent_changes')(api_list_recent_change_exter)
-app.route('/api/recent_change/<int:limit>')(api_list_recent_change_exter)
-app.route('/api/recent_change/<int:limit>/<set_type>/<int:num>')(api_list_recent_change_exter)
+app.route('/api/recent_change')(golang_view())
+app.route('/api/recent_changes')(golang_view())
+app.route('/api/recent_change/<int:limit>')(golang_view())
+app.route('/api/recent_change/<int:limit>/<set_type>/<int:num>')(golang_view())
 
 app.route('/api/recent_edit_request')(api_list_recent_edit_request_exter)
 app.route('/api/recent_edit_request/<int:limit>/<set_type>/<int:num>')(api_list_recent_edit_request_exter)
 
-app.route('/api/recent_discuss/<set_type>/<int:limit>')(api_list_recent_discuss)
-app.route('/api/recent_discuss/<int:limit>')(api_list_recent_discuss)
-app.route('/api/recent_discuss')(api_list_recent_discuss)
+app.route('/api/recent_discuss/<set_type>/<int:limit>')(golang_view())
+app.route('/api/recent_discuss/<int:limit>')(golang_view())
+app.route('/api/recent_discuss')(golang_view())
 
 app.route('/api/lang', methods = ['POST'])(api_func_language_exter)
 app.route('/api/lang/<data>')(api_func_language_exter)
-app.route('/api/sha224/<everything:data>')(api_func_sha224)
+app.route('/api/sha224/<everything:data>')(golang_view())
 app.route('/api/ip/<everything:data>')(api_func_ip)
 
 app.route('/api/image/<everything:name>')(api_image_view)
 
 ## v2 API
 app.route('/api/v2/recent_edit_request/<set_type>/<int:num>', defaults = { 'limit' : 50 })(api_list_recent_edit_request)
-app.route('/api/v2/recent_change/<set_type>/<int:num>', defaults = { 'legacy' : '', 'limit' : 50 })(api_list_recent_change_exter)
-app.route('/api/v2/recent_discuss/<set_type>/<int:num>', defaults = { 'legacy' : '', 'limit' : 50 })(api_list_recent_discuss)
-app.route('/api/v2/recent_block/<set_type>/<int:num>')(api_list_recent_block)
-app.route('/api/v2/recent_block/<set_type>/<int:num>/<everything:why>')(api_list_recent_block)
-app.route('/api/v2/recent_block_user/<set_type>/<int:num>/<user_name>')(api_list_recent_block)
-app.route('/api/v2/recent_block_user/<set_type>/<int:num>/<user_name>/<everything:why>')(api_list_recent_block)
-app.route('/api/v2/list/document/old/<int:num>', defaults = { 'set_type' : 'old' })(api_list_old_page_exter)
-app.route('/api/v2/list/document/new/<int:num>', defaults = { 'set_type' : 'new' })(api_list_old_page_exter)
-app.route('/api/v2/list/document/<int:num>')(api_list_title_index)
-app.route('/api/v2/list/auth')(api_list_auth)
-app.route('/api/v2/list/markup')(api_list_markup)
+app.route('/api/v2/recent_change/<set_type>/<int:num>')(golang_view())
+app.route('/api/v2/recent_discuss/<set_type>/<int:num>')(golang_view())
+app.route('/api/v2/recent_block/<set_type>/<int:num>')(golang_view())
+app.route('/api/v2/recent_block/<set_type>/<int:num>/<everything:why>')(golang_view())
+app.route('/api/v2/recent_block_user/<set_type>/<int:num>/<user_name>')(golang_view())
+app.route('/api/v2/recent_block_user/<set_type>/<int:num>/<user_name>/<everything:why>')(golang_view())
+app.route('/api/v2/list/document/old/<int:num>')(golang_view())
+app.route('/api/v2/list/document/new/<int:num>')(golang_view())
+app.route('/api/v2/list/document/<int:num>')(golang_view())
+app.route('/api/v2/list/auth')(golang_view())
+app.route('/api/v2/list/markup')(golang_view())
 app.route('/api/v2/list/acl/<data_type>')(api_list_acl)
-app.route('/api/v2/history/<int:num>/<set_type>/<everything:doc_name>')(api_list_history_exter)
+app.route('/api/v2/history/<int:num>/<set_type>/<everything:doc_name>')(golang_view())
 
-app.route('/api/v2/topic/<int:num>/<set_type>/<everything:name>')(api_topic_list)
+app.route('/api/v2/topic/<int:num>/<set_type>/<everything:name>')(golang_view())
 
-app.route('/api/v2/bbs')(api_bbs_list)
-app.route('/api/v2/bbs/main')(api_bbs_exter)
+app.route('/api/v2/bbs')(golang_view())
+app.route('/api/v2/bbs/main')(golang_view())
 app.route('/api/v2/bbs/set/<int:bbs_num>/<name>', methods = ['GET', 'PUT'])(api_bbs_w_set)
-app.route('/api/v2/bbs/in/<int:bbs_num>/<int:page>')(api_bbs_exter)
+app.route('/api/v2/bbs/in/<int:bbs_num>/<int:page>')(golang_view())
 
 app.route('/api/v2/bbs/w/<sub_code>', defaults = { 'legacy' : '' })(api_bbs_w)
-app.route('/api/v2/bbs/w/tabom/<sub_code>', methods = ['GET', 'POST'])(api_bbs_w_tabom)
+app.route('/api/v2/bbs/w/tabom/<sub_code>', methods = ['GET', 'POST'])(golang_view())
 app.route('/api/v2/bbs/w/comment/<sub_code>/<tool>', defaults = { 'legacy' : '' })(api_bbs_w_comment_exter)
 app.route('/api/v2/bbs/w/comment_one/<sub_code>/<tool>', defaults = { 'legacy' : '' })(api_bbs_w_comment_one_exter)
 
 app.route('/api/v2/bbs/w/page_view/<set_id>/<set_code>')(golang_view())
 app.route('/api/v2/bbs/w/page_view_post/<set_id>/<set_code>')(golang_view())
 
-app.route('/api/v2/doc_star_doc/<int:num>/<everything:name>', defaults = { 'do_type' : 'star_doc' })(api_w_watch_list)
-app.route('/api/v2/doc_watch_list/<int:num>/<everything:name>')(api_w_watch_list)
-app.route('/api/v2/set_reset/<everything:name>')(api_w_set_reset)
+app.route('/api/v2/doc_star_doc/<int:num>/<everything:name>', defaults = { 'do_type' : 'star_doc' })(golang_view())
+app.route('/api/v2/doc_watch_list/<int:num>/<everything:name>')(golang_view())
+app.route('/api/v2/set_reset/<everything:name>')(golang_view())
 
 app.route('/api/v2/page_view/<everything:name>')(golang_view())
 app.route('/api/v2/page_view_post/<everything:name>')(golang_view())
@@ -963,10 +963,10 @@ app.route('/api/v2/setting/<name>', methods = ['GET', 'PUT'])(api_setting_exter)
 
 app.route('/api/v2/auth')(api_func_auth_exter)
 app.route('/api/v2/auth/<user_name>')(api_func_auth_exter)
-app.route('/api/v2/auth/give', methods = ['PATCH'])(api_give_auth)
+app.route('/api/v2/auth/give', methods = ['PATCH'])(golang_view())
 
-app.route('/api/v2/user/rankup', methods = ['GET', 'PATCH'])(api_user_rankup)
-app.route('/api/v2/user/setting/editor', methods = ['GET', 'POST', 'DELETE'])(api_user_setting_editor)
+app.route('/api/v2/user/rankup', methods = ['GET', 'PATCH'])(golang_view())
+app.route('/api/v2/user/setting/editor', methods = ['GET', 'POST', 'DELETE'])(golang_view())
 
 app.route('/api/v2/ip/<everything:data>', methods = ['GET', 'POST'])(api_func_ip)
 app.route('/api/v2/ip_menu/<everything:ip>', defaults = { 'option' : 'user' }, methods = ['GET', 'POST'])(api_func_ip_menu)
@@ -1013,8 +1013,6 @@ app.route('/setting/skin_set', methods = ['POST', 'GET'])(main_setting_skin_set)
 app.route('/setting/404_page', methods = ['POST', 'GET'])(main_setting_404_page)
 app.route('/setting/email_test', methods = ['POST', 'GET'])(main_setting_email_test)
 
-app.route('/easter_egg')(main_func_easter_egg)
-
 # views -> view
 app.route('/view/<path:name>')(main_view)
 app.route('/views/<path:name>')(main_view)

+ 1 - 0
lang/en-US.json

@@ -66,6 +66,7 @@
     "r1" : "r1",
     "test" : "Test",
     "email_test" : "Send test email",
+    "length_doc" : "Length of document",
 
     "_comment_": "Common",
     "data": "Data",

+ 2 - 1
lang/ko-KR.json

@@ -713,5 +713,6 @@
     "random_list" : "랜덤 문서 목록",
     "test" : "테스트",
     "email_test" : "이메일 전송 테스트",
-    "r1" : "r1"
+    "r1" : "r1",
+    "length_doc" : "문서 길이"
 }

+ 1 - 30
route/__init__.py

@@ -1,6 +1,5 @@
 from route.api_image_view import api_image_view
 from route.api_skin_info import api_skin_info
-from route.api_user_info import api_user_info
 from route.api_version import api_version
 
 from route.bbs_w_edit import bbs_w_edit
@@ -37,10 +36,8 @@ from route.give_user_fix import give_user_fix
 from route.list_acl import list_acl
 from route.list_admin import list_admin
 from route.list_admin_auth_use import list_admin_auth_use
-from route.list_old_page import list_old_page
 from route.list_admin_group import list_admin_group
 from route.list_image_file import list_image_file
-from route.list_long_page import list_long_page
 from route.list_no_link import list_no_link
 from route.list_please import list_please
 from route.list_title_index import list_title_index
@@ -155,49 +152,23 @@ from route.n_bbs_w_set import bbs_w_set
 
 from route.n_edit_move_all import edit_move_all
 
-from route.go_api_func_llm import api_func_llm
 from route.go_api_func_language import api_func_language, api_func_language_exter
-from route.go_api_func_sha224 import api_func_sha224
 from route.go_api_func_ip import api_func_ip
 from route.go_api_func_ip_menu import api_func_ip_menu
 from route.go_api_func_auth import api_func_auth, api_func_auth_exter
 from route.go_api_func_email import api_func_email, api_func_email_exter
-from route.go_api_func_search import api_func_search, api_func_search_exter
 
-from route.go_api_give_auth import api_give_auth
-
-from route.go_api_list_recent_change import api_list_recent_change, api_list_recent_change_exter
-from route.go_api_list_recent_discuss import api_list_recent_discuss
-from route.go_api_list_recent_block import api_list_recent_block
 from route.go_api_list_recent_edit_request import api_list_recent_edit_request, api_list_recent_edit_request_exter
-from route.go_api_list_old_page import api_list_old_page, api_list_old_page_exter
-from route.go_api_list_title_index import api_list_title_index
 from route.go_api_list_acl import api_list_acl
-from route.go_api_list_auth import api_list_auth
-from route.go_api_list_markup import api_list_markup
-from route.go_api_list_history import api_list_history, api_list_history_exter
 
-from route.go_api_bbs import api_bbs, api_bbs_exter
-from route.go_api_bbs_list import api_bbs_list
 from route.go_api_bbs_w import api_bbs_w
 from route.go_api_bbs_w_set import api_bbs_w_set
-from route.go_api_bbs_w_tabom import api_bbs_w_tabom
 from route.go_api_bbs_w_comment import api_bbs_w_comment, api_bbs_w_comment_exter
 from route.go_api_bbs_w_comment_one import api_bbs_w_comment_one, api_bbs_w_comment_one_exter
 
 from route.go_api_setting import api_setting, api_setting_exter
 
 from route.go_api_topic import api_topic
-from route.go_api_topic_list import api_topic_list
-
-from route.go_api_user_rankup import api_user_rankup
-from route.go_api_user_setting_editor import api_user_setting_editor
 
 from route.go_api_w_raw import api_w_raw, api_w_raw_exter
-from route.go_api_w_random import api_w_random, api_w_random_exter
-from route.go_api_w_xref import api_w_xref
-from route.go_api_w_watch_list import api_w_watch_list
-from route.go_api_w_render import api_w_render, api_w_render_exter
-from route.go_api_w_set_reset import api_w_set_reset
-
-from route.go_main_func_easter_egg import main_func_easter_egg
+from route.go_api_w_render import api_w_render, api_w_render_exter

+ 0 - 79
route/api_user_info.py

@@ -1,79 +0,0 @@
-from .tool.func import *
-
-async def api_user_info(user_name = ''):
-    with get_db_connect() as conn:
-        curs = conn.cursor()
-
-        data_result = {}
-        
-        # name part
-        data_result['render'] = await ip_pas(user_name)
-        
-        # auth part
-        curs.execute(db_change("select data from user_set where id = ? and name = 'acl'"), [user_name])
-        db_data = curs.fetchall()
-        if db_data:
-            data_result['auth'] = db_data[0][0]
-        elif ip_or_user(user_name) == 1:
-            data_result['auth'] = 'ip'
-        else:
-            data_result['auth'] = 'user'
-
-        curs.execute(db_change("select data from user_set where id = ? and name = 'auth_date'"), [user_name])
-        db_data = curs.fetchall()
-        if db_data:
-            data_result['auth_date'] = db_data[0][0]
-        else:
-            data_result['auth_date'] = '0'
-
-        level_data = await level_check(user_name)
-        data_result['level'] = level_data[0]
-        data_result['exp'] = level_data[1]
-        data_result['max_exp'] = level_data[2]
-            
-        # ban part
-        ban = await ban_check(user_name)
-        if ban[0] == 0:
-            data_result['ban'] = '0'
-        else:
-            data_result['ban'] = ban
-        
-        # user document part
-        curs.execute(db_change("select title from data where title = ?"), ['user:' + user_name])
-        if curs.fetchall():
-            data_result['document'] = '1'
-        else:
-            data_result['document'] = '0'
-
-        # user title part
-        curs.execute(db_change('select data from user_set where name = "user_title" and id = ?'), [user_name])
-        db_data = curs.fetchall()
-        if db_data:
-            data_result['user_title'] = db_data[0][0]
-        else:
-            data_result['user_title'] = ''
-
-        lang_data_list = [
-            'user_name',
-            'authority',
-            'state',
-            'member',
-            'normal',
-            'blocked',
-            'type',
-            'regex',
-            'period',
-            'limitless',
-            'login_able',
-            'why',
-            'band_blocked',
-            'ip',
-            'ban',
-            'level',
-            'option',
-            'edit_request_able',
-            'cidr'
-        ]
-        lang_data = { for_a : await get_lang(for_a) for for_a in lang_data_list }
-                
-        return flask.jsonify({ 'data' : data_result, 'language' : lang_data })

+ 0 - 11
route/go_api_bbs.py

@@ -1,11 +0,0 @@
-from .tool.func import *
-
-async def api_bbs(bbs_num = "", page = 1):
-    other_set = {}
-    other_set["bbs_num"] = str(bbs_num)
-    other_set["page"] = str(page)
-
-    return await python_to_golang(sys._getframe().f_code.co_name, other_set)
-
-async def api_bbs_exter(bbs_num = "", page = 1):
-    return flask.jsonify(await api_bbs(bbs_num, page))

+ 0 - 4
route/go_api_bbs_list.py

@@ -1,4 +0,0 @@
-from .tool.func import *
-
-async def api_bbs_list():
-    return flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name))

+ 0 - 11
route/go_api_bbs_w_tabom.py

@@ -1,11 +0,0 @@
-from .tool.func import *
-
-async def api_bbs_w_tabom(sub_code = ''):
-    other_set = {}
-    other_set["sub_code"] = sub_code
-
-    func_name = sys._getframe().f_code.co_name
-    if flask.request.method == 'POST':
-        func_name += '_post'
-
-    return flask.jsonify(await python_to_golang(func_name, other_set))

+ 0 - 10
route/go_api_func_llm.py

@@ -1,10 +0,0 @@
-from .tool.func import *
-
-async def api_func_llm():
-    if flask.request.method == 'POST':
-        other_set = {}
-        other_set["prompt"] = flask.request.form.get('prompt', '')
-
-        return flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name, other_set))
-    else:
-        return flask.jsonify({})

+ 0 - 12
route/go_api_func_search.py

@@ -1,12 +0,0 @@
-from .tool.func import *
-
-async def api_func_search(name = 'Test', search_type = 'title', num = 1):
-    other_set = {}
-    other_set["name"] = name
-    other_set["search_type"] = search_type
-    other_set["num"] = str(num)
-
-    return await python_to_golang(sys._getframe().f_code.co_name, other_set)
-
-async def api_func_search_exter(name = 'Test', search_type = 'title', num = 1):
-    return flask.jsonify(await api_func_search(name, search_type, num))

+ 0 - 7
route/go_api_func_sha224.py

@@ -1,7 +0,0 @@
-from .tool.func import *
-
-async def api_func_sha224(data = 'Test'):
-    other_set = {}
-    other_set["data"] = data
-
-    return flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name, other_set))

+ 0 - 15
route/go_api_give_auth.py

@@ -1,15 +0,0 @@
-from .tool.func import *
-
-async def api_give_auth():
-    if flask.request.method == 'PATCH':
-        func_name = sys._getframe().f_code.co_name
-        func_name += '_patch'
-
-        other_set = {}
-        other_set["user_name"] = flask.request.form.get('user_name', '')
-        other_set['auth'] = flask.request.form.get('auth', '')
-        other_set['change_auth'] = flask.request.form.get('change_auth', '')
-
-        return flask.jsonify(await python_to_golang(func_name, other_set))
-    else:
-        return flask.jsonify({}) 

+ 0 - 6
route/go_api_list_auth.py

@@ -1,6 +0,0 @@
-from .tool.func import *
-
-async def api_list_auth():
-    other_set = {}
-
-    return flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name, other_set))

+ 0 - 12
route/go_api_list_history.py

@@ -1,12 +0,0 @@
-from .tool.func import *
-
-async def api_list_history(num = 1, set_type = 'normal', doc_name = 'Test'):
-    other_set = {}
-    other_set["num"] = str(num)
-    other_set["doc_name"] = doc_name
-    other_set["set_type"] = set_type
-    
-    return await python_to_golang(sys._getframe().f_code.co_name, other_set)
-
-async def api_list_history_exter(num = 1, set_type = 'normal', doc_name = 'Test'):
-    return flask.jsonify(await api_list_history(num, set_type, doc_name))

+ 0 - 4
route/go_api_list_markup.py

@@ -1,4 +0,0 @@
-from .tool.func import *
-
-async def api_list_markup():
-    return flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name))

+ 0 - 11
route/go_api_list_old_page.py

@@ -1,11 +0,0 @@
-from .tool.func import *
-
-async def api_list_old_page(num = 1, set_type = 'old'):
-    other_set = {}
-    other_set["num"] = str(num)
-    other_set["set_type"] = set_type
-
-    return await python_to_golang(sys._getframe().f_code.co_name, other_set)
-
-async def api_list_old_page_exter(num = 1, set_type = 'old'):
-    return flask.jsonify(await api_list_old_page(num, set_type))

+ 0 - 10
route/go_api_list_recent_block.py

@@ -1,10 +0,0 @@
-from .tool.func import *
-
-async def api_list_recent_block(num = 1, set_type = 'all', user_name = 'Test', why = ''):
-    other_set = {}
-    other_set["num"] = str(num)
-    other_set["set_type"] = set_type
-    other_set["user_name"] = user_name
-    other_set["why"] = why
-
-    return flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name, other_set))

+ 0 - 19
route/go_api_list_recent_change.py

@@ -1,19 +0,0 @@
-from .tool.func import *
-
-async def api_list_recent_change(num = 1, set_type = 'normal', limit = 10, legacy = 'on'):
-    other_set = {}
-    other_set["num"] = str(num)
-    other_set["limit"] = str(limit)
-    other_set["type"] = set_type
-    other_set["legacy"] = legacy
-
-    return await python_to_golang(sys._getframe().f_code.co_name, other_set)
-
-async def api_list_recent_change_exter(num = 1, set_type = 'normal', limit = 10, legacy = 'on'):
-    response = flask.make_response(flask.jsonify(await api_list_recent_change(num, set_type, limit, legacy)))
-    
-    response.headers.add("Access-Control-Allow-Origin", "*")
-    response.headers.add('Access-Control-Allow-Headers', "Content-Type")
-    response.headers.add('Access-Control-Allow-Methods', "GET")
-
-    return response

+ 0 - 16
route/go_api_list_recent_discuss.py

@@ -1,16 +0,0 @@
-from .tool.func import *
-
-async def api_list_recent_discuss(num = 1, set_type = 'normal', limit = 10, legacy = 'on'):
-    other_set = {}
-    other_set["num"] = str(num)
-    other_set["limit"] = str(limit)
-    other_set["set_type"] = set_type
-    other_set["legacy"] = legacy
-
-    response = flask.make_response(flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name, other_set)))
-    
-    response.headers.add("Access-Control-Allow-Origin", "*")
-    response.headers.add('Access-Control-Allow-Headers', "Content-Type")
-    response.headers.add('Access-Control-Allow-Methods', "GET")
-
-    return response

+ 0 - 7
route/go_api_list_title_index.py

@@ -1,7 +0,0 @@
-from .tool.func import *
-
-async def api_list_title_index(num = 1):
-    other_set = {}
-    other_set["num"] = str(num)
-
-    return flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name, other_set))

+ 0 - 9
route/go_api_topic_list.py

@@ -1,9 +0,0 @@
-from .tool.func import *
-
-async def api_topic_list(name = 'Test', set_type = 'normal', num = 1):
-    other_set = {}
-    other_set["name"] = str(name)
-    other_set["set_type"] = set_type
-    other_set["num"] = str(num)
-
-    return flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name, other_set))

+ 0 - 10
route/go_api_user_rankup.py

@@ -1,10 +0,0 @@
-from .tool.func import *
-
-async def api_user_rankup():
-    other_set = {}
-    
-    func_name = sys._getframe().f_code.co_name
-    if flask.request.method == 'PATCH':
-        func_name += '_patch'
-
-    return flask.jsonify(await python_to_golang(func_name, other_set))

+ 0 - 14
route/go_api_user_setting_editor.py

@@ -1,14 +0,0 @@
-from .tool.func import *
-
-async def api_user_setting_editor():
-    other_set = {}
-    
-    func_name = sys._getframe().f_code.co_name
-    if flask.request.method == 'POST':
-        func_name += '_post'
-        other_set['data'] = flask.request.form.get('data', 'Test')
-    elif flask.request.method == 'DELETE':
-        func_name += '_delete'
-        other_set['data'] = flask.request.form.get('data', 'Test')
-
-    return flask.jsonify(await python_to_golang(func_name, other_set))

+ 0 - 7
route/go_api_w_random.py

@@ -1,7 +0,0 @@
-from .tool.func import *
-
-async def api_w_random():
-    return await python_to_golang(sys._getframe().f_code.co_name)
-
-async def api_w_random_exter():
-    return flask.jsonify(await api_w_random())

+ 0 - 7
route/go_api_w_set_reset.py

@@ -1,7 +0,0 @@
-from .tool.func import *
-
-async def api_w_set_reset(name = 'Test'):
-    other_set = {}
-    other_set["name"] = name
-
-    return flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name, other_set))

+ 0 - 9
route/go_api_w_watch_list.py

@@ -1,9 +0,0 @@
-from .tool.func import *
-
-async def api_w_watch_list(name = 'Test', do_type = 'watch_list', num = 1):
-    other_set = {}
-    other_set["name"] = name
-    other_set["do_type"] = do_type
-    other_set["num"] = str(num)
-
-    return flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name, other_set))

+ 0 - 9
route/go_api_w_xref.py

@@ -1,9 +0,0 @@
-from .tool.func import *
-
-async def api_w_xref(name = 'Test', page = 1, xref_type = '1'):
-    other_set = {}
-    other_set["name"] = name
-    other_set["page"] = str(page)
-    other_set["do_type"] = xref_type
-
-    return flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name, other_set))

+ 0 - 20
route/go_main_func_easter_egg.py

@@ -1,20 +0,0 @@
-from .tool.func import *
-
-async def main_func_easter_egg():
-    with get_db_connect() as conn:
-        curs = conn.cursor()
-
-        ip = ip_check()
-        if ip_or_user(ip) == 0:
-            curs.execute(db_change('select name from user_set where id = ? and name = ?'), [ip, 'get_🥚'])
-            if not curs.fetchall():
-                curs.execute(db_change('insert into user_set (name, id, data) values ("get_🥚", ?, "Y")'), [ip])
-    
-        data = ''
-
-        return await render_template(
-            'Easter Egg',
-            data,
-            0,
-            0
-        )

+ 0 - 33
route/list_long_page.py

@@ -1,33 +0,0 @@
-from .tool.func import *
-
-async def list_long_page(tool = 'long_page', arg_num = 1):
-    with get_db_connect() as conn:
-        curs = conn.cursor()
-
-        sql_num = (arg_num * 50 - 50) if arg_num * 50 > 0 else 0
-
-        div = '<ul>'
-        select_data = 'desc' if tool == 'long_page' else 'asc'
-        title = 'long_page' if tool == 'long_page' else 'short_page'
-
-        curs.execute(db_change("select doc_name, set_data from data_set where set_name = 'length' and doc_rev = '' order by set_data + 0 " + select_data + " limit ?, 50"), [sql_num])
-        n_list = curs.fetchall()
-        for data in n_list:
-            div += '<li>'
-            div += data[1] + ' | <a href="/w/' + url_pas(data[0]) + '">' + html.escape(data[0]) + '</a>'
-            
-            curs.execute(db_change("select set_data from data_set where doc_name = ? and set_name = 'doc_type'"), [data[0]])
-            db_data = curs.fetchall()
-            if db_data and db_data[0][0] != '':
-                div += ' | ' + db_data[0][0]
-
-            div += '</li>'
-
-        div += '</ul>' + await get_next_page_bottom('/list/document/' + ('long' if title == 'long_page' else 'short') + '/{}', arg_num, n_list)
-
-        return await render_template(
-            await get_lang(title),
-            div,
-            0,
-            [['other', await get_lang('return')]]
-        )

+ 0 - 33
route/list_old_page.py

@@ -1,33 +0,0 @@
-from .tool.func import *
-
-from .go_api_list_old_page import api_list_old_page
-
-async def list_old_page(num = 1, set_type = 'old'):
-    with get_db_connect() as conn:
-        title = ''
-        if set_type == 'old':
-            title = await get_lang('old_page')
-        else:
-            title = await get_lang('new_page')
-
-        data = await api_list_old_page(num, set_type)
-        data = data["data"]
-
-        data_html = ''
-
-        for for_a in range(len(data)):
-            doc_name_encoded = url_pas(data[for_a][0])
-            doc_title_filtered = html.escape(data[for_a][0])
-
-            right = f'<a href="/w/{doc_name_encoded}">{doc_title_filtered}</a> '
-
-            data_html += await opennamu_make_list(right, data[for_a][1])
-
-        data_html += await get_next_page_bottom(f'/list/document/{set_type}/{{}}', int(num), data)
-
-        return await render_template(
-            title,
-            data_html,
-            0,
-            [['other', await get_lang('return')]]
-        )

+ 4 - 1
route/tool/func.py

@@ -101,7 +101,7 @@ if sys.version_info < (3, 6):
 
 # Func
 # Func-main
-async def render_template(name, data, sub, menu, other = []):
+async def render_template(name, data, sub, menu, other = [], option = {}):
     other_set = {}
     other_set["name"] = name
     other_set["data"] = data
@@ -111,6 +111,9 @@ async def render_template(name, data, sub, menu, other = []):
         "path" : flask.request.path
     }
 
+    for for_a in option:
+        other_set["option"][for_a] = option[for_a]
+
     return await python_to_golang("post", other_set = other_set, path = "template")
 
 global_lang_data = {}

+ 5 - 0
route/view_w.py

@@ -186,12 +186,14 @@ async def view_w(name = 'Test', do_type = '', doc_rev = ''):
 
         # print([name, doc_data, doc_rev])
 
+        length_doc_data = 0
         if doc_data["response"] == "ok":
             render_data = await api_w_render(name, request_method = 'POST', request_data = {
                 'name' : name,
                 'data' : doc_data["data"]
             })
             end_data = render_data["data"] + '<script>document.addEventListener("DOMContentLoaded", function() {' + render_data["js_data"] + '});</script>'
+            length_doc_data = len(doc_data["data"])
         else:
             end_data = ''
 
@@ -375,4 +377,7 @@ async def view_w(name = 'Test', do_type = '', doc_rev = ''):
             sub,
             menu,
             [r_date, watch_list, description, view_count],
+            {
+                "length_doc" : str(length_doc_data),
+            }
         ), response_data

+ 3 - 3
version.json

@@ -1,6 +1,6 @@
 {
-    "r_ver" : "v3.6.0-Beta-v53",
-    "c_ver" : "20250525",
+    "r_ver" : "v3.6.0-Beta-v54",
+    "c_ver" : "20250526",
     "s_ver" : "20240426",
-    "bin_link" : "https://github.com/openNAMU/GopenNAMU/releases/download/v2025-12-07-Beta-v11/"
+    "bin_link" : "https://github.com/openNAMU/GopenNAMU/releases/download/v2025-12-07-Beta-v12/"
 }

+ 3 - 0
views/ringo/index.html

@@ -197,6 +197,9 @@
                         {% if view_count != 0 %}
                             | {{'page_view'|load_lang}} : {{view_count}}
                         {% endif %}
+                        {% if length_doc != "" %}
+                            | {{'length_doc'|load_lang}} : {{length_doc}}
+                        {% endif %}
                     {% endif %}
                     {% if menu != 0 %}
                         <div id="menu">