' + mine.map(function (r) {
- function list(items, cls, fmt) {
- return (!items || !items.length) ? ""
- : '
' + items.map(fmt).join("") + '
';
- }
- return '
' + esc(r.label) + '' + esc(r.score) + '/100
'
- + list(r.errors, "er", function (e) {
- return '
' + (e.shot ? 'shot ' + esc(e.shot) + ' ' : '')
- + esc(e.problem || "") + (e.fix ? ' — ' + esc(e.fix) + '' : '') + ''; })
- + list(r.suggestions, "", function (s) {
- return '
' + (s.shot ? 'shot ' + esc(s.shot) + ' ' : '')
- + esc(s.change || "") + ''; })
- + list(r.strengths, "kp", function (s) {
- return '
' + esc(typeof s === "string" ? s : JSON.stringify(s)) + ''; })
+ var gaps = mine.filter(function (r) { return r.reviewer === "__gaps__"; })[0];
+ var readers = mine.filter(function (r) { return r.reviewer !== "__gaps__"; });
+ var out = "";
+
+ if (gaps) {
+ var v = gaps.strengths && gaps.strengths.verdict;
+ var list = gaps.suggestions || [];
+ out += '
What this trailer does not tell a viewer
'
+ + (v ? '
' + esc(v) + '
' : '')
+ + (list.length ? '
' + list.map(function (g) {
+ return '- ' + esc(g.what || "")
+ + 'shot ' + esc(g.shot || "?") + ' → '
+ + esc(g.fix || "") + '
'; }).join("") + '
' : '')
+ '
';
- }).join("") + '
';
+ }
+
+ out += readers.map(function (r) {
+ var s = r.strengths || {}, e = r.errors || {};
+ if (typeof s !== "object") s = {};
+ if (typeof e !== "object") e = {};
+ function ul(items, cls) {
+ return (!items || !items.length) ? ""
+ : '
' + items.map(function (x) {
+ return '- ' + esc(typeof x === "string" ? x : JSON.stringify(x)) + '
';
+ }).join("") + '
';
+ }
+ return '
' + esc(r.label) + ' watched it without reading the book'
+ + (r.score ? ''
+ + r.score + '/100' : '') + '
'
+ + (s.summary ? '
' + esc(s.summary) + '
' : '')
+ + '
main character: ' + esc(s.who || "not clear to them") + '
'
+ + '
what they want: ' + esc(s.wants || "not clear to them") + '
'
+ + '
what is in the way: ' + esc(s.obstacle || "not clear to them") + '
'
+ + (s.would_watch ? '
would they watch the film: '
+ + esc(s.would_watch) + '
' : '')
+ + (s.unanswered && s.unanswered.length
+ ? '
still asking:
' + ul(s.unanswered, "") : '')
+ + (e.missed && e.missed.length ? '
they missed:
' + ul(e.missed, "") : '')
+ + (e.got_wrong && e.got_wrong.length
+ ? '
the trailer misled them:
' + ul(e.got_wrong, "wrong") : '')
+ + '
';
+ }).join("");
+
+ return '
' + out + '
';
}
function paneHtml(meta, draft) {
@@ -318,9 +356,7 @@
}).join("") + '
';
var body = insertHtml("start");
- shots.forEach(function (s) {
- body += shotHtml(s, voice) + insertHtml(s.id);
- });
+ shots.forEach(function (s) { body += shotHtml(s, voice) + insertHtml(s.id); });
return head + probs + '