diff --git a/SuperScriptViewer/CustomConfig.py b/SuperScriptViewer/CustomConfig.py index 4201536..ef448ea 100644 --- a/SuperScriptViewer/CustomConfig.py +++ b/SuperScriptViewer/CustomConfig.py @@ -1,10 +1,18 @@ import locale -# encoding list -# https://docs.python.org/3/library/codecs.html#standard-encodings -database_encoding = locale.getpreferredencoding() -export_db = "export.db" -decorated_db = "decorate.db" -env_db = "env.db" -force_regenerate = False +class DatabaseType: + SQLite = 0 + MySQL = 1 + +database_type = DatabaseType.SQLite +sqlite_path = "decorated.db" + +''' +database_type = DatabaseType.MySQL +mysql_url = "http://yyc.bkt.moe:10000" +mysql_username = "test" +mysql_password = "test" +mysql_database = "test_database" +''' + debug_mode = False diff --git a/SuperScriptViewer/Database.py b/SuperScriptViewer/Database.py new file mode 100644 index 0000000..029bbb4 --- /dev/null +++ b/SuperScriptViewer/Database.py @@ -0,0 +1,11 @@ +import CustomConfig + +class EmptyDatabase: + def __init__(self): + pass + +def CreateDatabase(): + return EmptyDatabase() + +def CloseDatabase(db): + pass diff --git a/SuperScriptViewer/ServerCore.py b/SuperScriptViewer/ServerCore.py index 66c5701..3af5d29 100644 --- a/SuperScriptViewer/ServerCore.py +++ b/SuperScriptViewer/ServerCore.py @@ -1,4 +1,5 @@ import CustomConfig +import Database from flask import Flask from flask import g @@ -8,228 +9,93 @@ from flask import request from flask import abort from flask import redirect -from functools import reduce -import sqlite3 -import json -import ServerStruct as ss - app = Flask(__name__) # =============================================database def get_db(): db = getattr(g, '_database', None) if db is None: - db = g._database = sqlite3.connect(CustomConfig.decorated_db) + db = g._database = Database.CreateDatabase() return db -def get_env(): - env = getattr(g, '_envDatabase', None) - if env is None: - env = g._envDatabase = sqlite3.connect(CustomConfig.env_db) - env.text_factory = lambda x: x.decode(CustomConfig.database_encoding, errors="ignore") - return env - @app.teardown_appcontext def close_connection(exception): db = getattr(g, '_database', None) if db is not None: - db.close() - -# =============================================template func -@app.template_global(name = 'pinDecoder') -def block_pin_decoder(target): - return json.loads(target) - -@app.template_global(name = 'pinDecoder2') -def block_pin_decoder2(target): - vab = json.loads(target) - return [vab['name'], vab['type']] + Database.CloseDatabase(db) # =============================================route # =========== default @app.route('/', methods=['GET']) -def nospecHandle(): - return redirect(url_for('indexHandle')) +def handle_nospec(): + return redirect(url_for('handle_index')) -# =========== misc page - -@app.route('/help', methods=['GET']) -def helpMainHandle(): - return render_template("help.html") - -@app.route('/about', methods=['GET']) -def aboutHandle(): - return render_template("about.html", static_icon = url_for('static', filename='icon.png')) - -# =========== help page - -@app.route('/help/', methods=['GET']) -def helpHandle(scriptPath): - if scriptPath == 'converter': - return render_template("help/converter.html", - tabcontrol_css = url_for('static', filename='tabcontrol.css'), - tabcontrol_js = url_for('static', filename='tabcontrol.js'), - converter_js = url_for('static', filename='converter.js')) - elif scriptPath == 'env': - return render_template("help/env.html", - tabcontrol_css = url_for('static', filename='tabcontrol.css'), - tabcontrol_js = url_for('static', filename='tabcontrol.js'), - env_js = url_for('static', filename='env.js'), - env_css = url_for('static', filename='env.css'), - database_data = ss.envDatabaseList) - elif scriptPath == 'legend': - return render_template("help/legend.html") - else: - abort(404) - -@app.route('/help/env', methods=['POST']) -def envQueryHandle(): - basicReturn = { - "status": False, - "overflow": False, - "data": [] - } - - # check tag - queryTag = request.form['tag']; - if queryTag not in ss.legalEnvQueryKey: - return basicReturn - - cur = get_env().cursor() - #try: - readyData = json.loads(request.form['data']) - fieldLength = len(readyData.keys()) - if fieldLength == 0: - cur.execute("SELECT * FROM {}".format(queryTag)) - else: - whereStatement = 'AND'.join(map(lambda x: "([" + x + "] = ?)", readyData.keys())) - cur.execute("SELECT * FROM {} WHERE ({})".format(queryTag, whereStatement), list(readyData.values())) - - # iterate - counter = 0 - for i in cur.fetchall(): - if counter == 100: - basicReturn['overflow'] = True - break - basicReturn['data'].append(i) - counter+=1 - - basicReturn['status'] = True - #except Exception as ex: - # basicReturn['status'] = False - # basicReturn['overflow'] = False - # basicReturn['data'] = [] - - return basicReturn - -# =========== index +# =========== basic pages @app.route('/index', methods=['GET']) -def indexHandle(): - cur = get_db().cursor() - cur.execute("SELECT [graph], [graph_name], [belong_to] FROM graph WHERE [index] != -1 ORDER BY [belong_to], [index] ASC;") - data = {} - for i in cur.fetchall(): - if i[2] not in data.keys(): - data[i[2]] = [ss.ScriptItem(i[1], i[0])] - else: - data[i[2]].append(ss.ScriptItem(i[1], i[0])) +def handle_index(): + return app.send_static_file("html/index.html") - return render_template('index.html', scripts = data) +@app.route('/script', methods=['GET']) +def handle_script(): + return redirect(url_for('handle_index')) + +@app.route('/array', methods=['GET']) +def handle_array(): + return redirect(url_for('handle_index')) + +@app.route('/environment', methods=['GET']) +def handle_environment(): + return redirect(url_for('handle_index')) + +@app.route('/help', methods=['GET']) +def handle_help(): + return app.send_static_file("html/help.html") + +@app.route('/about', methods=['GET']) +def handle_about(): + return app.send_static_file("html/about.html") + +# =========== viewer +# script and array should have at least 2 items splitted by slash(/) +# the first one is document id and the second one is the real CK_ID of viewing object. +# however, environment do not have this, environment only allow one item, the id of environment. + +@app.route('/script/', methods=['GET']) +def handle_script_viewer(script_path): + # check invalid url + if len(script_path.split('/')) < 2: + return redirect(url_for('handle_index')) + return app.send_static_file("html/viewer_script.html") + +@app.route('/array/', methods=['GET']) +def handle_array_viewer(array_path): + # check invalid url + if len(script_path.split('/')) < 2: + return redirect(url_for('handle_index')) + return app.send_static_file("html/viewer_array.html") + +@app.route('/environment/', methods=['GET']) +def handle_environment_viewer(environment_path): + # check invalid url + if len(script_path.split('/')) > 1: + return redirect(url_for('handle_index')) + return app.send_static_file("html/viewer_environment.html") # =========== viewer -@app.route('/viewer/', methods=['GET']) -def viewerHandle(scriptPath): - - # comput hamburger - pathSlice = scriptPath.split('/') - cur = get_db().cursor() - cur.execute("SELECT [graph], [graph_name] FROM graph WHERE [graph] IN ({});".format(','.join(pathSlice))) - hamburgerMap = {} - hamburger = [] - for i in cur.fetchall(): - hamburgerMap[str(i[0])] = i[1] - currentHamburger = hamburgerMap[pathSlice[-1]] - - for i in range(len(pathSlice) - 1): - hamburger.append(ss.HamburgerItem(hamburgerMap[pathSlice[i]], reduce(lambda x,y: x + '/' + y, pathSlice[0:i + 1], ''))) - - # gei w/h - cur.execute('SELECT [width], [height] FROM graph WHERE [graph] == ?', (pathSlice[-1], )) - cache = cur.fetchone() - width = cache[0] - height = cache[1] - - # get blocks - cur.execute('SELECT * FROM block WHERE [belong_to_graph] == ?', (pathSlice[-1], )) - dbBlocks = cur.fetchall() - - # get cells - cur.execute("SELECT * FROM cell WHERE [belong_to_graph] == ?", (pathSlice[-1], )) - dbCells = cur.fetchall() - - # get links - cur.execute("SELECT * FROM link WHERE [belong_to_graph] == ?", (pathSlice[-1], )) - dbLinks = cur.fetchall() - - # render - return render_template('viewer.html', - currentPath = scriptPath, - gWidth = width, - gHeight = height, - hamburgerHistory = hamburger, - viewer_css = url_for('static', filename='viewer.css'), - tabcontrol_css = url_for('static', filename='tabcontrol.css'), - viewer_js = url_for('static', filename='viewer.js'), - tabcontrol_js = url_for('static', filename='tabcontrol.js'), - hamburgerCurrent = currentHamburger, - blocks = dbBlocks, - cells = dbCells, - links = dbLinks) - -@app.route('/viewer/', methods=['POST']) -def actionHandle(scriptPath): - cache = request.form['operation'] - if cache == "info": - return infoHandle(request.form['target'], request.form['tag']) - elif cache == "move": - return moveHandle(request.form['target']) - else: - abort(400) - -def infoHandle(target, tag): - cur = get_db().cursor() - - data = {} - existedSet = set() - if tag == '0': - # call from cell - cur.execute("SELECT * FROM info WHERE [target] == ?", (target, )) - elif tag == '1': - # call from bb - cur.execute("SELECT * FROM info WHERE [attach_bb] == ?", (target, )) - else: - return {} - # get data - for i in cur.fetchall(): - if i[0] in existedSet: - data[i[0]]['data'].append((i[4], i[5])) - else: - existedSet.add(i[0]) - data[i[0]] = { - 'name': i[3], - 'is_setting': True if i[2] != 0 else False, - 'data': [(i[4], i[5])] - } - - return data - -def moveHandle(target): - return {} +@app.route('/api/index/getList', methods=['POST']) +def handle_api_index_getList(scriptPath): + return { + "document": [], + "script": [], + "array": [], + "environment": [] + } +# =========== startup def run(): app.run() \ No newline at end of file diff --git a/SuperScriptViewer/ServerStruct.py b/SuperScriptViewer/ServerStruct.py deleted file mode 100644 index 37b5caa..0000000 --- a/SuperScriptViewer/ServerStruct.py +++ /dev/null @@ -1,82 +0,0 @@ -class ScriptItem(object): - def __init__(self, name, id): - self.name = name - self.id = id - -class HamburgerItem(object): - def __init__(self, name, path): - self.name = name - self.path = path - -envDatabaseList = ( - {"name": "Attribute", - "queryKey": "attr", - "data": (("index", "0", "(Integer) Attribute index"), - ("name", "Floor", "(String) Attribute name"), - ("category_index", "0", "(Integer) The category index of this attribute"), - ("category_name", "3DXML", "(String) The category name of this attribute"), - ("flags", "44", "(Integer) Attribute flags"), - ("param_index", "85", "(Integer) Corresponding parameter index"), - ("compatible_classid", "41", "(Integer) Compatible class id"), - ("default_id", "1;NULL", "(String) Default value"))}, - {"name": "Message", - "queryKey": "msg", - "data": (("index", "0", "(Integer) Message index"), - ("name", "OnClick", "(String) Message name"))}, - {"name": "Operation", - "queryKey": "op", - "data": (("funcptr", "615841344", "(Integer) Operation function memory location"), - ("in1_guid", "1910468930,-1003023558", "(String) Input parameter 1 guid"), - ("in2_guid", "-1411304621,-1568456412", "(String) Input parameter 2 guid"), - ("out_guid", "450177678,1584666912", "(String) Output parameter guid"), - ("op_guid", "869034825,898181163", "(String) Operation guid"), - ("op_name", "Addition", "(String) Operation name"), - ("op_code", "51", "(Integer) Operation code"))}, - {"name": "Parameter", - "queryKey": "param", - "data": (("index", "0", "(Integer) Parameter index"), - ("guid", "481363808,1100959941", "(String) Parameter guid"), - ("derived_from", "0,0", "(String) The parameter guid deriving this parameter"), - ("type_name", "None", "(String) Parameter name"), - ("default_size", "4", "(Integer) Default size"), - ("func_CreateDefault", "604002966", "(Integer) CreateDefault function memory location"), - ("func_Delete", "604003366", "(Integer) Delete function memory location"), - ("func_SaveLoad", "603996047", "(Integer) SaveLoad function memory location"), - ("func_Check", "0", "(Integer) Check function memory location"), - ("func_Copy", "604002468", "(Integer) Copy function memory location"), - ("func_String", "0", "(Integer) String function memory location"), - ("func_UICreator", "619055248", "(Integer) UICreator function memory location"), - ("creator_dll_index", "-1", "(Integer) The id of the dll defining this parameter"), - ("creator_plugin_index", "-1", "(Integer) The id of the plugin defining this parameter"), - ("dw_param", "0", "(Integer) An application reserved DWORD for placing parameter type specific data"), - ("dw_flags", "133", "(Integer) Flags specifying special settings for this parameter type"), - ("cid", "0", "(Integer) Special case for parameter types that refer to CKObjects => corresponding class ID of the object"), - ("saver_manager", "1181355948,0", "(String) Int Manager guid"))}, - {"name": "Plugin", - "queryKey": "plugin", - "data": (("dll_index", "18", "(Integer) Dll index"), - ("dll_name", "E:\\Virtools\\Plugins\\ImageReader.dll", "(String) Dll name"), - ("plugin_index", "2", "(Integer) Plugin index"), - ("category", "Bitmap Readers", "(String) Plugin category"), - ("active", "1", "(Integer) For manager and Render engines TRUE if a manager was created, for other plugins this value is not used"), - ("needed_by_file", "0", "(Integer) When saving a file TRUE if at least one object needs this plugin"), - ("guid", "1632248895,1132147523", "(String) Plugin guid"), - ("desc", "Windows Bitmap", "(String) Plugin description"), - ("author", "Virtools", "(String) Plugin author"), - ("summary", "Windows Bitmap", "(String) Plugin summary"), - ("version", "1", "(Integer) Plugin version"), - ("func_init", "103354496", "(Integer) Init function memory location"), - ("func_exit", "624432336", "(Integer) Exit function memory location"))}, - {"name": "Variable", - "queryKey": "variable", - "data": (("name", "3D XML/ExportVersion", "(String) Variable name"), - ("description", "Version of exported 3DXML", "(String) Variable description"), - ("flags", "4", "(Integer) Variable flags"), - ("type", "1", "(Integer) Variable type"), - ("representation", "enum:0= 3DXML 3.0; 1= 3DXML 4.0", "(String) The representation (ie the input format) of a variable type"), - ("data", " 3DXML 3.0", "(String) Variable data"))} -) - -legalEnvQueryKey = list(map(lambda x: x['queryKey'], envDatabaseList)) - - diff --git a/SuperScriptViewer/static/env.css b/SuperScriptViewer/static/css/env.css similarity index 100% rename from SuperScriptViewer/static/env.css rename to SuperScriptViewer/static/css/env.css diff --git a/SuperScriptViewer/static/css/global.css b/SuperScriptViewer/static/css/global.css new file mode 100644 index 0000000..1fbdc5c --- /dev/null +++ b/SuperScriptViewer/static/css/global.css @@ -0,0 +1,16 @@ +body { + background: silver; + font-size: 1rem; +} + +div.simple-menu { + display: flex; + flex-flow: row; +} +div.simple-menu > p { + margin: 5px; +} + +h1 { + margin: 0; +} diff --git a/SuperScriptViewer/static/tabcontrol.css b/SuperScriptViewer/static/css/tabcontrol.css similarity index 100% rename from SuperScriptViewer/static/tabcontrol.css rename to SuperScriptViewer/static/css/tabcontrol.css diff --git a/SuperScriptViewer/static/viewer.css b/SuperScriptViewer/static/css/viewer.css similarity index 100% rename from SuperScriptViewer/static/viewer.css rename to SuperScriptViewer/static/css/viewer.css diff --git a/SuperScriptViewer/static/html/about.html b/SuperScriptViewer/static/html/about.html new file mode 100644 index 0000000..d3b3200 --- /dev/null +++ b/SuperScriptViewer/static/html/about.html @@ -0,0 +1,39 @@ + + + + + + About - SuperScriptMaterializer + + + + + + + + + +

