Commit e77d2086 by Matt Mascarenhas

cinera.c: Remove spurious file I/O

Don't \-escape anything in the index Document server's security header (recommended) requirements
parent be37ea23
......@@ -11,9 +11,9 @@ deployment
4. `cp hmml.a hmmlib.h ../cinera/`
5. `cd ../cinera/`
Note: For each parser update, remember to make and copy it into place
Note: For each parser update, remember to make and copy it into place.
### Install Dependencies
### Install the dependency
1. curl
......@@ -21,6 +21,20 @@ Note: For each parser update, remember to make and copy it into place
1. `$SHELL cinera.c`
### Configure the server
If you enforce a strict Content Security Policy and X-Frame-Options in your
server configuration as recommended by [Security
Headers](https://securityheaders.com/), you may enable _Cinera_ to function by
making two small tweaks:
add_header Content-Security-Policy "default-src … https://www.youtube.com https://s.ytimg.com";
add_header X-Frame-Options "ALLOW-FROM https://www.youtube.com";
Note: For more information about these and other security headers, see Scott
Helme's articles [Content Security Policy - An Introduction](https://scotthelme.co.uk/content-security-policy-an-introduction/)
and [Hardening your HTTP response headers](https://scotthelme.co.uk/hardening-your-http-response-headers/#x-frame-options).
### Run
#### Single Edition operation
......@@ -28,14 +42,14 @@ Note: For each parser update, remember to make and copy it into place
cinera test.hmml
This simply generates an HTML file (and updates `cinera_topics.css` if needed)
from `test.hmml` and outputs to `out.html`
from `test.hmml` and outputs to `out.html` (configurable with -o).
#### Project Edition operation
cinera -p ProjectID
Setting the ProjectID with the `-p` flag triggers Project Edition. In this
edition `cinera` monitors the Project Input Directory for new, edited and
edition _Cinera_ monitors the Project Input Directory for new, edited and
deleted .hmml files, and generates one table of contents / search page and a
player page each for valid sets of annotations (or removes them, if needed).
......@@ -93,7 +107,12 @@ directory. Typical operation will involve setting these flags:
hold up to 255 characters 12 to 15 may hold up to 1023 characters_
Feel free to play with templates to your heart's content. If you do anything
invalid, `cinera` will tell you what's wrong.
invalid, _Cinera_ will tell you what's wrong.
Note: There is currently an issue sizing the annotation marker container if your
HTML document contains `<!DOCTYPE html>`. To work around this for now, please do
not declare a DOCTYPE and instead let the page be displayed in [quirks
mode](https://www.w3.org/International/articles/serving-xhtml/#quirks).
#### Arguments
......@@ -123,6 +142,7 @@ invalid, `cinera` will tell you what's wrong.
-m <default medium>
Override default default medium ("programming")
Known project defaults:
bitwise: programming
book: research
pcalc: programming
riscy: programming
......@@ -179,6 +199,10 @@ invalid, `cinera` will tell you what's wrong.
Display (examine) index file and exit
-f
Force integration with an incomplete template
-g
Ignore video privacy status
NOTE: For use with projects whose videos are known to all be public,
to save us having to check their privacy status
-w
Force quote cache rebuild (memory aid: "wget")
......
......@@ -233,7 +233,7 @@ xhr.addEventListener("load", function() {
} else if (line.startsWith("name:")) {
episode.name = line.slice(6);
} else if (line.startsWith("title:")) {
episode.title = line.slice(7).replace(/"/g, "");
episode.title = line.slice(7).trim().slice(1, -1);
} else if (line.startsWith("markers")) {
mode = "markers";
episode.markers = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment