{"id":13555464,"url":"https://github.com/BigBlueHat/to-web-annotation","last_synced_at":"2025-04-03T08:31:16.085Z","repository":{"id":35677734,"uuid":"39953518","full_name":"BigBlueHat/to-web-annotation","owner":"BigBlueHat","description":"From Annotator JSON to Web Annotation...and back","archived":false,"fork":false,"pushed_at":"2015-11-05T22:06:14.000Z","size":188,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T16:04:29.685Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://bigbluehat.github.io/to-web-annotation/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BigBlueHat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-30T14:01:39.000Z","updated_at":"2018-09-05T21:16:36.000Z","dependencies_parsed_at":"2022-09-04T03:02:14.340Z","dependency_job_id":null,"html_url":"https://github.com/BigBlueHat/to-web-annotation","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BigBlueHat%2Fto-web-annotation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BigBlueHat%2Fto-web-annotation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BigBlueHat%2Fto-web-annotation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BigBlueHat%2Fto-web-annotation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BigBlueHat","download_url":"https://codeload.github.com/BigBlueHat/to-web-annotation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246965697,"owners_count":20861912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:03:13.565Z","updated_at":"2025-04-03T08:31:14.651Z","avatar_url":"https://github.com/BigBlueHat.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"# Transforming Annotations\n\nIdeally, this project could hold annotation transformation stuff for lots of\nformats to and from the\n[Web Annotation Data Model](http://w3.org/TR/annotation-model).\n\nRight now, it's just some early dayz code for transforming\n[Annotator](http://annotatorjs.org/) JSON into\n[Web Annotation's JSON-LD](http://www.w3.org/TR/annotation-model/#json-ld-context)\nwith the most minimal, unsmart means (read: doesn't understand graphs) sort of\nway possible.\n\nThis is partly done as an experiment and partly with some hopes that bridging\nthe worlds of \"just JSON\" and \"smart JSON-LD\" could be possible with a defined\nshape for the JSON-LD and some simple transformation code.\n\nOnly time will tell...and your issues and pull requests maybe. :wink:\n\n## NOTE\n\nThis isn't doing what it should...yet...\n\nAnnotator doesn't generate \"open world assuming\" documents and has \"out of\nband\" data only known to the Annotator setup code (not to the output data)\nabout how and where these annotations are made.\n\nAs such, the text ranges are all wrong, as they require that the XPath (which\nis not currently expressed in the Web Annotation output) be evaluated against\nan unknown-to-the-data starting element.\n\n...stay tuned... :radio:\n\n## Usage\n\n```\n$ npm install\n$ npm run standalone\n$ open index.html # to test some Annotator JSON conversion\n```\n\nYou can use the `npm run standalone` (above) to create a `dist/standalone.js`\nfile meant for use in a `\u003cscript/\u003e` tag (as seen in `index.html`. This file\nwill create a `window.anno` object with two functions: `toWebAnnotation()` and\n`fromWebAnnotation()`.\n\nYou can use the `npm run build` to create a `dist/bundle.js` file\nsuitable for use in a browserify world. You can then `require` whichever\nconversion function you need.\n\n# License\n\nApache License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBigBlueHat%2Fto-web-annotation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBigBlueHat%2Fto-web-annotation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBigBlueHat%2Fto-web-annotation/lists"}