#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Run the pyRdfa package locally, ie, on a local file """ # You may want to adapt this to your environment... import sys, getopt, platform, logging sys.path.insert(0,"/Users/ivan/Library/Python") sys.path.insert(0,"/Users/ivan/Library/Python/RDFa") from pyRdfa import pyRdfa from pyRdfa.transform.metaname import meta_transform from pyRdfa.transform.OpenID import OpenID_transform from pyRdfa.transform.DublinCore import DC_transform from pyRdfa.options import Options extraTransformers = [ # containers_collections, #OpenID_transform, #DC_transform, # meta_transform ] ########################################### usageText="""Usage: %s -[vjxtnpzsb:g:ryle] [filename[s]] where: -x: output format RDF/XML -t: output format Turtle (default) -j: output format JSON-LD -n: output format N Triples -p: output format pretty RDF/XML -z: exceptions should be returned as graphs instead of exceptions raised -b: give the base URI; if a file name is given, this can be left empty and the file name is used -s: whitespace on plain literals are not preserved (default: preserved, per RDFa syntax document); this is a non-standard feture -l: run in RDFa 1.1 Lite mode (non-RDFa Lite generate warnings) (default: False) -r: report on the details of the vocabulary caching process -y: bypass the vocabulary cache checking, generate a new cache every time (good for debugging) (default:False) -v: perform vocabulary expansion (default: False) -g: value can be 'output', 'processor', 'output,processor' or 'processor,output'; controls which graphs are returned -e: embedded (in a