You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Matt Mascarenhas f321a6b6bf Update README.md 1 week ago
cinera cinera: Add database structure specification 2 weeks ago
hmml_to_youtube cinera.css: Marker and categories style 5 years ago
hmmlconv hmmlconv.c: Convert to new [video] format 5 years ago
hmmlib add publication_date and output to hmml metadata 4 years ago
hmmlib-js hmmlib-js: multiple guests/annotators/co-hosts update 5 years ago
hmmlib2 hmmlib.h: Add "number" parameter to [video] node 2 months ago
source_recorder added logging for switching emacs buffers 5 years ago
README.md Update README.md 1 week ago

README.md

Fair warning: This is all under development and not yet packaged up for easy deployment

Cinera

Install the dependencies

  1. curl

Download, and copy the parser into place

  1. git clone https://git.handmade.network/Annotation-Pushers/Annotation-System.git
  2. cd Annotation-System/cinera
  3. cp ../hmmlib2/hmmlib.h .

Note: For each parser update, remember to copy it into place.

Build

  1. $SHELL cinera.c

Configure

cinera -h

This documents the configuration file format and default settings.

Configure the server

If you enforce a strict Content Security Policy and X-Frame-Options in your server configuration as recommended by Security Headers, 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 and Hardening your HTTP response headers.

Run

cinera -c /path/to/config.conf

Templates

(Global) Search Template

  • <!-- __CINERA_INCLUDES__ --> to put inside your own <head></head>
  • <!-- __CINERA_SEARCH__ --> the table of contents and search functionality

Player Template

  • <!-- __CINERA_INCLUDES__ --> to put inside your own <head></head>
  • <!-- __CINERA_PLAYER__ -->

Optional tags available for use in your Player Template

  • <!-- __CINERA_TITLE__ -->
  • <!-- __CINERA_VIDEO_ID__ -->
  • <!-- __CINERA_VOD_PLATFORM__ -->

Other tags available for use in any template

  • Asset tags:
    • <!-- __CINERA_ASSET__ path.ext --> General purpose tag that outputs the URL of the specified asset relative to the Asset Root URL (-R)
    • <!-- __CINERA_IMAGE__ path.ext --> General purpose tag that outputs the URL of the specified asset relative to the Images Directory (-i)
    • <!-- __CINERA_CSS__ path.ext --> Convenience tag that outputs a <link rel="stylesheet"...> node for the specified asset relative to the CSS Directory (-c), for use inside your <head> block
    • <!-- __CINERA_JS__ path.ext --> Convenience tag that outputs a <script type="text/javascript"...> node for the specified asset relative to the JS Directory (-j), for use wherever a <script> node is valid The path.ext in these tags supports parent directories to locate the asset file relative to its specified type directory (generic, CSS, image or JS), including the "../" directory, and paths containing spaces must be surrounded with double-quotes (-escapable if the quoted path itself contains double-quotes).

All these asset tags additionally perform versioning, appending a query string (-Q) and the file's checksum to the URL. Changes to a file trigger a rehash and edit of all HTML pages citing this asset.

  • Navigation / Menu tags:
    • <!-- __CINERA_NAV__ --> This menu will contain only the current project, its siblings and subprojects of both the aforementioned
    • <!-- __CINERA_GLOBAL_NAV__ --> This menu will contain every project in the configuration

These navigation tags additionally take one parameter, e.g. <!-- __CINERA_NAV__ horizontal -->: - dropdown A dropdown menu, that opens on hover - horizontal More-or-less the same as dropdown, but always open - plain A straightforward <ul> for you to style how you like

  • <!-- __CINERA_PROJECT__ --> The project's html_title if configured, otherwise its title
  • <!-- __CINERA_PROJECT_PLAIN__ --> The project's title
  • <!-- __CINERA_PROJECT_ID__ -->
  • <!-- __CINERA_PROJECT_LINEAGE__ --> The IDs of all projects from the root to the current project, separated by a spaced-slash
  • <!-- __CINERA_SEARCH_URL__ -->
  • <!-- __CINERA_THEME__ -->
  • <!-- __CINERA_URL__ -->
  • <!-- __CINERA_CUSTOM0__ -->
  • <!-- __CINERA_CUSTOM1__ -->
  • <!-- __CINERA_CUSTOM2__ -->
  • <!-- __CINERA_CUSTOM15__ --> Freeform buffers for small snippets of localised information, e.g. a single <a> element or perhaps a <!-- comment --> They correspond to the custom0 to custom15 attributes in the [video] node in your .hmml files 0 to 11 may 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.

Arguments

Usage: ./cinera [option(s)]

Options:
    -c <config file path>
        Set the main config file path
        Defaults to: $XDG_CONFIG_HOME/cinera/cinera.conf
    -0
        Dry-run mode. Parse and print the config, but do not modify the
        filesystem
    -e
        Display (examine) database and exit
    -v
        Display version and exit
    -h
        Display this help