Metadata-Version: 2.4
Name: graffl
Version: 0.9.2
Summary: A simple syntax for RDF.
Author-email: Michael Hedenus <michael@hedenus.de>
Project-URL: Homepage, https://github.com/mhedenus/graffl
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rdflib>=7.0.0
Requires-Dist: lark>=1.3.1
Requires-Dist: pyyaml>=6.0.3
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
Dynamic: license-file

<div>
  <img src="https://raw.githubusercontent.com/mhedenus/graffl/main/docs/graffl.png" alt="graffl Logo" width="400" />
</div>

(pronounced g-raffl, but also derived from the Bavarian 
word "Graffl" meaning "stuff" or "junk")

# Summary

__graffl__ is a (still) experimental __RDF__ scratch pad file format.
Its purpose is to write something down that is immediately
understood as graph data. No annoying syntax like dots or commas is required.
Think of it as Markdown for RDF.

For example, the following __graffl__ graph:

    Alice likes -> Bob

written as Turtle:

    @prefix ns1: <https://www.hedenus.de/graffl/76a04f61-342e-11f1-a289-e08f4ccbe174/> .
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    
    ns1:Alice rdfs:label "Alice" ;
        ns1:likes ns1:Bob .


It also supports OWL modeling and nested graphs!

See the documentation `docs/graffl.adoc`.

See the `src/graffl/graffl.lark` file for the EBNF grammar.

The parser is implemented as an extension for __rdflib__: https://github.com/rdflib/rdflib

The file format is used by __rdf2graphml__: https://github.com/mhedenus/rdf2graphml

# CLI

The CLI command `graffl` converts one or more `*.graffl` files to __TriG__:

    graffl [-h] [-V] [-o OUTPUT] [-v] [-d INPUT_DIR] [input_files ...]

The produced RDF is merged in one dataset. You can separate the graphs using the `@context` directive.
If no output is specified, the result is printed to standard output.
