psdi-data-conversion 0.1.6__py3-none-any.whl → 0.2.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.
Files changed (38) hide show
  1. psdi_data_conversion/app.py +5 -398
  2. psdi_data_conversion/constants.py +11 -7
  3. psdi_data_conversion/converter.py +41 -28
  4. psdi_data_conversion/converters/base.py +18 -13
  5. psdi_data_conversion/database.py +284 -88
  6. psdi_data_conversion/gui/__init__.py +5 -0
  7. psdi_data_conversion/gui/accessibility.py +51 -0
  8. psdi_data_conversion/gui/env.py +239 -0
  9. psdi_data_conversion/gui/get.py +53 -0
  10. psdi_data_conversion/gui/post.py +176 -0
  11. psdi_data_conversion/gui/setup.py +102 -0
  12. psdi_data_conversion/main.py +70 -13
  13. psdi_data_conversion/static/content/convert.htm +105 -74
  14. psdi_data_conversion/static/content/convertato.htm +36 -26
  15. psdi_data_conversion/static/content/convertc2x.htm +39 -26
  16. psdi_data_conversion/static/content/download.htm +5 -5
  17. psdi_data_conversion/static/content/feedback.htm +2 -2
  18. psdi_data_conversion/static/content/header-links.html +3 -3
  19. psdi_data_conversion/static/content/index-versions/header-links.html +3 -3
  20. psdi_data_conversion/static/content/index-versions/psdi-common-header.html +1 -1
  21. psdi_data_conversion/static/content/psdi-common-header.html +1 -1
  22. psdi_data_conversion/static/javascript/accessibility.js +88 -61
  23. psdi_data_conversion/static/javascript/data.js +1 -3
  24. psdi_data_conversion/static/javascript/load_accessibility.js +50 -33
  25. psdi_data_conversion/static/styles/format.css +74 -20
  26. psdi_data_conversion/static/styles/psdi-common.css +5 -0
  27. psdi_data_conversion/templates/accessibility.htm +274 -0
  28. psdi_data_conversion/{static/content → templates}/documentation.htm +25 -5
  29. psdi_data_conversion/templates/index.htm +75 -58
  30. psdi_data_conversion/{static/content → templates}/report.htm +28 -10
  31. psdi_data_conversion/testing/conversion_test_specs.py +26 -6
  32. psdi_data_conversion/testing/utils.py +6 -6
  33. {psdi_data_conversion-0.1.6.dist-info → psdi_data_conversion-0.2.0.dist-info}/METADATA +9 -2
  34. {psdi_data_conversion-0.1.6.dist-info → psdi_data_conversion-0.2.0.dist-info}/RECORD +37 -31
  35. psdi_data_conversion/static/content/accessibility.htm +0 -255
  36. {psdi_data_conversion-0.1.6.dist-info → psdi_data_conversion-0.2.0.dist-info}/WHEEL +0 -0
  37. {psdi_data_conversion-0.1.6.dist-info → psdi_data_conversion-0.2.0.dist-info}/entry_points.txt +0 -0
  38. {psdi_data_conversion-0.1.6.dist-info → psdi_data_conversion-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,274 @@
1
+ <!--
2
+ accessibility.htm
3
+ Version 1.0, 7th June 2024
4
+ -->
5
+
6
+ <!DOCTYPE html>
7
+ <html>
8
+
9
+ <head>
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
+ <title>PSDI Data Conversion Service</title>
12
+ <link rel="icon" type="image/x-icon" href="{{url_for('static', filename='img/psdi-icon-dark.svg')}}">
13
+ <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
15
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans:400" rel="stylesheet" type="text/css">
16
+ <link href="https://fonts.googleapis.com/css?family=Lexend:400" rel="stylesheet" type="text/css">
17
+ <link rel="stylesheet" href="{{url_for('static', filename='styles/format.css')}}">
18
+
19
+ <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
20
+ crossorigin="anonymous"></script>
21
+ <script src="https://cdn.jsdelivr.net/jquery.dirtyforms/2.0.0/jquery.dirtyforms.min.js"></script>
22
+
23
+ <script type="module" src="{{url_for('static', filename='javascript/load_accessibility.js')}}"></script>
24
+ <script type="module" src="{{url_for('static', filename='javascript/common.js')}}"></script>
25
+ <script type="module" src="{{url_for('static', filename='javascript/psdi-common.js')}}"></script>
26
+
27
+ <script type="module" src="{{url_for('static', filename='javascript/accessibility.js')}}"></script>
28
+ </head>
29
+
30
+ <body marginwidth="0">
31
+
32
+ <!-- Cover to hide element loading and make page transitions seem smoother -->
33
+ <div id="cover"></div>
34
+
35
+ <header class="header" id="psdi-header"></header>
36
+ <script type="module">
37
+ import { setHeaderLinksSource, setHeaderSource, setFooterSource } from "./static/javascript/psdi-common.js";
38
+ // Due to the index being a template which will exist in a different directory once rendered, we need to set
39
+ // a non-default location of the header links file
40
+ setHeaderSource("{{url_for('static', filename='content/index-versions/psdi-common-header.html')}}");
41
+ setFooterSource("{{url_for('static', filename='content/index-versions/psdi-common-footer.html')}}");
42
+ setHeaderLinksSource("{{url_for('static', filename='content/index-versions/header-links.html')}}");
43
+ </script>
44
+
45
+ <div class="hero">
46
+ <div class="max-width-box">
47
+ <h1 class="hero__title marginless_header">Accessibility</h1>
48
+ </div>
49
+ </div>
50
+
51
+ <form name="gui">
52
+ <div class="max-width-box">
53
+ <div class="flex-panel-display">
54
+ <div class="flex-panel instructions-panel">
55
+ <h6>Select accessibility options</h6>
56
+ <p>Select accessibility settings below as require to find a setup you like. Once the appearance of the page is
57
+ satisfactory, click on the "Save" button to apply the settings to the entire website. This saves the
58
+ settings in a cookie on your device which is only used for this purpose and does not store any personal
59
+ data.</p>
60
+ <p>The colour options here are not compatible with the dark-mode toggle in the header bar. If a custom dark
61
+ scheme is desired, the appropriate colours can be selected in light-mode.</p>
62
+ </div>
63
+ <hr class="small-screen-only">
64
+ <div class="flex-panel">
65
+ <div class="access-options">
66
+ <div class="access-option-container">
67
+ <p>
68
+ <label for="font" id="fontLabel">Font:</label><br>
69
+ <select id="font">
70
+ <option value="Default">Default</option>
71
+ <option value="Arial" style="font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;">Arial
72
+ </option>
73
+ <option value="Calibri"
74
+ style="font-family: Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif;">Calibri
75
+ </option>
76
+ <option value="Comic Sans" style="font-family: 'Comic Sans MS', 'Comic Sans', sans-serif;">Comic Sans
77
+ </option>
78
+ <option value="Courier New"
79
+ style="font-family: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace;">
80
+ Courier New</option>
81
+ <option value="Georgia" style="font-family: Georgia, Times, 'Times New Roman', serif">Georgia
82
+ </option>
83
+ <option value="Helvetica" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif">
84
+ Helvetica
85
+ </option>
86
+ <option value="Lexend" style="font-family: Lexend, sans-serif;">Lexend</option>
87
+ <option value="Lucida Bright" style="font-family: 'Lucida Bright', Georgia, serif">Lucida Bright
88
+ </option>
89
+ <option value="Open Sans" style="font-family: Open Sans, sans-serif;">Open Sans
90
+ </option>
91
+ <option value="Tahoma" style="font-family: Tahoma, Verdana, Segoe, sans-serif;">Tahoma</option>
92
+ <option value="Times New Roman"
93
+ style="font-family: TimesNewRoman, 'Times New Roman', Times, Baskerville, Georgia, serif;">Times New
94
+ Roman</option>
95
+ <option value="Trebuchet"
96
+ style="font-family: 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif;">
97
+ Trebuchet</option>
98
+ <option value="Verdana" style="font-family: Verdana, Geneva, sans-serif;">Verdana</option>
99
+ </select><br>
100
+ </p>
101
+ </div>
102
+ <div class="access-option-container">
103
+ <p>
104
+ <label for="size" id="sizeLabel">Font size (px):</label><br>
105
+ <select id="size">
106
+ <option value="Default">Default</option>
107
+ <option value="14" style="font-size: 14px;">14</option>
108
+ <option value="15" style="font-size: 15px;">15</option>
109
+ <option value="16" style="font-size: 16px;">16</option>
110
+ <option value="17" style="font-size: 17px;">17</option>
111
+ <option value="18" style="font-size: 18px;">18</option>
112
+ <option value="19" style="font-size: 19px;">19</option>
113
+ <option value="20" style="font-size: 20px;">20</option>
114
+ <option value="21" style="font-size: 21px;">21</option>
115
+ </select>
116
+ </p>
117
+ </div>
118
+ <div class="access-option-container">
119
+ <p>
120
+ <label for="weight" id="weightLabel">Font weight:</label><br>
121
+ <select id="weight">
122
+ <option value="Default" style="font-weight: normal;">Default</option>
123
+ <option value="Bold" style="font-weight: bold;">Bold</option>
124
+ </select>
125
+ </p>
126
+ </div>
127
+ <div class="access-option-container">
128
+ <p>
129
+ <label for="letter" id="letterLabel">Letter spacing (px):</label><br>
130
+ <select id="letter">
131
+ <!-- Limitations of how the select element works prevent us from showing a preview of this element
132
+ in the dropdown -->
133
+ <option value="Default">Default</option>
134
+ <option value="0.5">0.5</option>
135
+ <option value="1.0">1.0</option>
136
+ <option value="1.5">1.5</option>
137
+ <option value="2.0">2.0</option>
138
+ <option value="2.5">2.5</option>
139
+ <option value="3.0">3.0</option>
140
+ <option value="3.5">3.5</option>
141
+ </select>
142
+ </p>
143
+ </div>
144
+ <div class="access-option-container">
145
+ <p>
146
+ <label for="line" id="lineLabel">Line spacing:</label><br>
147
+ <select id="line">
148
+ <!-- Limitations of how the select element works prevent us from showing a preview of this element
149
+ in the dropdown -->
150
+ <option value="Default">Default</option>
151
+ <option value="1.0">1.0</option>
152
+ <option value="1.1">1.1</option>
153
+ <option value="1.2">1.2</option>
154
+ <option value="1.3">1.3</option>
155
+ <option value="1.4">1.4</option>
156
+ <option value="1.5">1.5</option>
157
+ <option value="1.6">1.6</option>
158
+ <option value="1.7">1.7</option>
159
+ <option value="1.8">1.8</option>
160
+ <option value="1.9">1.9</option>
161
+ <option value="2.0">2.0</option>
162
+ </select>
163
+ </p>
164
+ </div>
165
+ <div class="access-option-container lm-only">
166
+ <p>
167
+ <label for="dark-colour" id="colourLabel">Primary font colour:</label><br>
168
+ <select id="dark-colour">
169
+ <option value="Default">Default</option>
170
+ <option value="White" style="color: White">White</option>
171
+ <option value="LightGrey" style="color: LightGrey">LightGrey</option>
172
+ <option value="DarkGrey" style="color: DarkGrey">DarkGrey</option>
173
+ <option value="Black" style="color: Black">Black</option>
174
+ <option value="LightBlue" style="color: LightBlue">LightBlue</option>
175
+ <option value="Blue" style="color: Blue">Blue</option>
176
+ <option value="DarkBlue" style="color: DarkBlue">DarkBlue</option>
177
+ <option value="Purple" style="color: Purple">Purple</option>
178
+ <option value="Pink" style="color: Pink">Pink</option>
179
+ <option value="Red" style="color: Red">Red</option>
180
+ <option value="DarkRed" style="color: DarkRed">DarkRed</option>
181
+ <option value="Orange" style="color: Orange">Orange</option>
182
+ <option value="Brown" style="color: Brown">Brown</option>
183
+ <option value="LightGreen" style="color: LightGreen">LightGreen</option>
184
+ <option value="Green" style="color: Green">Green</option>
185
+ <option value="DarkGreen" style="color: DarkGreen">DarkGreen</option>
186
+ </select>
187
+ </p>
188
+ </div>
189
+ <div class="access-option-container lm-only">
190
+ <p>
191
+ <label for="light-colour" id="lightColourLabel">Alternate font colour:</label><br>
192
+ <select id="light-colour">
193
+ <option value="Default">Default</option>
194
+ <option value="White" style="color: White">White</option>
195
+ <option value="LightGrey" style="color: LightGrey">LightGrey</option>
196
+ <option value="DarkGrey" style="color: DarkGrey">DarkGrey</option>
197
+ <option value="Black" style="color: Black">Black</option>
198
+ <option value="LightBlue" style="color: LightBlue">LightBlue</option>
199
+ <option value="Blue" style="color: Blue">Blue</option>
200
+ <option value="DarkBlue" style="color: DarkBlue">DarkBlue</option>
201
+ <option value="Purple" style="color: Purple">Purple</option>
202
+ <option value="Pink" style="color: Pink">Pink</option>
203
+ <option value="Red" style="color: Red">Red</option>
204
+ <option value="DarkRed" style="color: DarkRed">DarkRed</option>
205
+ <option value="Orange" style="color: Orange">Orange</option>
206
+ <option value="Brown" style="color: Brown">Brown</option>
207
+ <option value="LightGreen" style="color: LightGreen">LightGreen</option>
208
+ <option value="Green" style="color: Green">Green</option>
209
+ <option value="DarkGreen" style="color: DarkGreen">DarkGreen</option>
210
+ </select>
211
+ </p>
212
+ </div>
213
+ <div class="access-option-container lm-only">
214
+ <p>
215
+ <label for="lightBackground" id="lightBackgroundLabel">Primary background colour:</label><br>
216
+ <select id="light-background">
217
+ <option value="Default">Default</option>
218
+ <option value="White" style="background-color: White">White</option>
219
+ <option value="LightGrey" style="background-color: LightGrey">LightGrey</option>
220
+ <option value="DarkGrey" style="background-color: DarkGrey">DarkGrey</option>
221
+ <option value="Black" style="background-color: Black">Black</option>
222
+ <option value="LightBlue" style="background-color: LightBlue">LightBlue</option>
223
+ <option value="Blue" style="background-color: Blue">Blue</option>
224
+ <option value="DarkBlue" style="background-color: DarkBlue">DarkBlue</option>
225
+ <option value="Purple" style="background-color: Purple">Purple</option>
226
+ <option value="Pink" style="background-color: Pink">Pink</option>
227
+ <option value="Red" style="background-color: Red">Red</option>
228
+ <option value="DarkRed" style="background-color: DarkRed">DarkRed</option>
229
+ <option value="Orange" style="background-color: Orange">Orange</option>
230
+ <option value="Brown" style="background-color: Brown">Brown</option>
231
+ <option value="LightGreen" style="background-color: LightGreen">LightGreen</option>
232
+ <option value="Green" style="background-color: Green">Green</option>
233
+ <option value="DarkGreen" style="background-color: DarkGreen">DarkGreen</option>
234
+ </select>
235
+ </p>
236
+ </div>
237
+ <div class="access-option-container lm-only">
238
+ <p>
239
+ <label for="darkBackground" id="darkBackgroundLabel">Alternate background colour:</label><br>
240
+ <select id="dark-background">
241
+ <option value="Default">Default</option>
242
+ <option value="White" style="background-color: White">White</option>
243
+ <option value="LightGrey" style="background-color: LightGrey">LightGrey</option>
244
+ <option value="DarkGrey" style="background-color: DarkGrey">DarkGrey</option>
245
+ <option value="Black" style="background-color: Black">Black</option>
246
+ <option value="LightBlue" style="background-color: LightBlue">LightBlue</option>
247
+ <option value="Blue" style="background-color: Blue">Blue</option>
248
+ <option value="DarkBlue" style="background-color: DarkBlue">DarkBlue</option>
249
+ <option value="Purple" style="background-color: Purple">Purple</option>
250
+ <option value="Pink" style="background-color: Pink">Pink</option>
251
+ <option value="Red" style="background-color: Red">Red</option>
252
+ <option value="DarkRed" style="background-color: DarkRed">DarkRed</option>
253
+ <option value="Orange" style="background-color: Orange">Orange</option>
254
+ <option value="Brown" style="background-color: Brown">Brown</option>
255
+ <option value="LightGreen" style="background-color: LightGreen">Green</option>
256
+ <option value="Green" style="background-color: Green">Green</option>
257
+ <option value="DarkGreen" style="background-color: DarkGreen">DarkGreen</option>
258
+ </select>
259
+ </p>
260
+ </div>
261
+ </div>
262
+ <input type="button" class="button no-left-margin" value=" Save " id="saveButton">
263
+ <input type="button" class="button" value=" Reset " id="resetButton">
264
+ </div>
265
+
266
+ </div>
267
+ </div>
268
+ </form>
269
+
270
+ <footer class="footer" id="psdi-footer"></footer>
271
+
272
+ </body>
273
+
274
+ </html>
@@ -9,17 +9,20 @@
9
9
  <head>
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
11
  <title>PSDI Data Conversion Service</title>
12
- <link rel="icon" type="image/x-icon" href="../img/psdi-icon-dark.svg">
12
+ <link rel="icon" type="image/x-icon" href="{{url_for('static', filename='img/psdi-icon-dark.svg')}}">
13
13
  <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
14
  <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
15
- <link rel="stylesheet" href="../styles/format.css">
15
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans:400" rel="stylesheet" type="text/css">
16
+ <link href="https://fonts.googleapis.com/css?family=Lexend:400" rel="stylesheet" type="text/css">
17
+ <link rel="stylesheet" href="{{url_for('static', filename='styles/format.css')}}">
16
18
 
17
19
  <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
18
20
  crossorigin="anonymous"></script>
21
+ <script src="https://cdn.jsdelivr.net/jquery.dirtyforms/2.0.0/jquery.dirtyforms.min.js"></script>
19
22
 
20
- <script src="../javascript/load_accessibility.js"></script>
21
- <script src="../javascript/common.js" type="module"></script>
22
- <script src="../javascript/psdi-common.js" type="module"></script>
23
+ <script type="module" src="{{url_for('static', filename='javascript/load_accessibility.js')}}"></script>
24
+ <script type="module" src="{{url_for('static', filename='javascript/common.js')}}"></script>
25
+ <script type="module" src="{{url_for('static', filename='javascript/psdi-common.js')}}"></script>
23
26
  </head>
24
27
 
25
28
  <body marginwidth="0">
@@ -28,6 +31,14 @@
28
31
  <div id="cover"></div>
29
32
 
30
33
  <header class="header" id="psdi-header"></header>
34
+ <script type="module">
35
+ import { setHeaderLinksSource, setHeaderSource, setFooterSource } from "./static/javascript/psdi-common.js";
36
+ // Due to the index being a template which will exist in a different directory once rendered, we need to set
37
+ // a non-default location of the header links file
38
+ setHeaderSource("{{url_for('static', filename='content/index-versions/psdi-common-header.html')}}");
39
+ setFooterSource("{{url_for('static', filename='content/index-versions/psdi-common-footer.html')}}");
40
+ setHeaderLinksSource("{{url_for('static', filename='content/index-versions/header-links.html')}}");
41
+ </script>
31
42
 
32
43
  <div class="hero">
33
44
  <div class="max-width-box">
@@ -84,6 +95,15 @@
84
95
  in the changes being lost. Note that page appearance may vary slightly according to the browser used.</p>
85
96
  <p>The colour options here are not compatible with the dark-mode toggle in the header bar. If a custom dark scheme
86
97
  is desired, the appropriate colours can be selected in light-mode.</p>
98
+ <h3>About</h3>
99
+ <p><strong>PSDI Data Conversion service</strong><br>
100
+ {% if service_mode %}Public web service{% else %}Local GUI{%endif %} mode -
101
+ {% if production_mode %}Production{% else %}Development{%endif %} build <br>
102
+ {% if tag %}<strong>Version:</strong> {{ tag }}<br>{% endif %}
103
+ {% if sha %}<span class="dev-only"><strong>SHA of latest commit:</strong> {{ sha }}<br></span>{% endif %}
104
+ <strong>Project source:</strong> <a
105
+ href="https://github.com/PSDI-UK/psdi-data-conversion">https://github.com/PSDI-UK/psdi-data-conversion</a><br>
106
+ </p>
87
107
  <div class="medGap"></div>
88
108
  </div>
89
109
  </form>
@@ -9,7 +9,7 @@
9
9
  <head>
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
11
  <title>PSDI Data Conversion Service</title>
12
- <link rel="icon" type="image/x-icon" href="./static/img/psdi-icon-dark.svg">
12
+ <link rel="icon" type="image/x-icon" href="{{url_for('static', filename='img/psdi-icon-dark.svg')}}">
13
13
  <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
14
  <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
15
15
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:400" rel="stylesheet" type="text/css">
@@ -20,6 +20,10 @@
20
20
  crossorigin="anonymous"></script>
21
21
  <script src="https://cdn.jsdelivr.net/jquery.dirtyforms/2.0.0/jquery.dirtyforms.min.js"></script>
22
22
 
23
+ <script type="module" src="{{url_for('static', filename='javascript/load_accessibility.js')}}"></script>
24
+ <script type="module" src="{{url_for('static', filename='javascript/common.js')}}"></script>
25
+ <script type="module" src="{{url_for('static', filename='javascript/psdi-common.js')}}"></script>
26
+
23
27
  <script>
24
28
  const token = "{{token}}";
25
29
  const max_file_size = "{{max_file_size}}";
@@ -29,8 +33,6 @@
29
33
  document.documentElement.setAttribute("service-mode", service_mode);
30
34
  document.documentElement.setAttribute("production-mode", production_mode);
31
35
  </script>
32
-
33
- <script src="static/javascript/load_accessibility.js"></script>
34
36
  </head>
35
37
 
36
38
  <body marginwidth="0">
@@ -56,72 +58,87 @@
56
58
 
57
59
  <form name="gui" class="gui">
58
60
  <div class="max-width-box">
59
- <p>Your one-stop shop for file format conversion, PSDI's Data Conversion Service enables users to seamlessly
60
- convert between different file formats and assess the quality of proposed conversions. This is the web version
61
- of our service. To find out more about Data Conversion and our other tools, click
62
- <a href="https://resources.psdi.ac.uk/resource-themes/7bcc430a-fdc9-413e-bf32-bf163236430b" id="more"
61
+ <p>Your one-stop shop for file format conversion, PSDIs Data Conversion Service enables users to seamlessly
62
+ convert between different file formats and assess the quality of proposed conversions. This is the
63
+ {% if service_mode %}web{% else %}local GUI{% endif %} version of our service. To find out more about Data
64
+ Conversion and our other tools, click
65
+ <a href="https://resources.psdi.ac.uk/service/8334f94b-1c6e-4034-a5ab-71c6df375cba" id="more"
63
66
  target="_blank">here.</a>
64
67
  </p>
65
68
  <div id="format-selection">
66
- <p>Select 'from' and 'to' file formats in the 'Convert from/to' boxes, in either order. Typing where indicated
67
- filters the options (case insensitive); for example, typing 'can' or 'NON' reduces the number of options to
68
- one:
69
- 'can: Canonical SMILES.' If you change your mind about a conversion, it is advisable to click on the 'Reset'
70
- button. When both formats have been selected, converters able to carry out this conversion appear in the
71
- 'Conversion options' box along with an indication of conversion quality (many conversions have not yet been
72
- tested) and whether or not the converter is supported on this site.</p>
73
- <p>
74
- <label for="searchFrom" id="fromLabel">Convert from:</label><br>
75
- <input type="text" placeholder="-- type here to filter options --" size="12" id="searchFrom"
76
- class="large-width"><br>
77
- <select size="4" id="fromList" class="large-width"></select>
78
- </p>
79
- <div class="smallGap"></div>
80
- <p>
81
- <label for="searchTo" id="toLabel">Convert to:</label><br>
82
- <input type="text" placeholder="-- type here to filter options --" size="12" id="searchTo"
83
- class="large-width"><br>
84
- <select size="4" id="toList" class="large-width"></select>
85
- </p>
86
- <input type="button" class="button" value=" Reset " name="resetButton" id="resetButton">
87
- <br><br>
88
- <p>Selecting a converter displays information
89
- about it, along with a link to a relevant website. Selecting a supported converter affords the opportunity to
90
- carry out a conversion on this site. Clicking on the 'Yes' button takes us to the 'Conversion' page. If a
91
- file format has not been found, or if there are no converters capable of carrying out a required conversion
92
- please click on 'Report Missing Format/Conversion' in the navigation bar.</p>
93
- <p>
94
- <label for="success">Select from available conversion
95
- options:</label><br>
96
- <select size="4" id="success" class="large-width"></select>
97
- </p>
98
- <span class="normalText">Show how the conversion quality was determined for the selected converter.</span>
99
- <input type="button" class="button" value=" Show " name="showButton" id="showButton">
100
- <br>
101
- <h6>Converter details:</h6>
102
- <p id="converter" , class="init-hidden">
103
- <span id="name"></span>
104
- <br><span id="description"></span>
105
- <br><span id="url"></span>
106
- <br><span id="info"></span>
107
- <a id="visit" target="_blank">this website.</a>
108
- <div id="formatWarning" class="init-hidden"></div>
109
- <div id="offer" class="init-hidden">
110
- <span id="question"></span>
111
- <input type="button" class="button" value=" Yes " name="yesButton" id="yesButton">
69
+ <div class="flex-panel-display">
70
+ <div class="flex-panel instructions-panel">
71
+ <h6>Select formats for conversion</h6>
72
+ <p>Select “from” and “to” file formats in the “Convert from/to” boxes, in either order. Typing where
73
+ indicated filters the options (case insensitive); for example, typing “can” or “NON” reduces the number of
74
+ options to one: “can: Canonical SMILES.”
75
+ </p>
76
+ <p>If you change your mind about a conversion, click the “Reset” button.</p>
77
+ <p>When both formats have been selected, converters able to carry out this conversion appear in the
78
+ “Conversion options” box below along with an indication of conversion quality (many conversions have not
79
+ yet been tested) and whether or not the converter is supported on this site.</p>
80
+ </div>
81
+ <hr class="small-screen-only">
82
+ <div class="flex-panel">
83
+ <label for="searchFrom" id="fromLabel">Convert from:</label><br>
84
+ <input type="text" placeholder="-- type here to filter options --" size="12" id="searchFrom"
85
+ class="large-width"><br>
86
+ <select size="4" id="fromList" class="large-width"></select>
87
+ </p>
88
+ <div class="smallGap"></div>
89
+ <p>
90
+ <label for="searchTo" id="toLabel">Convert to:</label><br>
91
+ <input type="text" placeholder="-- type here to filter options --" size="12" id="searchTo"
92
+ class="large-width"><br>
93
+ <select size="4" id="toList" class="large-width"></select>
94
+ </p>
95
+ <input type="button" class="button" value=" Reset " name="resetButton" id="resetButton">
96
+ </div>
97
+ </div>
98
+ <div class="flex-panel-display">
99
+ <div class="flex-panel instructions-panel">
100
+ <h6>Select a converter</h6>
101
+ <p>Selecting a converter displays information about it, along with a link to a relevant website. Selecting a
102
+ supported converter affords the opportunity to carry out a conversion on this site. Clicking on the “Yes”
103
+ button takes us to the “Conversion” page. If a file format has not been found, or if there are no
104
+ converters capable of carrying out a required conversion please click on “Report Missing
105
+ Format/Conversion” in the navigation bar.
106
+ </p>
107
+ </div>
108
+ <hr class="small-screen-only">
109
+ <div class="flex-panel">
110
+ <p>
111
+ <label for="success">Select from available conversion options:</label><br>
112
+ <select size="4" id="success" class="large-width"></select>
113
+ </p>
114
+ <span class="normalText">Show how the conversion quality was determined for the selected converter.</span>
115
+ <input type="button" class="button" value=" Show " name="showButton" id="showButton">
116
+ <br>
117
+ <h6>Converter details:</h6>
118
+ <p id="converter" , class="init-hidden">
119
+ <span id="name"></span>
120
+ <br><span id="description"></span>
121
+ <br><span id="url"></span>
122
+ <br><span id="info"></span>
123
+ <a id="visit" target="_blank">this website.</a>
124
+ <div id="formatWarning" class="init-hidden"></div>
125
+ <div id="offer" class="init-hidden">
126
+ <span id="question"></span>
127
+ <input type="button" class="button" value=" Yes " name="yesButton" id="yesButton">
128
+ </div>
129
+ </p>
130
+ </div>
112
131
  </div>
113
- </p>
114
132
  </div>
115
133
  <div id="database-error" class="init-hidden">
116
134
  <p><strong>ERROR:</strong> Connection to the conversion database failed. Please try refreshing this page. If
117
- this issue persists, please report it to us using the "Contact" link in the header. You can also download
118
- a version of this service for local use using the "Download" link in the header if you'd prefer.</p>
135
+ this issue persists, please report it to us using the Contact link in the header. You can also download
136
+ a version of this service for local use using the Download link in the header if youd prefer.</p>
119
137
  </div>
120
- <div class="medGap"></div>
121
138
  </div>
122
139
  </form>
123
140
  {% if tag %}
124
- <div class="secondary prod-only">
141
+ <div class="secondary dev-only">
125
142
  <div class="max-width-box">PSDI Data Conversion {{ tag }} {% if sha %} (SHA: {{ sha }}) {% endif %}</div>
126
143
  </div>
127
144
  {% endif %}
@@ -9,19 +9,22 @@
9
9
  <head>
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
11
  <title>PSDI Data Conversion Service</title>
12
- <link rel="icon" type="image/x-icon" href="../img/psdi-icon-dark.svg">
12
+ <link rel="icon" type="image/x-icon" href="{{url_for('static', filename='img/psdi-icon-dark.svg')}}">
13
13
  <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
14
  <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
15
- <link rel="stylesheet" href="../styles/format.css">
15
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans:400" rel="stylesheet" type="text/css">
16
+ <link href="https://fonts.googleapis.com/css?family=Lexend:400" rel="stylesheet" type="text/css">
17
+ <link rel="stylesheet" href="{{url_for('static', filename='styles/format.css')}}">
16
18
 
17
19
  <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
18
20
  crossorigin="anonymous"></script>
19
21
  <script src="https://cdn.jsdelivr.net/jquery.dirtyforms/2.0.0/jquery.dirtyforms.min.js"></script>
20
22
 
21
- <script src="../javascript/load_accessibility.js"></script>
22
- <script src="../javascript/common.js" type="module"></script>
23
- <script src="../javascript/psdi-common.js" type="module"></script>
24
- <script src="../javascript/report.js" type="module" language="JavaScript"></script>
23
+
24
+ <script type="module" src="{{url_for('static', filename='javascript/load_accessibility.js')}}"></script>
25
+ <script type="module" src="{{url_for('static', filename='javascript/common.js')}}"></script>
26
+ <script type="module" src="{{url_for('static', filename='javascript/psdi-common.js')}}"></script>
27
+ <script type="module" src="{{url_for('static', filename='javascript/report.js')}}"></script>
25
28
 
26
29
  </head>
27
30
 
@@ -31,6 +34,14 @@
31
34
  <div id="cover"></div>
32
35
 
33
36
  <header class="header" id="psdi-header"></header>
37
+ <script type="module">
38
+ import { setHeaderLinksSource, setHeaderSource, setFooterSource } from "./static/javascript/psdi-common.js";
39
+ // Due to the index being a template which will exist in a different directory once rendered, we need to set
40
+ // a non-default location of the header links file
41
+ setHeaderSource("{{url_for('static', filename='content/index-versions/psdi-common-header.html')}}");
42
+ setFooterSource("{{url_for('static', filename='content/index-versions/psdi-common-footer.html')}}");
43
+ setHeaderLinksSource("{{url_for('static', filename='content/index-versions/header-links.html')}}");
44
+ </script>
34
45
 
35
46
  <div class="hero">
36
47
  <div class="max-width-box">
@@ -38,10 +49,12 @@
38
49
  </div>
39
50
  </div>
40
51
 
41
- <form name="gui" class="gui service-only">
52
+ {% if service_mode %}
53
+
54
+ <form name="gui" class="gui">
42
55
  <div class="max-width-box">
43
56
  <p>Select the type of report (missing file format or conversion) and then follow the instructions that appear.
44
- <p><b>Finally:</b> click on 'Report.'</p><br>
57
+ <p><b>Finally:</b> click on Report.”</p><br>
45
58
  <select id="reason" class="med-width">
46
59
  <option value="placeholder">-- select type of report --</option>
47
60
  <option value="format">Missing file format</option>
@@ -62,7 +75,7 @@
62
75
  <br><input type="text" placeholder="-- type here --" id="missingFormat" class="large-width">
63
76
  </div>
64
77
  <div id="in_out_formats" class="init-hidden">
65
- <br>Select the required 'to' and 'from' formats below.
78
+ <br>Select the required to and from formats below.
66
79
  <p>
67
80
  <label for="searchFrom" id="fromLabel">Convert from:</label><br>
68
81
  <input type="text" placeholder="-- type here to filter options --" id="searchFrom" class="large-width"><br>
@@ -83,10 +96,11 @@
83
96
  <br><input type="text" placeholder="-- type here --" id="in" class="large-width">
84
97
  <br><input type="button" class="button" value=" Report " id="reportButton">
85
98
  </p>
86
- <div class="medGap"></div>
87
99
  </div>
88
100
  </form>
89
101
 
102
+ {% else %}
103
+
90
104
  <form name="gui" class="gui local-only">
91
105
  <div class="max-width-box">
92
106
  <div class="smallGap"></div>
@@ -99,6 +113,10 @@
99
113
  </div>
100
114
  </form>
101
115
 
116
+ {%endif %}
117
+
118
+ <div class="medGap"></div>
119
+
102
120
  <footer class="footer" id="psdi-footer"></footer>
103
121
 
104
122
  </body>