psdi-data-conversion 0.1.7__py3-none-any.whl → 0.2.1__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.
- psdi_data_conversion/app.py +5 -408
- psdi_data_conversion/constants.py +12 -8
- psdi_data_conversion/converter.py +41 -28
- psdi_data_conversion/converters/base.py +18 -13
- psdi_data_conversion/database.py +292 -88
- psdi_data_conversion/gui/__init__.py +5 -0
- psdi_data_conversion/gui/accessibility.py +51 -0
- psdi_data_conversion/gui/env.py +239 -0
- psdi_data_conversion/gui/get.py +53 -0
- psdi_data_conversion/gui/post.py +176 -0
- psdi_data_conversion/gui/setup.py +102 -0
- psdi_data_conversion/main.py +70 -13
- psdi_data_conversion/static/content/convert.htm +105 -74
- psdi_data_conversion/static/content/convertato.htm +36 -26
- psdi_data_conversion/static/content/convertc2x.htm +39 -26
- psdi_data_conversion/static/content/download.htm +5 -5
- psdi_data_conversion/static/content/feedback.htm +2 -2
- psdi_data_conversion/static/content/header-links.html +2 -2
- psdi_data_conversion/static/content/index-versions/header-links.html +2 -2
- psdi_data_conversion/static/content/index-versions/psdi-common-header.html +9 -12
- psdi_data_conversion/static/content/psdi-common-header.html +9 -12
- psdi_data_conversion/static/javascript/accessibility.js +88 -61
- psdi_data_conversion/static/javascript/data.js +1 -3
- psdi_data_conversion/static/javascript/load_accessibility.js +50 -33
- psdi_data_conversion/static/styles/format.css +72 -18
- psdi_data_conversion/templates/accessibility.htm +274 -0
- psdi_data_conversion/templates/documentation.htm +6 -6
- psdi_data_conversion/templates/index.htm +73 -56
- psdi_data_conversion/{static/content → templates}/report.htm +28 -10
- psdi_data_conversion/testing/conversion_test_specs.py +26 -6
- psdi_data_conversion/testing/utils.py +6 -6
- {psdi_data_conversion-0.1.7.dist-info → psdi_data_conversion-0.2.1.dist-info}/METADATA +9 -3
- {psdi_data_conversion-0.1.7.dist-info → psdi_data_conversion-0.2.1.dist-info}/RECORD +36 -30
- psdi_data_conversion/static/content/accessibility.htm +0 -255
- {psdi_data_conversion-0.1.7.dist-info → psdi_data_conversion-0.2.1.dist-info}/WHEEL +0 -0
- {psdi_data_conversion-0.1.7.dist-info → psdi_data_conversion-0.2.1.dist-info}/entry_points.txt +0 -0
- {psdi_data_conversion-0.1.7.dist-info → psdi_data_conversion-0.2.1.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,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="
|
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,9 +20,9 @@
|
|
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 src="static
|
24
|
-
<script src="static
|
25
|
-
<script src="static
|
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
26
|
</head>
|
27
27
|
|
28
28
|
<body marginwidth="0">
|
@@ -97,8 +97,8 @@
|
|
97
97
|
is desired, the appropriate colours can be selected in light-mode.</p>
|
98
98
|
<h3>About</h3>
|
99
99
|
<p><strong>PSDI Data Conversion service</strong><br>
|
100
|
-
|
101
|
-
|
100
|
+
{% if service_mode %}Public web service{% else %}Local GUI{%endif %} mode -
|
101
|
+
{% if production_mode %}Production{% else %}Development{%endif %} build <br>
|
102
102
|
{% if tag %}<strong>Version:</strong> {{ tag }}<br>{% endif %}
|
103
103
|
{% if sha %}<span class="dev-only"><strong>SHA of latest commit:</strong> {{ sha }}<br></span>{% endif %}
|
104
104
|
<strong>Project source:</strong> <a
|
@@ -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="
|
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,68 +58,83 @@
|
|
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
|
60
|
-
convert between different file formats and assess the quality of proposed conversions. This is the
|
61
|
-
of our service. To find out more about Data
|
61
|
+
<p>Your one-stop shop for file format conversion, PSDI’s 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
|
62
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
|
-
<
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
class="large-width"
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
<
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
<
|
106
|
-
<
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
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
|
118
|
-
a version of this service for local use using the
|
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 you’d prefer.</p>
|
119
137
|
</div>
|
120
|
-
<div class="medGap"></div>
|
121
138
|
</div>
|
122
139
|
</form>
|
123
140
|
{% if tag %}
|
@@ -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="
|
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"
|
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
|
-
|
22
|
-
<script src="
|
23
|
-
<script src="
|
24
|
-
<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
|
-
|
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
|
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
|
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>
|
@@ -228,19 +228,39 @@ Not compatible with the GUI, since the GUI can't forcibly delete files uploaded
|
|
228
228
|
"""
|
229
229
|
|
230
230
|
l_all_test_specs.append(Spec(name="Failed conversion - bad input file",
|
231
|
-
filename=["quartz_err.xyz", "
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
231
|
+
filename=["quartz_err.xyz", "quartz_err.xyz",
|
232
|
+
"quartz_err.xyz",
|
233
|
+
"cyclopropane_err.mol", "nacl.cif"],
|
234
|
+
to_format=["inchi", "mol-0",
|
235
|
+
"pdb",
|
236
|
+
"xyz-0", "bands"],
|
237
|
+
from_format=[None, None,
|
238
|
+
None,
|
239
|
+
"mol-0", None],
|
240
|
+
expect_success=[False, True,
|
241
|
+
True,
|
242
|
+
False, True],
|
243
|
+
converter_name=[CONVERTER_OB, CONVERTER_OB,
|
244
|
+
CONVERTER_ATO,
|
245
|
+
CONVERTER_C2X, CONVERTER_C2X],
|
236
246
|
callback=[MCB(CheckFileStatus(expect_output_exists=False,
|
237
247
|
expect_log_exists=None),
|
238
248
|
CheckException(ex_type=FileConverterAbortException,
|
239
249
|
ex_message="Problems reading an XYZ file")),
|
250
|
+
MCB(CheckFileStatus(expect_output_exists=True,
|
251
|
+
expect_log_exists=True),
|
252
|
+
CheckLogContents("Problems reading an XYZ file: Could not read line #11, "
|
253
|
+
"file error.")),
|
254
|
+
MCB(CheckFileStatus(expect_output_exists=True,
|
255
|
+
expect_log_exists=True),
|
256
|
+
CheckLogContents("ERROR while trying to read atom #9")),
|
240
257
|
MCB(CheckFileStatus(expect_output_exists=False,
|
241
258
|
expect_log_exists=None),
|
242
259
|
CheckException(ex_type=FileConverterAbortException,
|
243
|
-
ex_message="Aborting: mol file contains no atoms"))
|
260
|
+
ex_message="Aborting: mol file contains no atoms")),
|
261
|
+
MCB(CheckFileStatus(expect_output_exists=None,
|
262
|
+
expect_log_exists=True),
|
263
|
+
CheckLogContents("No eigenvalues to write!"))],
|
244
264
|
))
|
245
265
|
"""A test that a conversion that fails due to an unreadable input file will properly fail"""
|
246
266
|
|