diff --git a/__pycache__/__main__.cpython-38.pyc b/__pycache__/__main__.cpython-38.pyc index c5dd07f9..edc1038d 100644 Binary files a/__pycache__/__main__.cpython-38.pyc and b/__pycache__/__main__.cpython-38.pyc differ diff --git a/check_lattice/__pycache__/Lattice_2.cpython-38.pyc b/check_lattice/__pycache__/Lattice_2.cpython-38.pyc index bf301f99..a2ac2148 100644 Binary files a/check_lattice/__pycache__/Lattice_2.cpython-38.pyc and b/check_lattice/__pycache__/Lattice_2.cpython-38.pyc differ diff --git a/check_lattice/__pycache__/__init__.cpython-38.pyc b/check_lattice/__pycache__/__init__.cpython-38.pyc index 685d5435..dfbfc6ac 100644 Binary files a/check_lattice/__pycache__/__init__.cpython-38.pyc and b/check_lattice/__pycache__/__init__.cpython-38.pyc differ diff --git a/check_lattice/__pycache__/check_line_scale.cpython-38.pyc b/check_lattice/__pycache__/check_line_scale.cpython-38.pyc index 476722a6..8b46eac4 100644 Binary files a/check_lattice/__pycache__/check_line_scale.cpython-38.pyc and b/check_lattice/__pycache__/check_line_scale.cpython-38.pyc differ diff --git a/check_lattice/__pycache__/make_border.cpython-38.pyc b/check_lattice/__pycache__/make_border.cpython-38.pyc index fa68b24c..8651fb79 100644 Binary files a/check_lattice/__pycache__/make_border.cpython-38.pyc and b/check_lattice/__pycache__/make_border.cpython-38.pyc differ diff --git a/check_lattice/__pycache__/merge_table.cpython-38.pyc b/check_lattice/__pycache__/merge_table.cpython-38.pyc index 9b07c304..2a53bda0 100644 Binary files a/check_lattice/__pycache__/merge_table.cpython-38.pyc and b/check_lattice/__pycache__/merge_table.cpython-38.pyc differ diff --git a/data_rendering/__pycache__/makeGoogleSheet.cpython-38.pyc b/data_rendering/__pycache__/makeGoogleSheet.cpython-38.pyc index 68460350..b864a899 100644 Binary files a/data_rendering/__pycache__/makeGoogleSheet.cpython-38.pyc and b/data_rendering/__pycache__/makeGoogleSheet.cpython-38.pyc differ diff --git a/utils/__pycache__/__init__.cpython-38.pyc b/utils/__pycache__/__init__.cpython-38.pyc index 8b67f319..5c6aa446 100644 Binary files a/utils/__pycache__/__init__.cpython-38.pyc and b/utils/__pycache__/__init__.cpython-38.pyc differ diff --git a/utils/__pycache__/file_path.cpython-38.pyc b/utils/__pycache__/file_path.cpython-38.pyc index 130e263a..d0c935d3 100644 Binary files a/utils/__pycache__/file_path.cpython-38.pyc and b/utils/__pycache__/file_path.cpython-38.pyc differ diff --git a/utils/__pycache__/location.cpython-38.pyc b/utils/__pycache__/location.cpython-38.pyc index be6af14a..a5baf9fe 100644 Binary files a/utils/__pycache__/location.cpython-38.pyc and b/utils/__pycache__/location.cpython-38.pyc differ diff --git a/utils/__pycache__/tasks.cpython-38.pyc b/utils/__pycache__/tasks.cpython-38.pyc index 99fcf0a0..3c268c4b 100644 Binary files a/utils/__pycache__/tasks.cpython-38.pyc and b/utils/__pycache__/tasks.cpython-38.pyc differ diff --git a/www/__pycache__/__init__.cpython-38.pyc b/www/__pycache__/__init__.cpython-38.pyc index d967522a..a7011aff 100644 Binary files a/www/__pycache__/__init__.cpython-38.pyc and b/www/__pycache__/__init__.cpython-38.pyc differ diff --git a/www/__pycache__/app.cpython-38.pyc b/www/__pycache__/app.cpython-38.pyc index cccba0db..58b80f38 100644 Binary files a/www/__pycache__/app.cpython-38.pyc and b/www/__pycache__/app.cpython-38.pyc differ diff --git a/www/__pycache__/views.cpython-38.pyc b/www/__pycache__/views.cpython-38.pyc index 65915094..7e4f757b 100644 Binary files a/www/__pycache__/views.cpython-38.pyc and b/www/__pycache__/views.cpython-38.pyc differ diff --git a/www/static/css/menu_template.css b/www/static/css/menu_template.css new file mode 100644 index 00000000..65589083 --- /dev/null +++ b/www/static/css/menu_template.css @@ -0,0 +1,22 @@ +header { + position: relative; + width: auto; + height: 8%; + background: #F52C05; +} +header ul{ + position: absolute; + height: 50%; + bottom: 10%; +} +header li{ + list-style-type: none; + float: left; + height: 100%; + margin-left: 10px; + margin-right: 50px; + font-size: 32px; + font-weight: bold; + color: white; + cursor: pointer; +} \ No newline at end of file diff --git a/www/static/css/extract.css b/www/static/css/workspace.css similarity index 88% rename from www/static/css/extract.css rename to www/static/css/workspace.css index 7817194b..412dafe2 100644 --- a/www/static/css/extract.css +++ b/www/static/css/workspace.css @@ -12,26 +12,6 @@ body { font-size : 12px; height: 100vh; } -header { - position: relative; - width: auto; - height: 8%; - background: #F52C05; -} -header ul{ - position: absolute; - height: 50%; - bottom: 0; -} -header li{ - list-style-type: none; - float: left; - height: 100%; - margin-left: 100px; - font-size: 28px; - color: white; - cursor: pointer; -} #page_list_box{ position: absolute; @@ -51,6 +31,16 @@ header li{ .thumb_img_select{ border: 2px solid #F52C05; } +.check_page{ + float:left; + width: 20px; + margin-left: 10px; +} +.exist_class{ + float:right; + width: 16px; + margin-right: 10px; +} #article_table{ @@ -67,6 +57,24 @@ input :not([type=radio]){ margin: 10px; } +#top_tools{ + width: 580px; +} +#top_tools input[type=button]{ + font-size: 18px; + font-weight: bold; +} +.btn{ + width: 160px; +} +.radio-inline input[type="radio"]{ + width: 25px; + height: 25px; + margin-right: 10px; + margin-top: -1px; + vertical-align: middle; +} + #output { margin: 0 20px; padding: 20px; diff --git a/www/static/icon/check.png b/www/static/icon/check.png new file mode 100644 index 00000000..a12c3976 Binary files /dev/null and b/www/static/icon/check.png differ diff --git a/www/static/icon/table.png b/www/static/icon/table.png new file mode 100644 index 00000000..7093e90c Binary files /dev/null and b/www/static/icon/table.png differ diff --git a/www/templates/index.html b/www/templates/index.html index 39d58cc1..4071df4c 100644 --- a/www/templates/index.html +++ b/www/templates/index.html @@ -211,7 +211,7 @@ -
+ {% include "menu_template.html" %}

PDF Table Extractor

diff --git a/www/templates/menu_template.html b/www/templates/menu_template.html new file mode 100644 index 00000000..e95f32b9 --- /dev/null +++ b/www/templates/menu_template.html @@ -0,0 +1,10 @@ + + +
+ +
\ No newline at end of file diff --git a/www/templates/extract.html b/www/templates/workspace.html similarity index 89% rename from www/templates/extract.html rename to www/templates/workspace.html index cdbb3294..a6214c6b 100644 --- a/www/templates/extract.html +++ b/www/templates/workspace.html @@ -3,7 +3,7 @@ PDF Table Select Areas - + @@ -381,7 +381,10 @@ var imageWidth = $('#pageImg').width(); var imageHeight = $('#pageImg').height(); - $('.image-decorator div, .image-decorator img').css({'height':'70vh', 'width':(imageWidth/imageHeight*100)*0.7+'vh'}); + var fit_width = (imageWidth/imageHeight*100)*0.7+'vh'; + + $('.image-decorator div, .image-decorator img').css({'height':'70vh', 'width':fit_width}); + // $('#top_tools').css({'width':fit_height}); if( detected_areas.hasOwnProperty(String(this_page)) ){ page = String(this_page); @@ -471,18 +474,23 @@
-
- -
+ + {% include "menu_template.html" %} +
{% for idx in range(1, totalPage+1) %} -
+
+ {% set tables_len = detected_areas[idx]|length %} + + +
{% if idx == 1 %} {% else %} + {{idx}} -

+
{% endfor %} @@ -513,17 +522,36 @@
- - -
- - - -
+ + + + + + + + + + + +
+ + + +
+ + + + + +

@@ -532,23 +560,13 @@
- +
-
- -
- -
-
diff --git a/www/views.py b/www/views.py index c2d0bb85..dd02c50e 100644 --- a/www/views.py +++ b/www/views.py @@ -196,7 +196,7 @@ def extract_page(): inputstream.close() return render_template( - 'extract.html', + 'workspace.html', fileName=fileName, totalPage=total_page, detected_areas=detected_areas[fileName],