tg-prepare 1.0.0__py3-none-any.whl → 2.1.0b1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of tg-prepare might be problematic. Click here for more details.

Files changed (56) hide show
  1. {tg_prepare-1.0.0.dist-info → tg_prepare-2.1.0b1.dist-info}/METADATA +3 -3
  2. tg_prepare-2.1.0b1.dist-info/RECORD +54 -0
  3. {tg_prepare-1.0.0.dist-info → tg_prepare-2.1.0b1.dist-info}/WHEEL +1 -1
  4. tg_prepare-2.1.0b1.dist-info/projects/.secret_key +1 -0
  5. tgp_backend/__init__.py +3 -4
  6. tgp_backend/config.py +31 -0
  7. tgp_backend/directories.py +6 -12
  8. tgp_backend/nextcloud.py +40 -19
  9. tgp_backend/project.py +179 -52
  10. tgp_backend/session_manager.py +47 -0
  11. tgp_backend/tgclient.py +0 -1
  12. tgp_backend/util.py +73 -25
  13. tgp_ui/app.py +43 -337
  14. tgp_ui/routes/__init__.py +0 -0
  15. tgp_ui/routes/collection.py +272 -0
  16. tgp_ui/routes/data.py +228 -0
  17. tgp_ui/routes/project.py +102 -0
  18. tgp_ui/routes/publication.py +129 -0
  19. tgp_ui/routes/tabs.py +34 -0
  20. tgp_ui/routes/views.py +62 -0
  21. tgp_ui/static/css/navbar.css +92 -0
  22. tgp_ui/static/js/collectionManager.js +60 -0
  23. tgp_ui/static/js/fileManager.js +186 -0
  24. tgp_ui/static/js/main.js +32 -450
  25. tgp_ui/static/js/modalManager.js +105 -0
  26. tgp_ui/static/js/navbarManager.js +151 -0
  27. tgp_ui/static/js/projectManager.js +60 -0
  28. tgp_ui/static/js/require.js +5 -0
  29. tgp_ui/static/js/sidebarManager.js +32 -0
  30. tgp_ui/static/js/tabManager.js +79 -0
  31. tgp_ui/templates/layout.html +39 -37
  32. tgp_ui/templates/macros.html +84 -74
  33. tgp_ui/templates/project_main.html +36 -0
  34. tgp_ui/templates/project_navbar.html +81 -0
  35. tgp_ui/templates/{projects.html → projects_main.html} +14 -29
  36. tgp_ui/templates/publication.html +156 -0
  37. tgp_ui/templates/tab_final_upload.html +29 -0
  38. tg_prepare-1.0.0.dist-info/RECORD +0 -46
  39. tgp_ui/static/js/jstree.min.js +0 -3
  40. tgp_ui/templates/collection.html +0 -194
  41. tgp_ui/templates/empty.html +0 -4
  42. tgp_ui/templates/file_upload.html +0 -24
  43. tgp_ui/templates/jsfiler.html +0 -6
  44. tgp_ui/templates/layout2.html +0 -99
  45. tgp_ui/templates/main.html +0 -5
  46. tgp_ui/templates/nxc_file_tree.html +0 -33
  47. tgp_ui/templates/project.html +0 -25
  48. tgp_ui/templates/project_nxc.html +0 -37
  49. tgp_ui/templates/publish.html +0 -120
  50. tgp_ui/templates/storage.html +0 -49
  51. tgp_ui/templates/tei_browser.html +0 -14
  52. tgp_ui/templates/tei_explorer.html +0 -48
  53. tgp_ui/templates/xpath_parser_modal_content.html +0 -37
  54. {tg_prepare-1.0.0.dist-info → tg_prepare-2.1.0b1.dist-info}/entry_points.txt +0 -0
  55. {tg_prepare-1.0.0.dist-info → tg_prepare-2.1.0b1.dist-info}/licenses/LICENSE +0 -0
  56. {tg_prepare-1.0.0.dist-info → tg_prepare-2.1.0b1.dist-info}/top_level.txt +0 -0
