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
psdi_data_conversion/main.py
CHANGED
@@ -18,13 +18,12 @@ from psdi_data_conversion import constants as const
|
|
18
18
|
from psdi_data_conversion.constants import CL_SCRIPT_NAME, CONVERTER_DEFAULT, TERM_WIDTH
|
19
19
|
from psdi_data_conversion.converter import (D_CONVERTER_ARGS, L_REGISTERED_CONVERTERS, L_SUPPORTED_CONVERTERS,
|
20
20
|
converter_is_registered, converter_is_supported,
|
21
|
-
|
22
|
-
run_converter)
|
21
|
+
get_supported_converter_class, run_converter)
|
23
22
|
from psdi_data_conversion.converters.base import (FileConverterAbortException, FileConverterException,
|
24
23
|
FileConverterInputException)
|
25
|
-
from psdi_data_conversion.database import (FormatInfo,
|
26
|
-
|
27
|
-
get_possible_formats)
|
24
|
+
from psdi_data_conversion.database import (FormatInfo, get_conversion_pathway, get_conversion_quality,
|
25
|
+
get_converter_info, get_format_info, get_in_format_args,
|
26
|
+
get_out_format_args, get_possible_conversions, get_possible_formats)
|
28
27
|
from psdi_data_conversion.file_io import split_archive_ext
|
29
28
|
from psdi_data_conversion.log_utility import get_log_level_from_str
|
30
29
|
from psdi_data_conversion.utils import regularize_name
|
@@ -554,9 +553,29 @@ def detail_format(format_name: str):
|
|
554
553
|
"necessary to explicitly specify which you want to use when calling this script, e.g. with "
|
555
554
|
f"'-f {format_name}-0' - see the disambiguated names in the list below:", newline=True)
|
556
555
|
|
556
|
+
first = True
|
557
557
|
for format_info in l_format_info:
|
558
|
+
|
559
|
+
# Add linebreak before each after the first
|
560
|
+
if first:
|
561
|
+
first = False
|
562
|
+
else:
|
563
|
+
print()
|
564
|
+
|
565
|
+
# Print the format's basic details
|
558
566
|
print_wrap(f"{format_info.id}: {format_info.disambiguated_name} ({format_info.note})")
|
559
567
|
|
568
|
+
# Print whether or not it supports each possible property
|
569
|
+
for attr, label in FormatInfo.D_PROPERTY_ATTRS.items():
|
570
|
+
support_str = label
|
571
|
+
if getattr(format_info, attr):
|
572
|
+
support_str += " supported"
|
573
|
+
elif getattr(format_info, attr) is False:
|
574
|
+
support_str += " not supported"
|
575
|
+
else:
|
576
|
+
support_str += " unknown whether or not to be supported"
|
577
|
+
print_wrap(f"- {support_str}")
|
578
|
+
|
560
579
|
|
561
580
|
def detail_formats_and_possible_converters(from_format: str, to_format: str):
|
562
581
|
"""Prints details on converters that can perform a conversion from one format to another
|
@@ -589,6 +608,44 @@ def detail_formats_and_possible_converters(from_format: str, to_format: str):
|
|
589
608
|
|
590
609
|
l_possible_conversions = get_possible_conversions(from_format, to_format)
|
591
610
|
|
611
|
+
# Check if no direct conversions are possible, and if formats are specified uniquely, recommend a chained conversion
|
612
|
+
if len(l_possible_conversions) == 0:
|
613
|
+
print()
|
614
|
+
print_wrap(f"No direct conversions are possible from {from_format} to {to_format}")
|
615
|
+
print()
|
616
|
+
|
617
|
+
l_from_formats = get_format_info(from_format, which="all")
|
618
|
+
l_to_formats = get_format_info(to_format, which="all")
|
619
|
+
|
620
|
+
if len(l_from_formats) == 1 and len(l_to_formats) == 1:
|
621
|
+
|
622
|
+
for only in "registered", "supported", "all":
|
623
|
+
pathway = get_conversion_pathway(l_from_formats[0], l_to_formats[0], only=only)
|
624
|
+
if pathway is None:
|
625
|
+
continue
|
626
|
+
|
627
|
+
if only == "registered" or only == "supported":
|
628
|
+
converter_type_needed = only
|
629
|
+
else:
|
630
|
+
converter_type_needed = "unsupported"
|
631
|
+
print_wrap(f"A chained conversion is possible from {from_format} to {to_format} using "
|
632
|
+
f"{converter_type_needed} converters:")
|
633
|
+
|
634
|
+
for i, step in enumerate(pathway):
|
635
|
+
print_wrap(f"{i+1}) Convert from {step[1].name} to {step[2].name} with {step[0].pretty_name}")
|
636
|
+
|
637
|
+
print()
|
638
|
+
print_wrap("Chained conversion is not yet supported by this utility, but will be added soon")
|
639
|
+
|
640
|
+
break
|
641
|
+
|
642
|
+
else:
|
643
|
+
print_wrap(f"No chained conversions are possible from {from_format} to {to_format}.")
|
644
|
+
|
645
|
+
else:
|
646
|
+
print_wrap("To see possible chained conversions, specify each format uniquely using the ID or "
|
647
|
+
"disambiguated name (e.g. \"xxx-0\") listed above)")
|
648
|
+
|
592
649
|
# Get a list of all different formats which share the provided name, cutting out duplicates
|
593
650
|
l_from_formats = list(set([x[1] for x in l_possible_conversions]))
|
594
651
|
l_from_formats.sort(key=lambda x: x.disambiguated_name)
|
@@ -598,6 +655,7 @@ def detail_formats_and_possible_converters(from_format: str, to_format: str):
|
|
598
655
|
# Loop over all possible combinations of formats
|
599
656
|
|
600
657
|
for possible_from_format, possible_to_format in product(l_from_formats, l_to_formats):
|
658
|
+
print()
|
601
659
|
|
602
660
|
from_name = possible_from_format.disambiguated_name
|
603
661
|
to_name = possible_to_format.disambiguated_name
|
@@ -605,14 +663,13 @@ def detail_formats_and_possible_converters(from_format: str, to_format: str):
|
|
605
663
|
l_conversions_matching_formats = [x for x in l_possible_conversions
|
606
664
|
if x[1] == possible_from_format and x[2] == possible_to_format]
|
607
665
|
|
608
|
-
l_possible_registered_converters = [
|
666
|
+
l_possible_registered_converters = [x[0].pretty_name
|
609
667
|
for x in l_conversions_matching_formats
|
610
|
-
if x[0] in L_REGISTERED_CONVERTERS]
|
611
|
-
l_possible_unregistered_converters = [
|
668
|
+
if x[0].name in L_REGISTERED_CONVERTERS]
|
669
|
+
l_possible_unregistered_converters = [x[0].pretty_name
|
612
670
|
for x in l_conversions_matching_formats
|
613
|
-
if x[0] in L_SUPPORTED_CONVERTERS
|
614
|
-
|
615
|
-
print()
|
671
|
+
if x[0].name in L_SUPPORTED_CONVERTERS
|
672
|
+
and x[0].name not in L_REGISTERED_CONVERTERS]
|
616
673
|
|
617
674
|
if len(l_possible_registered_converters)+len(l_possible_unregistered_converters) == 0:
|
618
675
|
print_wrap(f"No converters are available which can perform a conversion from {from_name} to "
|
@@ -769,8 +826,8 @@ def run_from_args(args: ConvertArgs):
|
|
769
826
|
name=args.name,
|
770
827
|
data=data,
|
771
828
|
use_envvars=False,
|
772
|
-
|
773
|
-
|
829
|
+
input_dir=args.input_dir,
|
830
|
+
output_dir=args.output_dir,
|
774
831
|
no_check=args.no_check,
|
775
832
|
strict=args.strict,
|
776
833
|
log_file=args.log_file,
|
@@ -49,87 +49,118 @@
|
|
49
49
|
</a>
|
50
50
|
<br>
|
51
51
|
<br>
|
52
|
-
<
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
click just underneath the final option. Ticking a check box reveals a text box for entry of required
|
57
|
-
information, along with further explanation if available.
|
58
|
-
</p>
|
59
|
-
<h6 id="heading"></h6>
|
60
|
-
<div id="flags">
|
61
|
-
<div id="inFlagList">
|
52
|
+
<h5 id="heading"></h5>
|
53
|
+
<div class="flex-panel-display">
|
54
|
+
<div class="flex-panel instructions-panel">
|
55
|
+
<h6>Select flags and options for the file formats</h6>
|
62
56
|
<p>
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
57
|
+
One or more input or output flags may be selected if required (command click [Mac] or control click
|
58
|
+
[Windows] for multiple select box selections). To undo all selections in a box, click just underneath the
|
59
|
+
final option. Ticking a check box reveals a text box for entry of required information, along with further
|
60
|
+
explanation if available.
|
61
|
+
</p>
|
62
|
+
<p>Zero to two option flag select boxes and zero to two sets of option flag check boxes may be displayed,
|
63
|
+
depending on the conversion and the degree of completion of the database. Further information may be
|
64
|
+
displayed underneath the select boxes if available.
|
65
|
+
</p>
|
66
|
+
</div>
|
67
|
+
<hr class="small-screen-only">
|
68
|
+
<div class="flex-panel">
|
69
|
+
<div id="flags">
|
70
|
+
<div id="inFlagList">
|
71
|
+
<p>
|
72
|
+
<label for="inFlags" id="in_label">Read (input) option flags
|
73
|
+
(hold CTRL to select multiple, or CTRL+click a selected option to unselect):</label>
|
74
|
+
<select id="inFlags" class="large-width" size="4" multiple="multiple"></select>
|
75
|
+
<div id=inFlagInfo></div>
|
76
|
+
</p>
|
77
|
+
</div>
|
78
|
+
<div id="outFlagList">
|
79
|
+
<p>
|
80
|
+
<label for="outFlags" id="out_label">Write (output) option flags
|
81
|
+
(hold CTRL to select multiple, or CTRL+click a selected option to unselect):</label>
|
82
|
+
<select id="outFlags" class="large-width" size="4" multiple="multiple"></select>
|
83
|
+
<div id=outFlagInfo></div>
|
84
|
+
</p>
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
<span id="in_argLabel">Read (input) option flags requiring further information (select all required):</span>
|
88
|
+
<table id="in_argFlags"></table>
|
89
|
+
<div id="flag_break"><br /></div>
|
90
|
+
<span id="out_argLabel">Write (output) option flags requiring further information (select all
|
91
|
+
required):</span>
|
92
|
+
<table id="out_argFlags"></table>
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
<div class="flex-panel-display">
|
96
|
+
<div class="flex-panel instructions-panel">
|
97
|
+
<h6>Select coordinate generation mode</h6>
|
98
|
+
<p>If 2- or 3-dimensional atomic coordinates need to be calculated (e.g., if they do not already exist in the
|
99
|
+
input file), select “2D” or “3D” and a speed/accuracy option (“fastest” is least accurate). Note that this
|
100
|
+
calculation is not appropriate for all file formats, so in these cases selections will be ignored.
|
101
|
+
</p>
|
102
|
+
</div>
|
103
|
+
<hr class="small-screen-only">
|
104
|
+
<div class="flex-panel">
|
105
|
+
<p>
|
106
|
+
<label for="coordinates">Select “2D” or “3D” if an Open Babel calculation of 2- or 3-dimensional atomic
|
107
|
+
coordinates is required. Ensure that this calculation is suitable for your purpose.<br>For more
|
108
|
+
information,
|
109
|
+
visit <a href="https://openbabel.org/docs/3DStructureGen/SingleConformer.html#gen3d" target="_blank">this
|
110
|
+
website.</a></label><br>
|
111
|
+
<input type="radio" name="coordinates" id="coordinates" value="Gen2D"> 2D
|
112
|
+
<input type="radio" name="coordinates" id="coordinates" value="Gen3D"> 3D
|
113
|
+
<input type="radio" name="coordinates" id="coordinates" value="neither" checked="checked">
|
114
|
+
neither
|
115
|
+
</p>
|
116
|
+
<p>
|
117
|
+
<label for="coordOptions"> Calculation options range from 'fastest'
|
118
|
+
(least accurate) to “best” (slowest).</label><br>
|
119
|
+
<input type="radio" name="coordOptions" id="coordOptions" value="fastest" disabled=true> fastest
|
120
|
+
<input type="radio" name="coordOptions" id="coordOptions" value="fast" disabled=true> fast
|
121
|
+
<input type="radio" name="coordOptions" id="coordOptions" value="medium" checked="checked" disabled=true>
|
122
|
+
medium
|
123
|
+
<input type="radio" name="coordOptions" id="coordOptions" value="better" disabled=true> better
|
124
|
+
<input type="radio" name="coordOptions" id="coordOptions" value="best" disabled=true> best
|
68
125
|
</p>
|
69
126
|
</div>
|
70
|
-
|
127
|
+
</div>
|
128
|
+
<div class="flex-panel-display">
|
129
|
+
<div class="flex-panel instructions-panel">
|
130
|
+
<h6>Upload the file and run the conversion</h6>
|
131
|
+
<p>Click on “Choose file” and then select an input file of the correct format (and extension). Clicking on
|
132
|
+
“Convert” uploads and converts the file. The output file is automatically downloaded, along with a log file.
|
133
|
+
</p>
|
71
134
|
<p>
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
135
|
+
If any issues are encountered (e.g., the output file does not download), please click on “Provide Feedback”
|
136
|
+
in the navigation bar.
|
137
|
+
</p>
|
138
|
+
</div>
|
139
|
+
<hr class="small-screen-only">
|
140
|
+
<div class="flex-panel">
|
141
|
+
<p id="convertFile">
|
142
|
+
<input type="checkbox" checked id="extCheck"> Enforce file naming checking to ensure uploaded files (and
|
143
|
+
files
|
144
|
+
contained in archives) all have the correct extension<br>
|
145
|
+
<input type="checkbox" id="requestLog"> Also download log file for the conversion<br>
|
146
|
+
Select file to convert<span class="max-file-size"></span>:
|
147
|
+
<br>
|
148
|
+
<input type="file" name="fileToUpload" id="fileToUpload">
|
149
|
+
<input type="button" class="button no-left-margin" value=" Clear Uploaded File " name="clearUpload"
|
150
|
+
id="clearUpload">
|
151
|
+
<br>
|
152
|
+
If you have sensitive data you might prefer to use
|
153
|
+
<a href="download.htm">one of our downloadable tools or Python library</a> rather than uploading your data
|
154
|
+
to
|
155
|
+
our service.<br>
|
156
|
+
<span class="convert-button-and-spinner">
|
157
|
+
<input type="button" class="button init-disabled no-left-margin" value=" Convert " name="uploadButton"
|
158
|
+
id="uploadButton" disabled=true>
|
159
|
+
<span class="loading-spinner spinner-border"></span>
|
160
|
+
</span>
|
77
161
|
</p>
|
78
162
|
</div>
|
79
163
|
</div>
|
80
|
-
<span id="in_argLabel">Read (input) option flags requiring further information (select all required):</span>
|
81
|
-
<table id="in_argFlags"></table>
|
82
|
-
<div id="flag_break"><br /></div>
|
83
|
-
<span id="out_argLabel">Write (output) option flags requiring further information (select all required):</span>
|
84
|
-
<table id="out_argFlags"></table>
|
85
|
-
<p>If 2- or 3-dimensional atomic coordinates need to be calculated (e.g., if they do not already exist in the
|
86
|
-
input file), select '2D' or '3D' and a speed/accuracy option ('fastest' is least accurate).
|
87
|
-
Note that this calculation is not appropriate for all file formats, so in these cases selections will be
|
88
|
-
ignored.
|
89
|
-
Click on 'Choose file' and then select an input file of the correct format (and extension). Clicking on
|
90
|
-
'Convert'
|
91
|
-
uploads and converts the file. The output file is automatically downloaded, along with a log file. If any issues
|
92
|
-
are encountered (e.g., the output file does not download), please click on 'Provide Feedback' in the navigation
|
93
|
-
bar.
|
94
|
-
</p>
|
95
|
-
<p>
|
96
|
-
<label for="coordinates">Select '2D' or '3D' if an Open Babel calculation of 2- or 3-dimensional atomic
|
97
|
-
coordinates is required. Ensure that this calculation is suitable for your purpose.<br>For more information,
|
98
|
-
visit <a href="https://openbabel.org/docs/3DStructureGen/SingleConformer.html#gen3d" target="_blank">this
|
99
|
-
website.</a></label><br>
|
100
|
-
<input type="radio" name="coordinates" id="coordinates" value="Gen2D"> 2D
|
101
|
-
<input type="radio" name="coordinates" id="coordinates" value="Gen3D"> 3D
|
102
|
-
<input type="radio" name="coordinates" id="coordinates" value="neither" checked="checked">
|
103
|
-
neither
|
104
|
-
</p>
|
105
|
-
<p>
|
106
|
-
<label for="coordOptions"> Calculation options range from 'fastest'
|
107
|
-
(least accurate) to 'best' (slowest).</label><br>
|
108
|
-
<input type="radio" name="coordOptions" id="coordOptions" value="fastest" disabled=true> fastest
|
109
|
-
<input type="radio" name="coordOptions" id="coordOptions" value="fast" disabled=true> fast
|
110
|
-
<input type="radio" name="coordOptions" id="coordOptions" value="medium" checked="checked" disabled=true> medium
|
111
|
-
<input type="radio" name="coordOptions" id="coordOptions" value="better" disabled=true> better
|
112
|
-
<input type="radio" name="coordOptions" id="coordOptions" value="best" disabled=true> best
|
113
|
-
</p>
|
114
|
-
<p id="convertFile">
|
115
|
-
<input type="checkbox" checked id="extCheck"> Enforce file naming checking to ensure uploaded files (and files
|
116
|
-
contained in archives) all have the correct extension<br>
|
117
|
-
<input type="checkbox" id="requestLog"> Also download log file for the conversion<br>
|
118
|
-
Select file to convert<span class="max-file-size"></span>:
|
119
|
-
<br>
|
120
|
-
<input type="file" name="fileToUpload" id="fileToUpload">
|
121
|
-
<input type="button" class="button" value=" Clear Uploaded File " name="clearUpload" id="clearUpload">
|
122
|
-
<br>
|
123
|
-
If you have sensitive data you might prefer to use
|
124
|
-
<a href="download.htm">one of our downloadable tools or Python library</a> rather than uploading your data to
|
125
|
-
our service.<br>
|
126
|
-
<span class="convert-button-and-spinner">
|
127
|
-
<input type="button" class="button init-disabled" value=" Convert " name="uploadButton" id="uploadButton"
|
128
|
-
disabled=true>
|
129
|
-
<span class="loading-spinner spinner-border"></span>
|
130
|
-
</span>
|
131
|
-
</p>
|
132
|
-
<div class="medGap"></div>
|
133
164
|
</div>
|
134
165
|
</form>
|
135
166
|
|
@@ -50,33 +50,43 @@
|
|
50
50
|
</a>
|
51
51
|
<br>
|
52
52
|
<br>
|
53
|
-
<
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
<
|
68
|
-
<
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
53
|
+
<h5 id="heading"></h5>
|
54
|
+
<div class="flex-panel-display">
|
55
|
+
<div class="flex-panel instructions-panel">
|
56
|
+
<h6>Upload the file and run the conversion</h6>
|
57
|
+
<p>Click on “Choose file” and then select an input file of the correct format (and extension). Clicking on
|
58
|
+
“Convert” uploads and converts the file. The output file is automatically downloaded, along with a log
|
59
|
+
file.
|
60
|
+
</p>
|
61
|
+
<p>
|
62
|
+
If any issues are encountered (e.g., the output file does not download), please click on “Provide
|
63
|
+
Feedback”
|
64
|
+
in the navigation bar.
|
65
|
+
</p>
|
66
|
+
</div>
|
67
|
+
<hr class="small-screen-only">
|
68
|
+
<div class="flex-panel">
|
69
|
+
<p id="convertFile">
|
70
|
+
<input type="checkbox" checked id="extCheck"> Enforce file naming checking to ensure uploaded files (and
|
71
|
+
files contained in archives) all have the correct extension<br>
|
72
|
+
<input type="checkbox" id="requestLog"> Also download log file for the conversion<br>
|
73
|
+
Select file to convert<span class="max-file-size"></span>:
|
74
|
+
<br>
|
75
|
+
<input type="file" name="fileToUpload" id="fileToUpload">
|
76
|
+
<input type="button" class="button no-left-margin" value=" Clear Uploaded File " name="clearUpload"
|
77
|
+
id="clearUpload">
|
78
|
+
<br>
|
79
|
+
If you have sensitive data you might prefer to use <a href="download.htm">one of our downloadable tools or
|
80
|
+
Python library</a> rather than uploading your data to our service.<br>
|
81
|
+
<span class="convert-button-and-spinner">
|
82
|
+
<input type="button" class="button init-disabled no-left-margin" value=" Convert " name="uploadButton"
|
83
|
+
id="uploadButton" disabled=true>
|
84
|
+
<span class="loading-spinner spinner-border"></span>
|
85
|
+
</span>
|
86
|
+
</p>
|
87
|
+
</div>
|
88
|
+
</div>
|
78
89
|
</div>
|
79
|
-
<div class="largeGap"></div>
|
80
90
|
</div>
|
81
91
|
</form>
|
82
92
|
|
@@ -51,33 +51,46 @@
|
|
51
51
|
</a>
|
52
52
|
<br>
|
53
53
|
<br>
|
54
|
-
<
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
<
|
69
|
-
<
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
54
|
+
<h5 id="heading"></h5>
|
55
|
+
<div class="flex-panel-display">
|
56
|
+
<div class="flex-panel instructions-panel">
|
57
|
+
<h6>Upload the file and run the conversion</h6>
|
58
|
+
<p>Click on “Choose file” and then select an input file of the correct format (and extension). Clicking on
|
59
|
+
“Convert” uploads and converts the file. The output file is automatically downloaded, along with a log
|
60
|
+
file.
|
61
|
+
</p>
|
62
|
+
<p>
|
63
|
+
If any issues are encountered (e.g., the output file does not download), please click on “Provide
|
64
|
+
Feedback”
|
65
|
+
in the navigation bar.
|
66
|
+
</p>
|
67
|
+
</div>
|
68
|
+
<hr class="small-screen-only">
|
69
|
+
<div class="flex-panel">
|
70
|
+
<p id="convertFile">
|
71
|
+
<input type="checkbox" checked id="extCheck"> Enforce file naming checking to ensure uploaded files (and
|
72
|
+
files
|
73
|
+
contained in archives) all have the correct extension<br>
|
74
|
+
<input type="checkbox" id="requestLog"> Also download log file for the conversion<br>
|
75
|
+
Select file to convert<span class="max-file-size"></span>:
|
76
|
+
<br>
|
77
|
+
<input type="file" name="fileToUpload" id="fileToUpload">
|
78
|
+
<input type="button" class="button no-left-margin" value=" Clear Uploaded File " name="clearUpload"
|
79
|
+
id="clearUpload">
|
80
|
+
<br>
|
81
|
+
If you have sensitive data you might prefer to use
|
82
|
+
<a href="download.htm">one of our downloadable tools or Python library</a> rather than uploading your data
|
83
|
+
to
|
84
|
+
our service.<br>
|
85
|
+
<span class="convert-button-and-spinner">
|
86
|
+
<input type="button" class="button init-disabled no-left-margin" value=" Convert " name="uploadButton"
|
87
|
+
id="uploadButton" disabled=true>
|
88
|
+
<span class="loading-spinner spinner-border"></span>
|
89
|
+
</span>
|
90
|
+
</p>
|
91
|
+
</div>
|
92
|
+
</div>
|
79
93
|
</div>
|
80
|
-
<div class="largeGap"></div>
|
81
94
|
</div>
|
82
95
|
</form>
|
83
96
|
|
@@ -52,7 +52,7 @@
|
|
52
52
|
</ul>
|
53
53
|
|
54
54
|
<p>
|
55
|
-
The easiest way to install the project is via Python
|
55
|
+
The easiest way to install the project is via Python’s pip utility. If you do not already have this installed,
|
56
56
|
the readme in the link above provides details on installing Python and pip. If you do, you can install the
|
57
57
|
package via:
|
58
58
|
</p>
|
@@ -71,14 +71,14 @@
|
|
71
71
|
<li><a href="https://github.com/PSDI-UK/psdi-data-conversion">PSDI Data Conversion Project on GitHub</a></li>
|
72
72
|
</ul>
|
73
73
|
|
74
|
-
The project
|
74
|
+
The project’s source code is available on GitHub at the link above. If you wish to install it from source, you
|
75
75
|
can clone the repository, and then install it via:
|
76
76
|
|
77
77
|
<pre><code class="secondary">pip install .[gui-test]</code></pre>
|
78
78
|
|
79
79
|
<p>
|
80
80
|
The <code class="secondary">[gui-test]</code> portion installs all optional components for running the local
|
81
|
-
webpage and testing all project components. See the project
|
81
|
+
webpage and testing all project components. See the project’s <code class="secondary">pyproject.toml</code> file
|
82
82
|
for other possible optional dependencies sets that can be installed.
|
83
83
|
</p>
|
84
84
|
|
@@ -95,12 +95,12 @@
|
|
95
95
|
</li>
|
96
96
|
<li><strong>Command-Line Application:</strong> Run the script <code class="secondary">psdi-data-convert</code>
|
97
97
|
to use the application at the command-line. Append the <code class="secondary">--help</code> option to see
|
98
|
-
arguments for it, and/or find documentation in the project
|
98
|
+
arguments for it, and/or find documentation in the project’s README.
|
99
99
|
</li>
|
100
100
|
<li><strong>Python Library:</strong> Within a Python script, library, or terminal, the project can be imported
|
101
101
|
via <code class="secondary">import psdi_data_conversion</code>, with the most useful function being <code
|
102
102
|
class="secondary">psdi_data_conversion.converter.run_converter</code> - see the <code
|
103
|
-
class="secondary">help()</code> of this function and/or find documentation in the project
|
103
|
+
class="secondary">help()</code> of this function and/or find documentation in the project’s README.
|
104
104
|
</li>
|
105
105
|
</ul>
|
106
106
|
|
@@ -37,8 +37,8 @@
|
|
37
37
|
|
38
38
|
<form name="gui">
|
39
39
|
<div class="max-width-box">
|
40
|
-
<p>To report issues other than missing formats or conversions, please click on the
|
41
|
-
form
|
40
|
+
<p>To report issues other than missing formats or conversions, please click on the “Feedback form” link below. The
|
41
|
+
form will open in a new tab.</p>
|
42
42
|
<a href="https://forms.office.com/Pages/ResponsePage.aspx?id=-XhTSvQpPk2-iWadA62p2Fa27wFj_AtEgNrXLTdVtPVUQzhCODEyWTRXNlFEVDg5WklURlY2MExLWiQlQCN0PWcu"
|
43
43
|
target="_blank">
|
44
44
|
Feedback form
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<!-- This file contains the links that will appear in the top-right of the header bar for .html files in this
|
2
2
|
directory. -->
|
3
3
|
<a href="../../" class="navbar__item navbar__link">Home</a>
|
4
|
-
<a href="report.htm" class="navbar__item navbar__link">Report Missing Format/Conversion</a>
|
4
|
+
<a href="../../report.htm" class="navbar__item navbar__link">Report Missing Format/Conversion</a>
|
5
5
|
<a href="feedback.htm" class="navbar__item navbar__link">Provide Feedback</a>
|
6
6
|
<a href="../../documentation.htm" class="navbar__item navbar__link">Documentation</a>
|
7
7
|
<a href="download.htm" class="navbar__item navbar__link service-only">Download</a>
|
8
|
-
<a href="accessibility.htm" class="navbar__item navbar__link">Accessibility</a>
|
8
|
+
<a href="../../accessibility.htm" class="navbar__item navbar__link">Accessibility</a>
|
9
9
|
<a href="mailto:support@psdi.ac.uk" class="navbar__item navbar__link" id="mail">Contact Us</a>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<!-- This file contains the links that will appear in the top-right of the header bar for .html files in the
|
2
2
|
index.htm page. -->
|
3
3
|
<a href="./" class="navbar__item navbar__link">Home</a>
|
4
|
-
<a href="
|
4
|
+
<a href="./report.htm" class="navbar__item navbar__link">Report Missing Format/Conversion</a>
|
5
5
|
<a href="static/content/feedback.htm" class="navbar__item navbar__link">Provide Feedback</a>
|
6
6
|
<a href="./documentation.htm" class="navbar__item navbar__link">Documentation</a>
|
7
7
|
<a href="static/content/download.htm" class="navbar__item navbar__link service-only">Download</a>
|
8
|
-
<a href="
|
8
|
+
<a href="./accessibility.htm" class="navbar__item navbar__link">Accessibility</a>
|
9
9
|
<a href="mailto: psdi@soton.ac.uk" class="navbar__item navbar__link" id="mail">Contact</a>
|
@@ -5,8 +5,10 @@
|
|
5
5
|
<div class="header-left">
|
6
6
|
<div class="navbar__brand">
|
7
7
|
<a class="navbar__logo" href="https://psdi.ac.uk/">
|
8
|
-
<img src="static/img/psdi-logo-darktext.png" alt="PSDI logo"
|
9
|
-
|
8
|
+
<img src="static/img/psdi-logo-darktext.png" alt="PSDI logo"
|
9
|
+
class="lm-only">
|
10
|
+
<img src="static/img/psdi-logo-lighttext.png" alt="PSDI logo"
|
11
|
+
class="dm-only">
|
10
12
|
</a>
|
11
13
|
<a class="navbar__title" href=".">
|
12
14
|
<h5>Data Conversion Service</h5>
|
@@ -14,18 +16,13 @@
|
|
14
16
|
</div>
|
15
17
|
</div>
|
16
18
|
<div class="navbar__items navbar__items--right">
|
17
|
-
<!-- This file contains the links that will appear in the top-right of the header bar for .html files in the index.htm page. -->
|
18
|
-
<a href="./" class="navbar__item navbar__link">Home</a> <a href="static/content/report.htm"
|
19
|
-
class="navbar__item navbar__link">Report Missing Format/Conversion</a> <a href="static/content/feedback.htm"
|
20
|
-
class="navbar__item navbar__link">Provide Feedback</a> <a href="./documentation.htm"
|
21
|
-
class="navbar__item navbar__link">Documentation</a> <a href="static/content/download.htm"
|
22
|
-
class="navbar__item navbar__link service-only">Download</a> <a href="static/content/accessibility.htm"
|
23
|
-
class="navbar__item navbar__link">Accessibility</a> <a href="mailto: psdi@soton.ac.uk"
|
24
|
-
class="navbar__item navbar__link" id="mail">Contact</a>
|
19
|
+
<!-- This file contains the links that will appear in the top-right of the header bar for .html files in the index.htm page. --> <a href="./" class="navbar__item navbar__link">Home</a> <a href="./report.htm" class="navbar__item navbar__link">Report Missing Format/Conversion</a> <a href="static/content/feedback.htm" class="navbar__item navbar__link">Provide Feedback</a> <a href="./documentation.htm" class="navbar__item navbar__link">Documentation</a> <a href="static/content/download.htm" class="navbar__item navbar__link service-only">Download</a> <a href="./accessibility.htm" class="navbar__item navbar__link">Accessibility</a> <a href="mailto: psdi@soton.ac.uk" class="navbar__item navbar__link" id="mail">Contact</a>
|
25
20
|
<button class="clean-btn color-mode-toggle" title="Switch between dark and light mode"
|
26
21
|
aria-label="Lightmode/darkmode toggle button">
|
27
|
-
<img src="static/img/colormode-toggle-lm.svg" alt="Lightmode toggle icon"
|
28
|
-
|
22
|
+
<img src="static/img/colormode-toggle-lm.svg" alt="Lightmode toggle icon"
|
23
|
+
class="lm-only">
|
24
|
+
<img src="static/img/colormode-toggle-dm.svg" alt="Darkmode toggle icon"
|
25
|
+
class="dm-only">
|
29
26
|
</button>
|
30
27
|
</div>
|
31
28
|
</div>
|