Super Script Materializer

+

There are no secret script behind Virtools. Super Script Materializer will destroy all locks and show you the real code.
+But Super Script Materializer only show you code. It couldn't analyse the result and touch author's heart and intention. This is your work.
+So, let we crack all scripts and destroy close-source illusion.

+ +

SuperScriptMaterializer. All codes are under GPLv3.
+Web frontend is powered by gulp, jQuery, JsRender/JsViews and 98.css.
+Web backend is powered by Flask.
+Ancestor projects: BearKidsTeam/VirtoolsScriptDeobfuscation and BearKidsTeam/Script-Materializer.
+Thank chirs241097 and 2jjy.
+Icon is created by ShadowPower via diffusion.

+ +

Super Script Materializer version: 2.0

+ +
+

Hierarchy

+

|

+

Help

+

|

+

About

+
+ + + \ No newline at end of file diff --git a/SuperScriptViewer/static/html/help.html b/SuperScriptViewer/static/html/help.html new file mode 100644 index 0000000..1a926ee --- /dev/null +++ b/SuperScriptViewer/static/html/help.html @@ -0,0 +1,173 @@ + + + + + + Help - SuperScriptMaterializer + + + + + + + + + +

Help Center

+
+

Hierarchy

+

|

+

Help

+

|

+

