## RDF Turtle (https://www.w3.org/TR/turtle) notation filetype ## by H-P Ederberg ## June 11, 2020 ## (c) CC-BY-SA 3.0 ## ## (almost) correctly highlights all examples from TR: ## RDF IRIs containig '#' chars are not properly highlighted # For complete documentation of this file, please see Geany's main documentation [styling] # these specify highlighting for "primary"=word and "identifier"=word2 word=keyword_1 word2=keyword_2 # Python lexer sees @prefix and @base as decorator, should be shown like word2 decorator=keyword_2 # these types are built into the Python lexer default=default number=number,bold # Python lexer uses C(++) isoperator(char) function, not configurable operator=keyword_2,bold # always from '#' to EOL - interferes w/ some IRIs commentline=comment_line # double '##' are treated like '#' by Turtle # we use a modified font-style to allow special attention comments commentblock=comment_line,bold # Python lexer distiguishes between "string" and 'char', Turtle does not string=string character=string triple=string tripledouble=string # all unquoted text should have default highlighting identifier=default # these are irrelevant in turtle files so we use default highlighting classname=default defname=default stringeol=default fstring=default fcharacter=default ftriple=default ftripledouble=default [keywords] # boolean constants, common schema prefixes (xsd,owl,dc,rdf,rdfs), plus their data types and classes primary=true false xsd string integer boolean decimal double Id ID owl AllDifferent AllDisjointClasses AllDisjointProperties Annotation AnnotationProperty AsymmetricProperty Axiom Class DataRange DatatypeProperty DeprecatedClass DeprecatedProperty FunctionalProperty InverseFunctionalProperty IrreflexiveProperty NamedIndividual NegativePropertyAssertion Nothing ObjectProperty Ontology OntologyProperty ReflexiveProperty Restriction SymmetricProperty TransitiveProperty Thing allValuesFrom annotatedProperty annotatedSource annotatedTarget assertionProperty backwardCompatibleWith bottomDataProperty bottomObjectProperty cardinality complementOf datatypeComplementOf deprecated differentFrom disjointUnionOf disjointWith distinctMembers equivalentClass equivalentProperty hasKey hasSelf hasValue imports incompatibleWith intersectionOf inverseOf maxCardinality maxQualifiedCardinality members minCardinality minQualifiedCardinality onClass onDataRange onDatatype oneOf onProperties onProperty priorVersion propertyChainAxiom propertyDisjointWith qualifiedCardinality sameAs someValuesFrom sourceIndividual targetIndividual targetValue topDataProperty topObjectProperty unionOf versionInfo versionIRI withRestrictions dc abstract accessRights accrualMethod accrualPeriodicity accrualPolicy alternative audience available bibliographicCitation conformsTo contributor coverage created creator date dateAccepted dateCopyrighted dateSubmitted description educationLevel extent format hasFormat hasPart hasVersion identifier instructionalMethod isFormatOf isPartOf isReferencedBy isReplacedBy isRequiredBy issued isVersionOf language license mediator medium modified provenance publisher references relation replaces requires rights rightsHolder source spatial subject tableOfContents temporal title type valid contributor coverage creator date description format identifier language publisher relation rights source subject title type Agent AgentClass BibliographicResource FileFormat Frequency Jurisdiction LicenseDocument LinguisticSystem Location LocationPeriodOrJurisdiction MediaType MediaTypeOrExtent MethodOfAccrual MethodOfInstruction PeriodOfTime PhysicalMedium PhysicalResource Policy ProvenanceStatement RightsStatement SizeOrDuration Standard Collection Dataset Event Image InteractiveResource MovingImage PhysicalObject Service Software Sound StillImage Text domainIncludes memberOf rangeIncludes VocabularyEncodingScheme rdfs Class Resource subClassOf subPropertyOf comment label domain range seeAlso isDefinedBy Container ContainerMembershipProperty member Literal Property Datatype rdf HTML langString PlainLiteral JSON XMLLiteral type Literal Property Statement subject predicate object Bag Seq Alt value List nil first rest CompoundLiteral language direction # the basic turtle keywords and the ISO 639-1 language codes (for language specific strings) identifiers=_ a @prefix PREFIX @base BASE @ aa ab ae af ak am an ar as av ay az ba be bg bh bi bm bn bo br bs ca ce ch co cr cs cu cv cy da de dv dz ee el en eo es et eu fa ff fi fj fo fr fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mr ms mt my na nb nd ne ng nl nn no nr nv ny oc oj om or os pa pi pl ps pt qu rm rn ro ru rw sa sc sd se sg sh si sk sl sm sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh zh # operators recognized by RDF Turtle # list is not used by lexer, included for reference #operators=: ; . ^^ , ( ) [ ] [lexer_properties] # switch off python things we do not need in rdf-turtle # dont check indentation levels, binary number formats, special string formats tab.timmy.whinge.level=0 lexer.python.literals.binary=0 lexer.python.strings.u=0 lexer.python.strings.b=0 lexer.python.strings.f=0 # accept multiline strings and allow folding lexer.python.strings.over.newline=1 fold.quotes.python=1 [settings] # these are used by geany itself # default extension used when saving files extension=ttl # MIME type mime_type=text/turtle # Python lexer has definable keywords and a suitable base syntax lexer_filetype=Python # the following characters are these which a "word" can contain, see documentation # extended to include all IRI components wordchars=<>/:.@?#_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 # single comments, like # in this file comment_single=# # multiline comments ## not allowed in RDF Turtle #comment_open=< #comment_close=> # set to false if a comment character/string should start at column 0 of a line, true uses any # indentation of the line, e.g. setting to true causes the following on pressing CTRL+d #command_example(); # setting to false would generate this # command_example(); # This setting works only for single line comments comment_use_indent=false # context action command (please see Geany's main documentation for details) # try to open/search URL on Ubuntu context_action_cmd=exo-open --launch WebBrowser "%s" # if this setting is set to true, a new line after a line ending with an # unclosed tag will be automatically indented xml_indent_tags=false [indentation] #width=4 # 0 is spaces, 1 is tabs, 2 is tab & spaces type=1 [build-menu] # GraphViz Visualisation using raptor library # packages see http://librdf.org/raptor/ FT_00_LB=Create _GraphViz DOT FT_00_CM=rapper -i turtle -o dot %f > %e.gv FT_00_WD=%d # turtle syntax checker from 'npm -install turtle-validator' # see https://github.com/IDLabResearch/TurtleValidator # ttl itself always exits successfully, therefore checking output w/ awk FT_01_LB=_Validate FT_01_CM=ttl %f | awk '{print}/ 0 errors/{OK=1}END{exit 1-OK}' FT_01_WD=%d