diff --git a/app.py b/app.py index b0b9a99..1b36d0a 100755 --- a/app.py +++ b/app.py @@ -33,9 +33,9 @@ def eventStream(eventQueue): yield "event:{event}\n{data}\n\n".format(event=eventNode['event'], data=data) -@app.route('/data/') +@app.route('/img/') def send_data(path): - return send_from_directory('data', path) + return send_from_directory('resource/img', path) @app.route('/generalTxt') @@ -151,10 +151,10 @@ def send_resource(path): return send_from_directory('resource', path) -@app.route("/dcard_dev") -def dcard_dev(): - return render_template('dcard.html', title='DCard Sentntree 測試版') +@app.route('/generaltxt/help') +def generaltxt_help(): + return render_template('generaltxt_help.html', title="使用說明") if __name__ == "__main__": - app.run(debug=False, port=4980, host='0.0.0.0', threaded=False) + app.run(debug=True, port=4980, host='0.0.0.0', threaded=False) diff --git a/resource/img/general_txt_help_g01.png b/resource/img/general_txt_help_g01.png new file mode 100644 index 0000000..d2e676d Binary files /dev/null and b/resource/img/general_txt_help_g01.png differ diff --git a/resource/img/general_txt_help_g02.png b/resource/img/general_txt_help_g02.png new file mode 100644 index 0000000..c6ba837 Binary files /dev/null and b/resource/img/general_txt_help_g02.png differ diff --git a/static/js/generalText.js b/static/js/generalText.js index c5f3119..beae9a2 100644 --- a/static/js/generalText.js +++ b/static/js/generalText.js @@ -135,6 +135,7 @@ function buildSentetree() { }); tree.data(model.getRenderedGraphs(2)) .on('nodeMouseenter', (node) => { + console.log(node) $('#nodeTitle').removeClass('hidden') $('#nodeTitleContent').html('") }) diff --git a/templates/generalTxt.html b/templates/generalTxt.html index 3850690..b20c832 100644 --- a/templates/generalTxt.html +++ b/templates/generalTxt.html @@ -42,9 +42,7 @@

泛用文字視覺化工具

SentenTree https://github.com/twitter/SentenTree

-

這是泛用文字視覺化工具,能夠簡單處理文字檔的視覺化。

-

支援的語言:繁體中文、英文以及所有使用空格分詞的語言。

-

使用繁體中文Jieba斷詞器,不保證簡體中文能夠正常使用。

+

點此查看使用說明