tg-prepare 1.0.0__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.
- tg_prepare-1.0.0.dist-info/METADATA +19 -0
- tg_prepare-1.0.0.dist-info/RECORD +46 -0
- tg_prepare-1.0.0.dist-info/WHEEL +5 -0
- tg_prepare-1.0.0.dist-info/entry_points.txt +3 -0
- tg_prepare-1.0.0.dist-info/licenses/LICENSE +202 -0
- tg_prepare-1.0.0.dist-info/top_level.txt +2 -0
- tgp_backend/__init__.py +18 -0
- tgp_backend/auth.py +71 -0
- tgp_backend/cli.py +22 -0
- tgp_backend/directories.py +85 -0
- tgp_backend/interfaces.py +3 -0
- tgp_backend/nextcloud.py +125 -0
- tgp_backend/project.py +267 -0
- tgp_backend/tgclient.py +92 -0
- tgp_backend/util.py +83 -0
- tgp_ui/__init__.py +0 -0
- tgp_ui/app.py +424 -0
- tgp_ui/static/css/bootstrap-icons.min.css +5 -0
- tgp_ui/static/css/bootstrap.min.css +7 -0
- tgp_ui/static/css/main.css +146 -0
- tgp_ui/static/css/simpleXML.css +67 -0
- tgp_ui/static/js/bootstrap.bundle.min.js +7 -0
- tgp_ui/static/js/jquery.min.js +2 -0
- tgp_ui/static/js/jstree.min.js +3 -0
- tgp_ui/static/js/main.js +454 -0
- tgp_ui/static/js/simpleXML.js +193 -0
- tgp_ui/templates/collection.html +194 -0
- tgp_ui/templates/empty.html +4 -0
- tgp_ui/templates/file_tree.html +39 -0
- tgp_ui/templates/file_upload.html +24 -0
- tgp_ui/templates/jsfiler.html +6 -0
- tgp_ui/templates/layout.html +59 -0
- tgp_ui/templates/layout2.html +99 -0
- tgp_ui/templates/macros.html +91 -0
- tgp_ui/templates/main.html +5 -0
- tgp_ui/templates/nxc_file_tree.html +33 -0
- tgp_ui/templates/nxc_login.html +25 -0
- tgp_ui/templates/nxc_tab.html +15 -0
- tgp_ui/templates/project.html +25 -0
- tgp_ui/templates/project_nxc.html +37 -0
- tgp_ui/templates/projects.html +73 -0
- tgp_ui/templates/publish.html +120 -0
- tgp_ui/templates/storage.html +49 -0
- tgp_ui/templates/tei_browser.html +14 -0
- tgp_ui/templates/tei_explorer.html +48 -0
- tgp_ui/templates/xpath_parser_modal_content.html +37 -0
|
@@ -0,0 +1,37 @@
|
|
|
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 %}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{% extends 'layout2.html' %}
|
|
2
|
+
{% block content %}
|
|
3
|
+
<div class="row row-cols-xxl-6 row-cols-lg-4 row-cols-md-2">
|
|
4
|
+
{% for project in projects%}
|
|
5
|
+
<div class="card text-center m-1">
|
|
6
|
+
<div class="card-body">
|
|
7
|
+
<h5 class="card-title">{{ project.name }}</h5>
|
|
8
|
+
<a class="btn btn-secondary btn-forward" href="project/{{ project.name }}" title="Edit project">
|
|
9
|
+
<span class="bi bi-pencil-square"></span>
|
|
10
|
+
</a>
|
|
11
|
+
<a class="btn btn-danger btn-forward" title="Delete project" data-bs-toggle="modal"
|
|
12
|
+
data-bs-target="#deleteProject" data-projectname="{{ project.name }}">
|
|
13
|
+
<span class="bi bi-trash"></span>
|
|
14
|
+
</a>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
{% endfor %}
|
|
18
|
+
<div class="card text-center mx-1">
|
|
19
|
+
<div class="card-body">
|
|
20
|
+
<h5 class="card-title">New project</h5>
|
|
21
|
+
<a class="btn btn-secondary" id="createNewProject" title="Add a new project" data-bs-toggle="modal"
|
|
22
|
+
data-bs-target="#newProject">
|
|
23
|
+
<span class="bi-plus-circle"></span>
|
|
24
|
+
</a>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="modal fade" id="newProject" tabindex="-1" aria-labelledby="newProjectLabel" aria-hidden="true">
|
|
30
|
+
<div class="modal-dialog">
|
|
31
|
+
<div class="modal-content">
|
|
32
|
+
<form action="{{ url_for('new_project') }}" method="POST">
|
|
33
|
+
<div class="modal-header">
|
|
34
|
+
<h5 class="modal-title" id="newProjectLabel">Create new Project</h5>
|
|
35
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="modal-body">
|
|
38
|
+
<div class="mb-3">
|
|
39
|
+
<input type="text" class="form-control" id="project" name="projectname"
|
|
40
|
+
placeholder="Projectname" value="{{ projectname }}">
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="modal-footer">
|
|
44
|
+
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
|
45
|
+
<button type="submit" class="btn btn-primary">Create</button>
|
|
46
|
+
</div>
|
|
47
|
+
</form>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div class="modal fade" id="deleteProject" tabindex="-1" aria-labelledby="deleteProjectLabel" aria-hidden="true">
|
|
53
|
+
<div class="modal-dialog">
|
|
54
|
+
<div class="modal-content">
|
|
55
|
+
<form action="{{ url_for('projects') }}" method="POST">
|
|
56
|
+
<div class="modal-header">
|
|
57
|
+
<h5 class="modal-title" id="deleteProjectLabel">
|
|
58
|
+
<span>Delete Project:</span>
|
|
59
|
+
<i class="projectname"></i>
|
|
60
|
+
</h5>
|
|
61
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="modal-footer">
|
|
64
|
+
<input type="hidden" name="delete" value="true">
|
|
65
|
+
<input type="hidden" name="projectname">
|
|
66
|
+
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
|
67
|
+
<button type="submit" class="btn btn-danger">Delete</button>
|
|
68
|
+
</div>
|
|
69
|
+
</form>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
{% endblock %}
|
|
@@ -0,0 +1,120 @@
|
|
|
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>
|
|
@@ -0,0 +1,49 @@
|
|
|
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 %}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 %}
|
|
@@ -0,0 +1,48 @@
|
|
|
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>
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
|
|
31
|
+
</span>
|
|
32
|
+
</div>
|
|
33
|
+
{% endfor%}
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|