tg-prepare 1.1.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 (46) hide show
  1. {tg_prepare-1.1.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.1.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 -8
  8. tgp_backend/nextcloud.py +40 -19
  9. tgp_backend/project.py +172 -45
  10. tgp_backend/session_manager.py +47 -0
  11. tgp_backend/util.py +73 -25
  12. tgp_ui/app.py +43 -335
  13. tgp_ui/routes/__init__.py +0 -0
  14. tgp_ui/routes/collection.py +272 -0
  15. tgp_ui/routes/data.py +228 -0
  16. tgp_ui/routes/project.py +102 -0
  17. tgp_ui/routes/publication.py +129 -0
  18. tgp_ui/routes/tabs.py +34 -0
  19. tgp_ui/routes/views.py +62 -0
  20. tgp_ui/static/css/navbar.css +92 -0
  21. tgp_ui/static/js/collectionManager.js +60 -0
  22. tgp_ui/static/js/fileManager.js +186 -0
  23. tgp_ui/static/js/main.js +32 -485
  24. tgp_ui/static/js/modalManager.js +105 -0
  25. tgp_ui/static/js/navbarManager.js +151 -0
  26. tgp_ui/static/js/projectManager.js +60 -0
  27. tgp_ui/static/js/require.js +5 -0
  28. tgp_ui/static/js/sidebarManager.js +32 -0
  29. tgp_ui/static/js/tabManager.js +79 -0
  30. tgp_ui/templates/layout.html +9 -48
  31. tgp_ui/templates/macros.html +79 -72
  32. tgp_ui/templates/project_main.html +36 -0
  33. tgp_ui/templates/project_navbar.html +81 -0
  34. tgp_ui/templates/{projects.html → projects_main.html} +13 -28
  35. tgp_ui/templates/tab_final_upload.html +29 -0
  36. tg_prepare-1.1.0.dist-info/RECORD +0 -39
  37. tgp_ui/templates/collection.html +0 -194
  38. tgp_ui/templates/file_upload.html +0 -24
  39. tgp_ui/templates/nxc_file_tree.html +0 -33
  40. tgp_ui/templates/project.html +0 -26
  41. tgp_ui/templates/storage.html +0 -49
  42. tgp_ui/templates/tei_explorer.html +0 -48
  43. tgp_ui/templates/xpath_parser_modal_content.html +0 -37
  44. {tg_prepare-1.1.0.dist-info → tg_prepare-2.1.0b1.dist-info}/entry_points.txt +0 -0
  45. {tg_prepare-1.1.0.dist-info → tg_prepare-2.1.0b1.dist-info}/licenses/LICENSE +0 -0
  46. {tg_prepare-1.1.0.dist-info → tg_prepare-2.1.0b1.dist-info}/top_level.txt +0 -0
@@ -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>