-
Notifications
You must be signed in to change notification settings - Fork 35
tic turtle in comments
timrdf edited this page Oct 4, 2011
·
10 revisions
$CSV2RDF4LOD_HOME/bin/util/tic.sh:
#/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> .