About

+
+

This page is help center, providing useful link for some detailed help page. Choose what you want to use and enter corresponding tabs.

+ +
+ + + + + + +
+ +

Layout

+

In viewer page, it can be divided into 3 panels:

+ + + + + + + + +
Navigation panelInformation & tools panel
Graph panel
+
    +
  • Navigation panel: Display current script's hierarchy. And you can click all layers which located in this panel to jump into it.
  • +
  • Information & tools panel: Provide property data, display configuration and some useful tools.
  • +
  • Graph panel: Core panel. Display current browsing behavior graph's data. Some legend will be desscribe in the follwing sector.
  • +
+ +

Graph legend

+

Block

+
+
+
+
pLocal (including arrtibute) (ParameterLocal abbr.)
+
+
+
+
Shortcut (Only shortcut output)
+
+
+
+
bIn / bOut (BehaviorIn / BehaviorOut abbr.)
+
+
+
+
pIn / pOut (ParameterIn / ParameterOut abbr.)
+
+
+
+
pTarget (ParameterTarget abbr.)
+
+
+ + +

Building block

+ +

Building block (abbr. BB)

+

All building block can be devided into 2 types: prototype building block and behavior graph

+ +
+
+ +
+
+
+
+
+
+
+ +

Get Cell

+

Get Cell

+
+
+

This is a typical prototype building block. Some port are attached into this building block.
+ pIn and pTarget are at the top, pOut are at the bottom, bIn are on the left, and bOut are on the right.
+ In the middle of building block, the name of this building block is written in black font, and the name of this building block's prototype is written in white font.

+ +
+
+ +
+
+
+
+
+
+
+
+
+ +

vt2obj

+

+
+
+

This is a typical behavior graph. It is very similar to prototype building block.
+ It don't have the name of prototype. Instead, you can click on the name to see what is inside this graph(jump into this graph).

+ +

Link

+ + + + 0 + bLink (BehaviorLink) + + pLink (ParameterLink) + + eLink (ExportParameterLink) + + + 0 + Highlight bLink + + Highlight pLink + + Highlight eLink + + +

Operation

+
    +
  • You can highlight the associated links by clicking Block or BB, and click again to cancel the highlight.
  • +
  • You can double-click Block or prototoye BB to get the properties associated with it.
  • +
  • You can hover over the Block to view its name and type through tooltip.
  • +
+ +

Properties

+

Properties can be visited in Information & tools panel. It can display the information of the object currently being double-clicked.

+ +
+

SRectangle/Box Mode(176)

+

dump.data

+
0x01, 0x00, 0x00, 0x00
+

dump.length

+
4
+
+

This is a typical property unit. You may see more than 1 property unit in property list. A property unit may contain more than 1 key-value pair to describe it.
+ In the first line, the name of the current property unit (actually a pLocal) will be displayed. The number in brackets is CK_ID. If an S is displayed in front of it (as shown in the figure above), then it is also a setting.

+ +
+ + +
+ + + + \ No newline at end of file diff --git a/SuperScriptViewer/static/html/index.html b/SuperScriptViewer/static/html/index.html new file mode 100644 index 0000000..00119c2 --- /dev/null +++ b/SuperScriptViewer/static/html/index.html @@ -0,0 +1,32 @@ + + + + + + Hierarchy - SuperScriptMaterializer + + + + + + + + + + + +

Hierarchy

+

Choose a script to read it.

+ + +

Generated by SuperScriptMaterializer

+
+

Hierarchy

+

|

+

Help

+

|

+

About

+
+ + + \ No newline at end of file diff --git a/SuperScriptViewer/static/icon.png b/SuperScriptViewer/static/icon.png deleted file mode 100644 index 284b163..0000000 Binary files a/SuperScriptViewer/static/icon.png and /dev/null differ diff --git a/SuperScriptViewer/static/imgs/document.svg b/SuperScriptViewer/static/imgs/document.svg new file mode 100644 index 0000000..526f731 --- /dev/null +++ b/SuperScriptViewer/static/imgs/document.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/SuperScriptViewer/static/imgs/environment.svg b/SuperScriptViewer/static/imgs/environment.svg new file mode 100644 index 0000000..1ae0a78 --- /dev/null +++ b/SuperScriptViewer/static/imgs/environment.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/SuperScriptViewer/static/imgs/folder.svg b/SuperScriptViewer/static/imgs/folder.svg new file mode 100644 index 0000000..689c6cb --- /dev/null +++ b/SuperScriptViewer/static/imgs/folder.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/SuperScriptViewer/static/imgs/icon.jpg b/SuperScriptViewer/static/imgs/icon.jpg new file mode 100644 index 0000000..ac1a1e2 Binary files /dev/null and b/SuperScriptViewer/static/imgs/icon.jpg differ diff --git a/SuperScriptViewer/static/imgs/script.svg b/SuperScriptViewer/static/imgs/script.svg new file mode 100644 index 0000000..f2fcc16 --- /dev/null +++ b/SuperScriptViewer/static/imgs/script.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/SuperScriptViewer/static/imgs/table.svg b/SuperScriptViewer/static/imgs/table.svg new file mode 100644 index 0000000..3ff1b9e --- /dev/null +++ b/SuperScriptViewer/static/imgs/table.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/SuperScriptViewer/static/converter.js b/SuperScriptViewer/static/js/converter.js similarity index 100% rename from SuperScriptViewer/static/converter.js rename to SuperScriptViewer/static/js/converter.js diff --git a/SuperScriptViewer/static/env.js b/SuperScriptViewer/static/js/env.js similarity index 100% rename from SuperScriptViewer/static/env.js rename to SuperScriptViewer/static/js/env.js diff --git a/SuperScriptViewer/static/js/global.js b/SuperScriptViewer/static/js/global.js new file mode 100644 index 0000000..3b57c7b --- /dev/null +++ b/SuperScriptViewer/static/js/global.js @@ -0,0 +1,12 @@ +// tab switcher +$(document).ready(function() { + // References + // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Tab_Role + $('[role="tab"]').click(function() { + $('[aria-selected="true"]').attr('aria-selected', false); + $(this).attr('aria-selected', true); + $('[role="tabpanel"]').attr('hidden', true); + $(`#${$(this).attr('aria-controls')}`).removeAttr('hidden'); + }); +}); + diff --git a/SuperScriptViewer/static/tabcontrol.js b/SuperScriptViewer/static/js/tabcontrol.js similarity index 100% rename from SuperScriptViewer/static/tabcontrol.js rename to SuperScriptViewer/static/js/tabcontrol.js diff --git a/SuperScriptViewer/static/viewer.js b/SuperScriptViewer/static/js/viewer.js similarity index 100% rename from SuperScriptViewer/static/viewer.js rename to SuperScriptViewer/static/js/viewer.js diff --git a/SuperScriptViewer/templates/about.html b/SuperScriptViewer/static/templates/about.html similarity index 100% rename from SuperScriptViewer/templates/about.html rename to SuperScriptViewer/static/templates/about.html diff --git a/SuperScriptViewer/templates/help.html b/SuperScriptViewer/static/templates/help.html similarity index 100% rename from SuperScriptViewer/templates/help.html rename to SuperScriptViewer/static/templates/help.html diff --git a/SuperScriptViewer/templates/help/converter.html b/SuperScriptViewer/static/templates/help/converter.html similarity index 100% rename from SuperScriptViewer/templates/help/converter.html rename to SuperScriptViewer/static/templates/help/converter.html diff --git a/SuperScriptViewer/templates/help/env.html b/SuperScriptViewer/static/templates/help/env.html similarity index 100% rename from SuperScriptViewer/templates/help/env.html rename to SuperScriptViewer/static/templates/help/env.html diff --git a/SuperScriptViewer/static/templates/help/legend.html b/SuperScriptViewer/static/templates/help/legend.html new file mode 100644 index 0000000..b3ee5b4 --- /dev/null +++ b/SuperScriptViewer/static/templates/help/legend.html @@ -0,0 +1,18 @@ + + + + + + Help - Viewer legend、 + + + +

Viewer legend

+

This page introduce how to use viewer page.

+
+ + + + + + \ No newline at end of file diff --git a/SuperScriptViewer/static/templates/index_entry.tmpl b/SuperScriptViewer/static/templates/index_entry.tmpl new file mode 100644 index 0000000..8eb99a5 --- /dev/null +++ b/SuperScriptViewer/static/templates/index_entry.tmpl @@ -0,0 +1,8 @@ +{% for key, value in scripts.items() %} +

{{ key|e }}

+
    + {% for i in value %} +
  1. {{ i.name }}
  2. + {% endfor %} +
+{% endfor %} diff --git a/SuperScriptViewer/templates/viewer.html b/SuperScriptViewer/static/templates/viewer.html similarity index 100% rename from SuperScriptViewer/templates/viewer.html rename to SuperScriptViewer/static/templates/viewer.html diff --git a/SuperScriptViewer/templates/help/legend.html b/SuperScriptViewer/templates/help/legend.html deleted file mode 100644 index 7a6ea16..0000000 --- a/SuperScriptViewer/templates/help/legend.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - Help - Viewer legend、 - - - -

Viewer legend

-

This page introduce how to use viewer page.

-
- - - -

Layout

-

In viewer page, it can be divided into 3 panels:

- - - - - - - - -
Navigation panelInformation & tools panel
Graph panel
-
    -
  • Navigation panel: Display current script's hierarchy. And you can click all layers which located in this panel to jump into it.
  • -
  • Information & tools panel: Provide property data, display configuration and some useful tools.
  • -
  • Graph panel: Core panel. Display current browsing behavior graph's data. Some legend will be desscribe in the follwing sector.
  • -
- - - -

Graph legend

-

Block

-
-
-
-
pLocal (including arrtibute) (ParameterLocal abbr.)
-
-
-
-
Shortcut (Only shortcut output)
-
-
-
-
bIn / bOut (BehaviorIn / BehaviorOut abbr.)
-
-
-
-
pIn / pOut (ParameterIn / ParameterOut abbr.)
-
-
-
-
pTarget (ParameterTarget abbr.)
-
-
- - -

Building block

- -

Building block (abbr. BB)

-

All building block can be devided into 2 types: prototype building block and behavior graph

- -
-
- -
-
-
-
-
-
-
- -

Get Cell

-

Get Cell

-
-
-

This is a typical prototype building block. Some port are attached into this building block.
-pIn and pTarget are at the top, pOut are at the bottom, bIn are on the left, and bOut are on the right.
-In the middle of building block, the name of this building block is written in black font, and the name of this building block's prototype is written in white font.

- -
-
- -
-
-
-
-
-
-
-
-
- -

vt2obj

-

-
-
-

This is a typical behavior graph. It is very similar to prototype building block.
-It don't have the name of prototype. Instead, you can click on the name to see what is inside this graph(jump into this graph).

- -

Link

- - - - 0 - bLink (BehaviorLink) - - pLink (ParameterLink) - - eLink (ExportParameterLink) - - - 0 - Highlight bLink - - Highlight pLink - - Highlight eLink - - -

