-
Notifications
You must be signed in to change notification settings - Fork 0
/
debug.html
103 lines (91 loc) · 3.89 KB
/
debug.html
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
<!DOCTYPE HTML>
<html>
<head>
<meta charset='utf-8'>
<link rel="stylesheet" href="css/webfonts.css">
<link rel="stylesheet" href="css/document-text.css">
<link rel="stylesheet" href="css/document-transcript.css">
<link rel="stylesheet" href="css/document-transcript-highlight-hands.css">
<link rel="stylesheet" href="css/document-transcript-interaction.css">
<link rel="stylesheet" href="css/pure-custom.css">
<link rel="stylesheet" href="css/basic_layout.css">
<script type="text/javascript" src="js-gen/lib/webfontloader.js"></script>
<script type="text/javascript" src="./js-gen/loadwebfonts.js"></script>
<script type="text/javascript" src="js-gen/lib/Y_extract.js"></script>
<script type="text/javascript" src="./js-gen/svg-utils.js"></script>
<script type="text/javascript" src="./js-gen/faust.js"></script>
<script type="text/javascript" src="./js-gen/transcript-adhoc-tree.js"></script>
<script type="text/javascript" src="./js-gen/text-index.js"></script>
<script type="text/javascript" src="./js-gen/text-annotation.js"></script>
<script type="text/javascript" src="./js-gen/transcript.js"></script>
<script type="text/javascript" src="./js-gen/transcript-svg.js"></script>
<script type="text/javascript" src="./js-gen/adhoc-tree.js"></script>
<script type="text/javascript" src="./js-gen/transcript-configuration-faust.js"></script>
<script type="text/javascript" src="./js-gen/transcript-generation.js"></script>
<style>
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html, body {
height: 100%;
margin: 0px 0px 0px 0px;
padding: 5px;
/* background-color: lightgray; */
}
/*
#container {
border: 1px solid black;
background-color: white;
}
*/
</style>
</head>
<body>
<div id="container">
</div>
<section id="debughelp">
<h1>Transcript Generation Debugging</h1>
<p>This page helps in debugging the generation of the transcript generation. Just replace the <code>documentViewer</code> URL with the one to this HTML, retaining at least the sigil and page parameters, and use the developer tools (F12).</p>
<p>Note this will work (1) only if served by a server and (2) only when the json files are there, i.e. generation has run at least once.</p>
</section>
<footer class="pure-noprint pure-right">
<div class="pure-g-r">
<div class="pure-u-1-2">
<a id="documentViewer">Edition</a>
<a id="debug2">Einbindung debuggen</a>
</div>
</div>
</footer>
<script type="text/javascript">
document.getElementById("documentViewer").href = 'document' + window.location.search;
document.getElementById("debug2").href = 'debug2' + window.location.search;
</script>
<script type="text/javascript">
var parseQueryString = function( queryString ) {
var params = {}, queries, temp, i, l;
// Split into key/value pairs
queries = queryString.split("&");
// Convert the array of strings into an object
for ( i = 0, l = queries.length; i < l; i++ ) {
temp = queries[i].split('=');
params[temp[0]] = temp[1];
}
return params;
};
var params = parseQueryString(window.location.search.substring(1));
console.log(params);
var json = 'json/' + params.sigil + '/page_' + params.page + '.json';
console.log(json);
var help = document.getElementById("debughelp");
help.parentNode.removeChild(help);
Faust.Fonts.active(function(){Faust.io(json,
function(transcript) {transcriptGeneration.createDiplomaticSvg(transcript,
function(svgTranscript){
console.log(svgTranscript)
})}
);});
</script>
</body>
</html>