Open VladimirAlexiev opened 1 month ago
Just saw the mention, will comment quickly (I have no strong opinion to remember at the moment).
While I don't know (maybe not even exist single person) who come with the nice formatting, its really, really fantastic both the formatting (at least compared with how was done 15~20 years ago) and... have some way to force programs (even if optional) to try hard keep a a consistent output, because it helps when doing diffs.
One of my use cases for this was run same scripts that get data (for example, Wikidata, also converting tables from open data sources) and generating some formats (and RDF is one of then) and if anything minimal changes, is possible also explore the diffs.
About the specific suggestions of @VladimirAlexiev, I have no opinion on very specific details (but I do agree with the general idea). Also, its not merely aesthetics , but helps with diffs.
(And I also would be okay if any of the programs I'm using at some point would change the defaults)
atextor/turtle-formatter is a Jena/Java tool specifically for this purpose
@nicholascar, @fititnt, maybe @gwhigs The main purpose of longturtle is to facilitate better diffs. Sorting has a lot to do with stability (diff minimization), so I'll share more experience.
Call me weird, but I prefer to read reasonably small ontologies (up to 50 classes, 100 props) in turtle rather than in an ontology editor. So each time I get some ontology, I convert it to turtle (using
riot --formatted=ttl
) and then :nsN:
prefixes<
sections
below)### Ontology
### Classes
### Properties
### Individuals
### External Terms
Note: the (*) items are harder to implement, so they are optional.
Related links:
AFAIK, rdflib and TQ are the only software that care about the aesthetics of turtle output. If this and https://github.com/RDFLib/rdflib/issues/2881 are implemented, I'll switch from jena riot to rdflib.