metafacture / metafacture-fix

Work in progress towards an implementation of the Fix language for Metafacture
Apache License 2.0
6 stars 2 forks source link

Add flux-command for easily finding path for certain value #347

Closed TobiasNx closed 1 month ago

TobiasNx commented 7 months ago

Add to the inspection commands: list-fix-path and list-fix-values a flux command for identifying a path to a certain value would be great without hassling with triples:

| fix("nothing()",repeatedFieldsToEntities="true")
| flatten
| stream-to-triples
| filter-triples(objectpattern="[value]")
| template("${p}\t ${o}")

a macro command like find-fix-path("[value]") would be nice.

See example in playground.

TobiasNx commented 2 months ago

https://metafacture.org/playground/?flux=%22https%3A//d-nb.info/gnd/1160720738/about/marcxml%22%0A%7C+open-http%28accept%3D%22application/xml%22%29%0A%7C+decode-xml%0A%7C+handle-marcxml%0A%7C+find-fix-paths%28%22.%2AETL.%2A%22%29%0A%7C+print%0A%3B

Seems that the template is not right yet.

TobiasNx commented 1 month ago

Should be fixed with https://github.com/metafacture/metafacture-fix/pull/364