-
Notifications
You must be signed in to change notification settings - Fork 36
tic turtle in comments
Tim L edited this page Oct 4, 2015
·
10 revisions
csv2rdf4lod-automation is licensed under the [Apache License, Version 2.0](https://github.com/timrdf/csv2rdf4lod-automation/wiki/License)
tic is "turtle in comments", a markup convention ^#3>
that indicates the line of a file contains turtle. Run any file with that markup through tic.sh or edu.rpi.tw.data.rdf.tic.TurtleInComments
, and you'll get the Turtle that was embedded in the comments. For example, since tic.sh is annotated with tic, it can be run through itself to get a description about it:
#/bin/bash
#
#3> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#3> @prefix dcterms: <http://purl.org/dc/terms/> .
#3> @prefix doap: <http://usefulinc.com/ns/doap#> .
#3>
#3> <> a doap:Project;
#3> dcterms:description "Script to extract Turtle from comments.";
#3> rdfs:seeAlso <https://github.com/timrdf/csv2rdf4lod-automation/wiki/tic-turtle-in-comments>;
#3> .
if [[ "$1" == "--help" || "$1" == "-h" ]]; then
...
...
Uses a grep "^#3>" | sed 's/^#3>//;s/^ //'
-like operation to produce Turtle to describe itself:
bash-3.2$ tic.sh `which tic.sh`
@base </Users/tlebo/Desktop/csv2rdf4lod/bin/util/tic.sh> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
<>
dcterms:description "Script to extract Turtle from comments." ;
a doap:Project ;
rdfs:seeAlso <https://github.com/timrdf/csv2rdf4lod-automation/wiki/tic-turtle-in-comments> .
TODO: https://github.com/timrdf/csv2rdf4lod-automation/issues/313
See also: