- From: Benjamin Goering via GitHub <sysbot+gh@w3.org>
- Date: Tue, 24 Nov 2015 08:02:15 +0000
- To: public-annotation@w3.org
@azaroth42 I have a tool that renders [some HTML](https://livefyre.github.io/activity-vocabulary/) from a JSON-LD document describing [the underlying vocabulary](https://github.com/gobengo/livefyre-activity-vocabulary/blob/master/livefyre.jsonld) (borrowing some rdfs and hydra props). The script is a little overfit for my use case, but perhaps a good starting point to something more generalizable. I just published it at [gobengo/livefyre-activity-vocabulary](https://github.com/gobengo/livefyre-activity-vocabulary). Basically [This script](https://github.com/gobengo/livefyre-activity-vocabulary/blob/master/bin/make-public-data.js) reads the jsonld and uses node 'jsonld' lib to mash it into a more customer JSON structure using JSON-LD framing. It also renders some markdown files to html to use as descriptions. The structure is like ```bash ⚡ bin/make-public-data.js | jq '[(keys - ["data"])[] as $key | { ($key): .[$key] | keys }] | add' { "classes": [ "activities", "objects", "properties" ] } ``` Then it uses that as template context to some HTML templates (using `[harp](https://www.npmjs.com/package/harp) compile`) The [Makefile](https://github.com/gobengo/livefyre-activity-vocabulary/blob/master/Makefile#L38) makes it all explicit. You may find it useful. -- GitHub Notification of comment by gobengo Please view or discuss this issue at https://github.com/w3c/web-annotation/issues/97#issuecomment-159189627 using your GitHub account
Received on Tuesday, 24 November 2015 08:02:19 UTC