gesetze-tools icon indicating copy to clipboard operation
gesetze-tools copied to clipboard

Separate law text and law metadata

Open nichtich opened this issue 11 years ago • 3 comments

Right now each index.md begins with a prorietary form of metadata put into markdown syntax. This key-value data should better be put into a yaml file, for instance:

Title: Käseverordnung
jurabk: KäseV
layout: default
origslug: k_sev
slug: kaesev

By separating law text and law metadata one can change the metadata without having to change the law text.

nichtich avatar Aug 11 '12 18:08 nichtich

Not as proprietary as it looks: https://github.com/mojombo/jekyll/wiki/YAML-Front-Matter - this can basically be used to render the laws out easuily using GitHub's built-in Jekyll site generator.

pudo avatar Aug 11 '12 18:08 pudo

Yes, but you stick to Jekyll this way. Right now the law text is not Markdow but Markdown with Jekyll extension. For other use of the data one must write your own parser instead of reusing existing yaml tools. If metadata would be in a separate file, one could extract and extend it much easier. In my opinion "site generation" should no be the primary use case and Jekyll is just one tool to do so.

An example of additional metadata is provided in Wikipedia. For instance the article Käseverordnung contains an infobox. The data from this infobox is extracted in DBPedia and parts of it could be added/mapped to the metadata in the bundesgit repository.

nichtich avatar Aug 11 '12 19:08 nichtich

@nichtich I just found the command line argument --no-yaml in #14 which still prints {key}: {value} pairs for the meta data in this case. Should it instead just don't print any meta header when this option is set?

If anyone is willing in creating and maintaining the rendering code, I am open to accept PRs which render laws based on separate meta data and text law data.

One might also be looking into using databases, which would require creating an API and pay for hosting the infrastructure and so on.

darkdragon-001 avatar Apr 17 '21 19:04 darkdragon-001