forked from ross-spencer/demystify-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.htm
222 lines (217 loc) · 10.3 KB
/
index.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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
78
79
80
81
82
83
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!-- Demystify-lite pyscript implementation of Demystify.
Many thanks to John Hanley for their file-system guides:
- https://www.jhanley.com/pyscript-files-and-file-systems-part-2/
This code is licensed GPLv3.0. It is free for you to hack on and remix.
If you find a better way to do anything I am doing in this code, please,
take the opportunity to share if you feel so inclined.
Thank you for trying this out!
Enjoy! 🔮
Ross
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- Site metadata -->
<title>Demystify online! #digipres</title>
<meta name="title" content="Demystify online - Demystify Lite - Digital Preservation" />
<meta name="author" content="Ross Spencer"/>
<meta name="description" content="File-format report static analysis tool, client-side, online"/>
<meta name="keywords" content="Digital Preservation, Pyscript, Demystify, File-Formats"/>
<meta name="rating" content="Utilities"/>
<!-- w3c css -->
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<!-- pyscript -->
<link rel="stylesheet" href="https://pyscript.net/releases/2024.6.2/core.css"/>
<script type="module" src="https://pyscript.net/releases/2024.6.2/core.js">
// do not delete...
</script>
<!-- Custom imports -->
<link rel="stylesheet" href="./demystify.css">
<link rel="stylesheet" href="./noprint.css" />
<!-- Favicon -->
<link rel="icon" type="image/png" href="customize/favicon.ico" />
<!-- Siegfried Integration -->
<script src="sf/app.js" defer></script>
<script src="sf/wasm_exec.js"></script>
<script>
const go = new window.Go();
WebAssembly.instantiateStreaming(
fetch("sf/sf.wasm"),
go.importObject
).then(
(obj) => {
go.run(obj.instance);
}
);
</script>
<!-- Siegfried Integration -->
</head>
<body>
<py-config src="./pyscript.toml"></py-config>
<py-script src="./demystify-lite.py"></py-script>
<main>
<section class="noprint">
<div class="row">
<div>
<img class="header" src="customize/header.png" alt="demystify-lite header"/>
<br/>
<br/>
</div>
</div>
<div>
<div class='row'>
<div class='column half-column'>
<div>
<img class="logo" src="demystify.ico" alt="demystify logo"><span class="logo">||</span>
</div>
</div>
<div class='column'>
<div>
<h1 class="title">Demystify Lite</h1>
</div>
<div>
<h2 class="subtitle">An analysis tool for file-format reports for digital preservation.</h2>
</div>
</div>
</div>
</div>
</section>
<section class="noprint content">
<div >
<p>Demystify is a static-analysis tool for digital preservation.</p>
<p>
You can take a CSV report from DROID, or Siegfried YAML, run
it through this tool, and understand your collection better.
</p>
<p>
Demystify-lite processes everything on client-side, data isn't
shared with a server and so it can be safely used on data without
revealing your secrets to the world. This implementation is
enabled by
<a href="https://pyscript.net/" target="_blank" rel="noopener">pyscript</a>.
</p>
<p>
More information:
<ul>
<li>Demystify full-fat on <a href="https://github.com/exponential-decay/demystify" target="_blank" rel="noopener">Github</a>.</li>
<li>Understanding file-format identification reports on <a href="https://journal.code4lib.org/articles/16351" target="_blank" rel="noopener">Code4Lib</a>.</li>
<li>Siegfried on <a href="https://github.com/richardlehane/siegfried" target="_blank" rel="noopener">GitHub</a>.</li>
<li>DROID at <a href="https://www.nationalarchives.gov.uk/information-management/manage-information/preserving-digital-records/droid/" target="_blank" rel="noopener">The National Archives, UK</a>.</li>
<li>Demystify Lite repository and <a href="https://github.com/ross-spencer/demystify-lite/issues" target="_blank" rel="noopener">issues</a>.</li>
</ul>
</p>
</div>
</section>
<section id="toggle" class="noprint">
<div>
<div style="font-weight: bold; margin-bottom: 10px;">use an existing report</div>
<label class="switch" alt="use siegfried or perform a static analysis">
<input id="app-toggle" type="checkbox">
<span class="slider round"></span>
</label>
</div>
</section>
<section id="app-state">
<section class="noprint" id="use-siegfried">
<div>
<hr/>
select your options for Siegfried...
<div>
<p>
<select name="format" id="format" hidden>
<option value="yaml">YAML</option>
</select>
Hash (hash):
<select name="hash" id="hash">
<option value="md5">md5</option>
<option value="sha1">sha1</option>
<option value="sha256">sha256</option>
<option value="sha512">sha512</option>
<option value="crc">crc</option>
<option value="none">none</option>
</select>
<br>
Scan within archive files: <input type="radio" name="z" value="true"> true <input type="radio" name="z" value="false" checked> false
</p>
<p>
</p>
<div id="sf_select">
<label class="custom-file-upload">
<input class="analysis_button" type="button" id="butOpen" />
Siegfried: Open file
</label> 
<label class="custom-file-upload">
<input class="analysis_button" type="button" id="butDirectory" />
Siegfried: Identify directory
</label> 
<label class="custom-file-upload">
<input class="analysis_button" type="button" id="butDownload" />
Siegfried: Download results
</label>
</div>
<!-- LOADER AND READY BUTTONS -->
<div class="loader noprint" id="loader"></div>
<div class="noprint" id="ready">
<div class="w3-panel w3-light-grey w3-border" id="ready">
<h5>Ready to scan...</h5>
<p>Select values for Siegfried and then select a file or directory to create a report against.</p>
</div>
</div>
<div id="sf-results" hidden>
</div>
</div>
</section>
<section id="static-analysis">
<div id="report_select">
<label class="custom-file-upload">
<input type="file" name="files[]" id="files" />
Demystify: Select existing report
</label>
</div>
</button>
</section>
<section id="run-analysis">
<!-- RUN DEMYSTIFY AND SHOW RESULTS -->
<section class="noprint">
<hr/>
<div>
<p>Analyze the results.</p>
</div>
<div class="deny-list" id="deny_list">
use denylist: <input class="use-denylist" type="checkbox" id="use_deny_list" />
<br/><br/>
</div>
</section>
<section class="noprint" id="denylistTextBox" style="display: none;">
<textarea class="denylist" id="denylist" cols="500" rows="10"></textarea>
</section>
<section class="noprint">
<div class="drag" id="drop_zone">
<label class="custom-file-upload">
<input class="analysis_button" type="button" id="analysis_button" />
Analyse Demystify Results
</label>
</div>
</section>
<section class="noprint">
<div class="noprint">
<br />
<br />
<div id="filename"></div>
<div id="filesize"></div>
<div id="filetype"></div>
<div id="filedate"></div>
<br/>
</div>
</section>
<section>
<div id="results"></div>
</section>
</section>
</section>
</main>
</body>
</html>