diff --git a/public/annotator.css b/public/annotator.css
new file mode 100644
index 0000000..e69de29
diff --git a/public/annotator.html b/public/annotator.html
new file mode 100644
index 0000000..1ef263e
--- /dev/null
+++ b/public/annotator.html
@@ -0,0 +1,52 @@
+
+
+
+
+ Audio annotation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # |
+ Segment |
+ Annotated? |
+
+
+
+
+
+
+
+
+
+
diff --git a/public/annotator.js b/public/annotator.js
new file mode 100644
index 0000000..f5cb54b
--- /dev/null
+++ b/public/annotator.js
@@ -0,0 +1,52 @@
+
+function message(kind, msg) {
+ $("#loading").html('' + msg + '')
+ .removeClass('invisible')
+}
+
+var parameters = $.url().param();
+
+if (!Array.prototype.last){
+ Array.prototype.last = function(){
+ return this[this.length - 1];
+ };
+};
+
+var id
+
+if(parameters.id == null) {
+ message("danger", "Enter your id as a parameter like ?id=
at the end of the URL");
+ throw "fatal"
+}
+id = parameters.id
+
+var segments
+var annotated
+
+$.ajax({type: 'POST',
+ data: JSON.stringify({id: id}),
+ contentType: 'application/json',
+ async: false,
+ url: '/annotations-for-annotator',
+ success: function(data) {
+ console.log(data.annotated)
+ segments = data.segments.sort()
+ annotated = _.object(data.annotated,[])
+ }})
+
+$.extend( $.tablesorter.defaults, {
+ theme: 'dropbox',
+ widthFixed: true
+});
+$("table.options, table.api").tablesorter({widgets:['stickyHeaders']});
+$("#segment-table").tablesorter();
+
+_.each(segments,
+ function (segment, nr) {
+ $('#segment-table > tbody:last')
+ .append($('')
+ .append($('').text(nr))
+ .append($(' | ').append('' + segment + ''))
+ .append($(' | ').append((segment in annotated?'Yes':'No'))))})
+
+$("#segment-table").trigger('update');
|