@@ -1,24 +0,0 @@
1
- <form class="row mb-3" action="{{ url_for('upload_files', projectname=project.name) }}" method="POST"
2
- enctype="multipart/form-data">
3
- <h5>Upload Files or Folders</h5>
4
- <div class="col-6">
5
- <input type="file" class="form-control" name="files" multiple webkitdirectory onchange="this.form.submit()">
6
- </div>
7
- </form>
8
- <form class="row" method="POST" data-url="{{ url_for('clone_git_project', projectname=project.name) }}" method="POST"
9
- id="cloneFromGit">
10
- <h5>Upload from git project</h5>
11
- <i>Please be aware, that this can a take while (depending on the size of the git project)!</i>
12
- <div class="col-6">
13
- <input type="text" class="form-control" name="github_repo">
14
- </div>
15
- <div class="col-6">
16
- <button type="submit" class="btn btn-primary">
17
- <span class="spinner-border spinner-border-sm" style="display:none;" role="status"
18
- aria-hidden="true"></span>
19
- <span>Clone</span>
20
- </button>
21
- </div>
22
- </form>
23
-
24
- <br>
@@ -1,6 +0,0 @@
1
- {% extends 'layout.html' %}
2
- {% block content %}
3
-
4
- <div id="filer-demo" data-url="{{ url_for('filer_content') }}"></div>
5
-
6
- {% endblock %}
@@ -1,99 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="utf-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
7
- <meta name="description" content="" />
8
- <meta name="author" content="" />
9
- <title>{{ title }}</title>
10
- <link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='img/favicon.ico') }}" />
11
- <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" />
12
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
13
- <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/simpleXML.css') }}" />
14
- <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/main.css') }}" />
15
- </head>
16
-
17
- <body>
18
- <div class="wrapper">
19
- <aside id="sidebar" class="expand">
20
- <div class="d-flex">
21
- <button class="toggle-btn" type="button">
22
- <i class="bi bi-grid"></i>
23
- </button>
24
- <div class="sidebar-logo">
25
- <a href="#">{{ title }}</a>
26
- </div>
27
- </div>
28
- <ul class="sidebar-nav">
29
- <li class="sidebar-item">
30
- <a href={{ url_for("projects") }} class="sidebar-link" title="Projects">
31
- <i class="bi bi-view-list"></i>
32
- <span>Overview</span>
33
- </a>
34
- </li>
35
- {% for project in get_projects() %}
36
- <li class="sidebar-item">
37
- <a href="{{ url_for('project', projectname=project.name) }}" class="sidebar-link"
38
- data-bs-target="#project_{{ loop.index }}" aria-expanded="false"
39
- aria-controls="project_{{ loop.index }}">
40
- {% if current_project == project.name %}
41
- <i class="bi bi-circle-fill"></i>
42
- {% else %}
43
- <i class="bi bi-circle"></i>
44
- {% endif %}
45
- <span>{{ project.name }}</span>
46
- </a>
47
- <ul id="project_{{ loop.index }}"
48
- class="sidebar-dropdown nav list-unstyled ps-3 {{ 'collapse' if current_project != project.name }}"
49
- data-bs-parent="#sidebar">
50
- <li class="sidebar-item">
51
- <a class="sidebar-link nav-link" data-bs-toggle="tab" href="#tab_storage" role="tab"
52
- aria-controls="tab_storage" aria-selected="false">
53
- <i class="bi bi-folder2-open"></i>
54
- Storage
55
- </a>
56
- </li>
57
- {% for c in project.collections %}
58
- {% set collection_config = project.collections[c]['config'] %}
59
- <li class="sidebar-item">
60
- <a class="sidebar-link nav-link collection-tab" data-bs-toggle="tab" href="#tab_{{ c }}"
61
- role="tab" aria-controls="tab_{{ c }} aria-selected=" false"
62
- data-url="{{ url_for('collection', projectname=project.name, name=c) }}"
63
- data-name="{{ c }}">
64
- <i class="spinner-border spinner-border-sm" role="status" style="display:none;"></i>
65
- <i class="bi bi-{{ loop.index }}-circle"></i>
66
- {{collection_config.short_title}}
67
- </a>
68
- </li>
69
- {% endfor %}
70
- <li class="sidebar-item">
71
- <a class="sidebar-link nav-link" data-bs-toggle="tab" href="#tab_publish" role="tab"
72
- aria-controls="tab_publish" aria-selected="false">
73
- <i class="bi bi-cloud-upload"></i>
74
- Publish
75
- </a>
76
- </li>
77
- </ul>
78
- </li>
79
- {% endfor %}
80
- </aside>
81
- <div class="main p-3">
82
- <div class="text-center">
83
- <h1>
84
- <span>
85
- {{ sub_title }}
86
- </span>
87
- </h1>
88
- </div>
89
- {% block content %}{% endblock content %}
90
- </div>
91
- </div>
92
- <script src="{{ url_for('static', filename='js/jquery.min.js') }}"></script>
93
- <script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
94
- <script src="{{ url_for('static', filename='js/simpleXML.js') }}"></script>
95
- <script src="{{ url_for('static', filename='js/main.js') }}"></script>
96
- </script>
97
- </body>
98
-
99
- </html>
@@ -1,5 +0,0 @@
1
- {% extends "layout.html" %}
2
- {% block content %}
3
- <h1>A bare starting point for a flask project</h1>
4
- <p class="lead">So far....completely bare bone!</p>
5
- {% endblock %}
@@ -1,33 +0,0 @@
1
- {% if item.type == 'folder' %}
2
- <li class="list-group-item {{ active_class }} folder">
3
- <div class="d-flex justify-content-between align-items-center">
4
- <span>
5
- <a href="#" class="badge text-dark show-files" title="Show files">
6
- <span class="bi bi-eye-slash-fill"></span>
7
- </a>
8
- <span class="bi-folder-fill"></span>
9
- {{ item.name }}
10
- <a href="#" class="badge text-dark nxc_select-folder" title="Select folder" data-path="{{ item.path }}">
11
- <span class="bi bi-circle" data-path="{{ item.path }}"></span>
12
- </a>
13
- <span class="spinner-border spinner-border-sm" style="display:none;"></span>
14
- </span>
15
- <span>
16
- <span class="badge bg-primary rounded-pill">{{ item.children.count }}</span>
17
- </span>
18
- </div>
19
- {% for child in item.children.list %}
20
- {% with item=child %}
21
- <ul class="list-group list-group-flush">
22
- {% include 'nxc_file_tree.html' %}
23
- </ul>
24
- {% endwith %}
25
- {% endfor %}
26
- </li>
27
- {% else %}
28
- <li class="list-group-item p-0 ps-3 m-0 small text-muted {{ active_class }} file" style="display: none;">
29
- <span class="bi-file-earmark-text-fill"></span>
30
- {{ item.name }}
31
- </span>
32
- </li>
33
- {% endif %}
@@ -1,25 +0,0 @@
1
- {% extends 'layout2.html' %}
2
- {% block content %}
3
- <div class="row">
4
- <div class="tab-content pt-2" id="tab-content">
5
- <div class="tab-pane {{'active' if tab=='storage' }}" id="tab_storage" role="tabpanel">
6
- {% include 'storage.html' %}
7
- </div>
8
- {% for c in project.collections %}
9
- {% set collection_config = project.collections[c]['config'] %}
10
- <div class="tab-pane {{ 'active' if tab==collection_config.short_title }}" id="tab_{{ c }}" role="tabpanel">
11
- </div>
12
- {% endfor %}
13
- <div class="tab-pane {{'active' if tab=='publish' }}" id="tab_publish" role="tabpanel">
14
- {% include 'publish.html' %}
15
- </div>
16
- </div>
17
- </div>
18
-
19
- <div class=" modal fade" id="xpathParserModal" tabindex="-1" aria-labelledby="xpathParserModalLabel" aria-hidden="true">
20
- </div>
21
-
22
- <div class="modal fade" id="teiExplorer" tabindex="-1" aria-labelledby="teiExplorerLabel" aria-hidden="true">
23
- </div>
24
-
25
- {% endblock %}
@@ -1,37 +0,0 @@
1
- {% extends 'layout2.html' %}
2
- {% block content %}
3
- <div class="row">
4
- <div class="tab-content pt-2" id="tab-content">
5
- <div class="tab-pane {{'active' if tab=='upload' }}" id="tab_upload" role="tabpanel">
6
- {% include 'file_upload.html' %}
7
- </div>
8
- <div class="tab-pane {{'active' if tab=='files' }}" id="tab_files" role="tabpanel">
9
- {% for item in project.list_files_and_folder() %}
10
- {% include 'file_tree.html' %}
11
- {% endfor %}
12
- </div>
13
- {% for c in project.collections %}
14
- {% set collection_config = project.collections[c]['config'] %}
15
- <div class="tab-pane {{'active' if tab==collection_config.short_title}}" id="tab_{{ c }}" role="tabpanel">
16
- </div>
17
- {% endfor %}
18
- <div class="tab-pane {{'active' if tab=='publish' }}" id="tab_publish" role="tabpanel">
19
- {% include 'publish.html' %}
20
- </div>
21
- <div class="tab-pane {{'active' if tab=='nextcloud' }}" id="tab_nextcloud" role="tabpanel">
22
- {% for item in project.nextcloud.nxc_list_files_and_folders() %}
23
- {% include 'file_tree.html' %}
24
- {% endfor %}
25
- </div>
26
-
27
-
28
- </div>
29
- </div>
30
-
31
- <div class="modal fade" id="xpathParserModal" tabindex="-1" aria-labelledby="xpathParserModalLabel" aria-hidden="true">
32
- </div>
33
-
34
- <div class="modal fade" id="teiExplorer" tabindex="-1" aria-labelledby="teiExplorerLabel" aria-hidden="true">
35
- </div>
36
-
37
- {% endblock %}
@@ -1,120 +0,0 @@
1
- <div class="col-sm-6">
2
- <div class="row">
3
-
4
- <h4><b>Publish</b> project to <b>TextGrid-Testinstance</b></h4>
5
- </div>
6
- {% set tg_session_id = project.main_config.get_tg_session_id('test')%}
7
- <form class="row border-bottom pb-3 tab-submit" method="POST"
8
- action="{{ url_for('save_session_id', projectname=project.name, instance='test') }}" method="POST">
9
- <div class="col-6">
10
- <input type="text" class="form-control" name="tg_auth_session_id" placeholder="TgAuth Session ID"
11
- value="{{tg_session_id if tg_session_id}}">
12
- </div>
13
- <div class="col-6">
14
- <button type="submit" class="btn btn-primary">
15
- <span class="bi bi-floppy2-fill"></span>
16
- <span class="spinner-border spinner-border-sm" style="display:none;" role="status"
17
- aria-hidden="true"></span>
18
- </button>
19
- </div>
20
- </form>
21
- {% if tg_session_id %}
22
- <div class="row text-start">
23
- <span class="py-2">Select from existing projects</span>
24
- {% for tg_project in project.get_tgp('test').get_tg_projects() %}
25
- <div class="tg-project-row">
26
- <a href="#" class="text-dark select-tg-project" title="Select project"
27
- data-url="{{ url_for('save_tg_project_id', projectname=project.name, instance='test') }}"
28
- data-tg_project_id="{{ tg_project.id }}">
29
- {% set tg_project_id = project.main_config.get_tg_project_id('test')%}
30
- {% if tg_project_id == tg_project.id %}
31
- <span class="bi bi-circle-fill"></span>
32
- {% else %}
33
- <span class="bi bi-circle"></span>
34
- {% endif %}
35
- </a>
36
- <b>{{ tg_project.name }}</b>
37
- -
38
- <span class="tgProjectHits">{{ tg_project.contents }}</span> <span>Elements</span>
39
- (<i>{{ tg_project.id }}</i>)
40
- <a href="#" class="text-dark delete-tg-project" title="Delete project"
41
- data-url="{{ url_for('delete_tg_project_id', projectname=project.name, instance='test', tg_project_id= tg_project.id ) }}"
42
- data-hits_url="{{ url_for('get_tg_project_hits', projectname=project.name, instance='test', tg_project_id= tg_project.id ) }}">
43
- <span class="bi bi-trash text-danger"></span>
44
- <span class="spinner-border spinner-border-sm" style="display:none;" role="status"
45
- aria-hidden="true"></span>
46
- </a>
47
- </div>
48
- {% endfor%}
49
- <span class="py-2">
50
- or create a new project:
51
- </span>
52
- </div>
53
- <form class="row border-bottom pb-3 tab-submit" method="POST"
54
- action="{{ url_for('create_tg_project', projectname=project.name, instance='test') }}" method="POST">
55
- <div class="col-6">
56
- <input type="text" class="form-control" name="tg_projectname" placeholder="TG Projectname">
57
- </div>
58
- <div class="col-6">
59
- <button type="submit" class="btn btn-primary">
60
- <span class="bi bi-pencil-square"></span>
61
- <span class="spinner-border spinner-border-sm" style="display:none;" role="status"
62
- aria-hidden="true"></span>
63
- </button>
64
- </div>
65
- </form>
66
- <form class="row pt-3 tab-submit" method="POST"
67
- action="{{ url_for('publish_project', projectname=project.name, instance='test') }}" method="POST">
68
- <div class="col-6">
69
- <h5>Publish project</h5>
70
- </div>
71
- {% if project.main_config.get_tg_project_id('test') %}
72
- <div class="col-6">
73
- <button type="submit" class="btn btn-primary">
74
- <span class="bi bi-rocket-takeoff"></span>
75
- <span class="spinner-border spinner-border-sm" style="display:none;" role="status"
76
- aria-hidden="true"></span>
77
- </button>
78
- </div>
79
- <div class="col-12 bg-light m-2 p-2 fst-bold">
80
- <p>
81
- <b>Whats next?</b>
82
- <ul class="list-group list-group-numbered">
83
- <li class="list-group-item">Go to <a href="https://test.textgridrep.org/projects">Testinstance</a></li>
84
- <li class="list-group-item">Display 'Unpublished projects' <i>My TextGrid/Unpublished Data</i></li>
85
- <li class="list-group-item">Check if everything looks as favored</li>
86
- </ul>
87
- </p>
88
- </div>
89
- {% else %}
90
- <div class="col-12 bg-light m-2 p-2 fst-italic">
91
- <h5>Attention</h5>
92
- <p>
93
- <b>You need to select a TextGrid project in order to publish your project to
94
- TextGrid-Testinstance!</b>
95
- </p>
96
- </div>
97
- {% endif %}
98
- </form>
99
- {% else %}
100
- <div class="bg-light m-2 p-2 fst-italic">
101
- <h5>Attention</h5>
102
- <p>
103
- <b>You need to provide a "TgAuth Session ID" in order to publish your project to
104
- TextGrid-Testinstance!</b>
105
- <p>
106
- 1. Please first go to <a
107
- href="https://test.textgridlab.org/1.0/Shibboleth.sso/Login?target=/1.0/secure/TextGrid-WebAuth.php?authZinstance=test.textgridlab.org"
108
- target="_blank">this page</a>!
109
- (You may need to log in via DARIAH-AAI)
110
- </p>
111
- <p>
112
- 2. Then click on "More Details" and copy the "TgAuth Session ID" to
113
- your clipboard.
114
- </p>
115
- <p>
116
- 3. Finally, paste it into the input field above and save it.
117
- </p>
118
- </div>
119
- {% endif %}
120
- </div>
@@ -1,49 +0,0 @@
1
- {% block content %}
2
- <div class="row mb-4">
3
- <ul class="nav nav-pills" id="" role="tablist">
4
- <li class="nav-item me-2" role="presentation">
5
- <button class="nav-link" data-bs-toggle="tab" href="#tab_upload" role="tab" aria-controls="tab_upload"
6
- aria-selected="false">
7
- <i class="bi bi-upload"></i>
8
- Upload
9
- </button>
10
- </li>
11
- <li class="nav-item">
12
- <a class="nav-link" data-bs-toggle="tab" href="#tab_nextcloud" role="tab" aria-controls="tab_nextcloud"
13
- aria-selected="false" data-url="{{ url_for('nextcloud_tab') }}" data-projectname="{{ project.name }}">
14
- <i class="bi bi-cloud"></i>
15
- Nextcloud
16
- </a>
17
- </li>
18
- <li class="nav-item">
19
- <a class="nav-link" data-bs-toggle="tab" href="#tab_files" role="tab" aria-controls="tab_files"
20
- aria-selected="false">
21
- <i class="bi bi-folder2-open"></i>
22
- Local files
23
- </a>
24
- </li>
25
- </ul>
26
- </div>
27
- <div class="row">
28
- <div class="tab-content pt-2" id="tab-content">
29
- <div class="tab-pane {{'active' if tab=='upload' }}" id="tab_upload" role="tabpanel">
30
- {% include 'file_upload.html' %}
31
- </div>
32
- <div class="tab-pane {{'active' if tab=='files' }}" id="tab_files" role="tabpanel">
33
- {% for item in project.list_files_and_folders() %}
34
- {% include 'file_tree.html' %}
35
- {% endfor %}
36
- </div>
37
- <div class="tab-pane {{'active' if tab=='nextcloud' }}" id="tab_nextcloud" role="tabpanel"
38
- data-projectname="{{ project.name }}">
39
- </div>
40
- </div>
41
- </div>
42
-
43
- <div class=" modal fade" id="xpathParserModal" tabindex="-1" aria-labelledby="xpathParserModalLabel" aria-hidden="true">
44
- </div>
45
-
46
- <div class="modal fade" id="teiExplorer" tabindex="-1" aria-labelledby="teiExplorerLabel" aria-hidden="true">
47
- </div>
48
-
49
- {% endblock %}
@@ -1,14 +0,0 @@
1
- {% extends 'layout.html' %}
2
- {% block content %}
3
-
4
- <div class="container-fluid">
5
- <div class="row g-3">
6
- {% for desc in desc_list %}
7
- <div class="col-6 p-3">
8
- <h4> {{ desc['title']}} </h4>
9
- <div class="desc_content" style="display: none;"> {{desc['content']}} </div>
10
- </div>
11
- {% endfor %}
12
- </div>
13
- </div>
14
- {% endblock %}
@@ -1,48 +0,0 @@
1
- <div class="row mb-3">
2
- <div class="col-12">
3
- <div class="input-group">
4
- <input type="text" class="form-control no-serialization" name="xpath" placeholder="XPath..."
5
- aria-label="XPath-Ausdruck">
6
- <button class="btn btn-primary check-xpath" id="button-check-xpath"
7
- data-url="{{url_for('check_xpath', projectname=project.name, collectionname=collection_title)}}">
8
- <span class="spinner-border spinner-border-sm d-none" role="status" aria-hidden="true"></span>
9
- <span class="bi bi-search"></span>
10
- </button>
11
- </div>
12
- </div>
13
- </div>
14
- <div class="row mb-3">
15
- <div class="col-8">
16
- <div class="row">
17
- {% for file in file_list %}
18
- <div class="col-xxl-4 col-lg-6 col-md-12 mb-2">
19
- <div class="card mb-2">
20
- <div class="card-body p-2">
21
- <div class="d-flex justify-content-between align-items-center">
22
- <div class="btn-group">
23
- <a href="#" class="btn btn-sm btn-outline-secondary load-tei-content"
24
- title="Display TEI Header" data-url="{{ url_for('load_tei_content') }}"
25
- data-path="{{ file['fullpath'] }}" data-type="header" data-heading="TEI Header">
26
- <span class="bi bi-file-earmark-code"></span>
27
- </a>
28
- <a href="#" class="btn btn-sm btn-outline-secondary load-tei-content"
29
- title="Display TEI Text" data-url="{{ url_for('load_tei_content') }}"
30
- data-path="{{ file['fullpath'] }}" data-type="text" data-heading="Text">
31
- <span class="bi bi-file-earmark-text"></span>
32
- </a>
33
- </div>
34
- <span class="ms-2 text-truncate">{{ file.name_stripped }}</span>
35
- </div>
36
- <div class="xpath-result mt-2" data-name="{{ file.name }}"></div>
37
- </div>
38
- </div>
39
- </div>
40
- {% endfor %}
41
- </div>
42
- </div>
43
- <div class="col-4">
44
- <div class="output card" style="max-height: 800px; overflow-x: auto;">
45
- <div class="card-body"></div>
46
- </div>
47
- </div>
48
- </div>
@@ -1,37 +0,0 @@
1
- <div class="modal-dialog modal-xl">
2
- <div class="modal-content">
3
- <div class="modal-header">
4
- <form class="row g-3" id="parseXPath" data-url="{{ request.base_url }}">
5
- <div class="col-auto">
6
- <h5 id="xpathParserModalLabel">Parse xpath:</h5>
7
- </div>
8
-
9
- <div class="col-auto">
10
- <input type="text" class="form-control" placeholder="xpath" name="xpath"
11
- value="{{ request.form.get('xpath') if request.form.get('xpath') }}">
12
- </div>
13
- <div class="col-auto">
14
- <button type="submit" class="btn btn-secondary mb-3">Run</button>
15
- </div>
16
- </form>
17
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
18
- </div>
19
- <div class="modal-body">
20
- {% set elements = collection_parser.elements %}
21
- <div class="row">
22
- {% for element in elements %}
23
- <div class="col-3 d-flex">
24
- <span class="p-0 ps-3 m-0 small text-muted">
25
- <b>{{ element['file']['filename'] }}</b>
26
- <br>
27
- {% if request.form.get("xpath") %}
28
- {{ element['tei_parser'].find(request.form.get("xpath")).text }}
29
- {% endif %}
30
- &nbsp;
31
- </span>
32
- </div>
33
- {% endfor%}
34
- </div>
35
- </div>
36
- </div>
37
- </div>