Operation

-
    -
  • You can highlight the associated links by clicking Block or BB, and click again to cancel the highlight.
  • -
  • You can double-click Block or prototoye BB to get the properties associated with it.
  • -
  • You can hover over the Block to view its name and type through tooltip.
  • -
- -

Properties

-

Properties can be visited in Information & tools panel. It can display the information of the object currently being double-clicked.

- -
-

SRectangle/Box Mode(176)

-

dump.data

-
0x01, 0x00, 0x00, 0x00
-

dump.length

-
4
-
-

This is a typical property unit. You may see more than 1 property unit in property list. A property unit may contain more than 1 key-value pair to describe it.
-In the first line, the name of the current property unit (actually a pLocal) will be displayed. The number in brackets is CK_ID. If an S is displayed in front of it (as shown in the figure above), then it is also a setting.

- - - - \ No newline at end of file diff --git a/SuperScriptViewer/templates/index.html b/SuperScriptViewer/templates/index.html deleted file mode 100644 index 92ecbc5..0000000 --- a/SuperScriptViewer/templates/index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - Script Hierarchy - - - -

Script Hierarchy

-

Choose a script to read it.

-
-
-{% for key, value in scripts.items() %} -

{{ key|e }}

-
    - {% for i in value %} -
  1. {{ i.name }}
  2. - {% endfor %} -
-{% endfor %} -
-
-

Generated by SuperScriptMaterializer

-
-

Help

-

|

-

About

-
- - - \ No newline at end of file