From 86278fafce5755b2c976f8f0299ce195e9e294df Mon Sep 17 00:00:00 2001 From: Phu Tu Date: Thu, 28 Mar 2024 14:19:41 +0100 Subject: [PATCH] Fix links and some formatting --- docs/Getting-Started.md | 10 +++++----- docs/MF-in-5-min.md | 2 +- docs/fix/Fix-User-Guide.md | 4 ++-- ...Cookbook.md => Fix-functions-and-Cookbook.md} | 0 docs/fix/fix.md | 2 +- docs/flux/Flux-User-Guide.md | 16 +++++++++------- docs/flux/flux.md | 4 ++-- docs/java-integration/Framework-User-Guide.md | 2 +- docs/java-integration/java-integration.md | 2 +- index.md | 6 +++--- 10 files changed, 25 insertions(+), 23 deletions(-) rename docs/fix/{Fix-function-and-Cookbook.md => Fix-functions-and-Cookbook.md} (100%) diff --git a/docs/Getting-Started.md b/docs/Getting-Started.md index c26f62a..2faa073 100644 --- a/docs/Getting-Started.md +++ b/docs/Getting-Started.md @@ -10,11 +10,11 @@ nav_order: 2 The easiest way to get started with Metafacture is the Playground. Take a look at the [first example](https://metafacture.org/playground/?flux=PG_DATA%0A%7Cas-lines%0A%7Cdecode-formeta%0A%7Cfix%0A%7Cencode-xml%28rootTag%3D%22collection%22%29%0A%7Cprint%0A%3B&fix=move_field%28_id%2C+id%29%0Amove_field%28a%2C+title%29%0Apaste%28author%2C+b.v%2C+b.n%2C+%27~aus%27%2C+c%29%0Aretain%28id%2C+title%2C+author%29&data=1%7Ba%3A+Faust%2C+b+%7Bn%3A+Goethe%2C+v%3A+JW%7D%2C+c%3A+Weimar%7D%0A2%7Ba%3A+R%C3%A4uber%2C+b+%7Bn%3A+Schiller%2C+v%3A+F%7D%2C+c%3A+Weimar%7D&active-editor=fix) and run it by pressing the !["Process"](https://metafacture.org/img/process.png) button. Check out the other examples (first button, !["Load Examples"](https://metafacture.org/img/load-exmples.png)) for different input sources, transformations, and output formats. -For commands available in the Flux, see [the Flux commands documentation](/flux-commands.md). +For commands available in the Flux, see [the Flux commands documentation](/docs/flux/flux-commands.html). -For functions and usage of the Fix, see [the Fix functions and cookbook](/Fix-functions-and-cookbook). +For functions and usage of the Fix, see [the Fix functions and cookbook](/docs/fix/Fix-functions-and-cookbook.html). -For next steps get familar with [FLUX](/Flux-User-Guide.md) and [FIX](/Fix-User-Guide.md). And try out some Metafacture workflows. +For next steps get familar with [FLUX](/docs/flux/Flux-User-Guide.html) and [FIX](/docs/fix/Fix-User-Guide.html). And try out some Metafacture workflows. ## Command line @@ -27,7 +27,7 @@ To get started, you can export a workflow from the Playground (last button, !["E To set up IDE support for editing your Flux and Fix files, see [the IDE extensions page](https://metafacture.org/ide-extensions/index.html). -For next steps get familar with [FLUX](/Flux-User-Guide.md) and [FIX](/Fix-User-Guide.md). And try out some Metafacture workflows. +For next steps get familar with [FLUX](/docs/flux/Flux-User-Guide.html) and [FIX](/docs/fix/Fix-User-Guide.html). And try out some Metafacture workflows. ## Using Metafacture as a Java library @@ -58,4 +58,4 @@ To use Fix you would declare `metafix` instead of `metafacture-io` as in the exa Occasionally, we publish snapshot builds on [Sonatype OSS Repository](https://oss.sonatype.org/index.html#nexus-search;gav~org.metafacture~~~~~kw,versionexpand). The version number is derived from the branch name. Snapshot builds from the master branch always have the version `master-SNAPSHOT`. We also provide sometimes pre releases as github packages. -If you plan to use Metafacture as a Java library or if you wish to add commands to Flux you should get familar with the [Framework](/Framework-User-Guide.md). +If you plan to use Metafacture as a Java library or if you wish to add commands to Flux you should get familar with the [Framework](/docs/java-integration/Framework-User-Guide.html). diff --git a/docs/MF-in-5-min.md b/docs/MF-in-5-min.md index 76e581e..cfe7bfe 100644 --- a/docs/MF-in-5-min.md +++ b/docs/MF-in-5-min.md @@ -93,7 +93,7 @@ $ cat yaml2json.flux ## FIX LANGUAGE -Many data conversions need a mapping from one field to another field plus optional conversions of the data inside these fields. Metafacture provides the transformation module `fix` that uses the Catmandu-inspired Fix language to assist in these mappings. A full list Fix functions is available at https://github.com/metafacture/metafacture-documentation/blob/master/Fix-function-and-Cookbook.md#functions. +Many data conversions need a mapping from one field to another field plus optional conversions of the data inside these fields. Metafacture provides the transformation module `fix` that uses the Catmandu-inspired Fix language to assist in these mappings. See the [full list of Fix functions](/docs/fix/Fix-functions-and-Cookbook.html#functions). Fixes can be provided inline as text argument of the fix module in the Flux script, or as a pointer to a Fix script. A Fix script groups one or more fixes in a file. diff --git a/docs/fix/Fix-User-Guide.md b/docs/fix/Fix-User-Guide.md index 109aa12..fc7814a 100644 --- a/docs/fix/Fix-User-Guide.md +++ b/docs/fix/Fix-User-Guide.md @@ -10,7 +10,7 @@ nav_order: 1 This document provides an introduction to the Metafacture Fix language (short: Metafix or Fix). The Fix language for Metafacture is introduced as an alternative to configuring data transformations with Metamorph. Inspired by Catmandu Fix, Metafix processes metadata not as a continuous data stream but as discrete records. ## Part of a metafacture worflow -Metafacture Fix is a transformation module that can be used in a [Flux Workflow](/Flux-User-Guide.md), for this you have to use this in your pipeline: +Metafacture Fix is a transformation module that can be used in a [Flux Workflow](/docs/flux/Flux-User-Guide.html), for this you have to use this in your pipeline: Flux-Example: ```PERL @@ -90,7 +90,7 @@ do Bind(params,…) end ``` -Find here a [list of all functions, selectors, binds and conditionals](/Fix-function-and-Cookbook.md). +Find here a [list of all functions, selectors, binds and conditionals](//docs/fix/s-and-Cookbook.html). ## Addressing Pieces of Data: FIX-Path and the record structure in FIX diff --git a/docs/fix/Fix-function-and-Cookbook.md b/docs/fix/Fix-functions-and-Cookbook.md similarity index 100% rename from docs/fix/Fix-function-and-Cookbook.md rename to docs/fix/Fix-functions-and-Cookbook.md diff --git a/docs/fix/fix.md b/docs/fix/fix.md index de6fbf5..63e36ce 100644 --- a/docs/fix/fix.md +++ b/docs/fix/fix.md @@ -13,7 +13,7 @@ If you are using **Metafacture as a Java library**, just create a Metafix object The transformation itself is declared in a fix-object which can be a file. For more information on how to declare transformations see [Metafix User Guide](/Fix-User-Guide.md). -See [here a list for all available FIX functions and a cookbook for using fix](/Fix-function-and-Cookbook.md). +See [here a list for all available FIX functions and a cookbook for using fix](//docs/fix/Fix-functions-and-Cookbook.html). > [!NOTE] > PS: There is also the transformation modul MORPH. Have a look at[ the old documentation](https://github.com/metafacture/metafacture-core/wiki/Metamorph-User-Guide) and the german cookbook by [Swissbib](https://swissbib.gitlab.io/metamorph-doku/). \ No newline at end of file diff --git a/docs/flux/Flux-User-Guide.md b/docs/flux/Flux-User-Guide.md index f4b83c7..d5f9387 100644 --- a/docs/flux/Flux-User-Guide.md +++ b/docs/flux/Flux-User-Guide.md @@ -51,6 +51,7 @@ This sets the variable `var1` to the value 'value1' and `var2` to the value 'val ## Writing Flux files The following snippet shows a simple flux file: + ```c //declare variables default file = FLUX_DIR + "10.marc21"; @@ -65,8 +66,9 @@ file | write("stdout") ; ``` + In the first section [variables](#variables) are declared, in the second, we [define the flow](#flow-definitions). -A flow is a combination of different [FLUX commands. Here is a list to all available Flux-Commands.](https://github.com/metafacture/metafacture-documentation/blob/master/flux-commands.md) +A flow is a combination of different [FLUX commands. Here is a list to all available Flux-Commands.](/docs/flux/flux-commands.html) Linebreaks are optional, but help concerning readability. One can add comments with `//`. Semicolons `;` mark the end of a variable assignment or flow definition. @@ -90,7 +92,7 @@ The syntax for defining flows takes its cues from bash pipes. Commands are conca Some commands take a constructor argument. It is provided within brackets: `command("arg")`. Furthermore, some commands have named options. These are set as follows `command(optionname="arg1",annotheroption="arg2")` or with constructor argument: `command("arg",option="arg2")`. -To learn about the available options of a command, execute Flux without arguments - it will list all available commands, including options. Or simply have a look at the [list of available FLUX commands.](https://github.com/metafacture/metafacture-documentation/blob/master/flux-commands.md) +To learn about the available options of a command, execute Flux without arguments - it will list all available commands, including options. Or simply have a look at the [list of available FLUX commands.](/flux-commands.md) To some commands the entire environment can be given as an argument. This is done with the `*` character: `fix("tranformation.fix", *)`. In this case Metafix gains access to all variable assignments made in Flux. @@ -98,7 +100,7 @@ To some commands the entire environment can be given as an argument. This is don Note that unlike shell pipes, the data flowing between Flux commands is _typed_. This means that only commands with matching signatures can be combined. Commands expect a certain input and provide a certain output like: `StreamReceiver, `Object`, `Reader` and others. -To lookup the signatures, again: execute Flux without arguments or see: [[Metafix-User-Guide#parameters-to-metafix-definitions]]). It will list all available commands, including signatures. Or simply have a look at the [list of available FLUX commands.](https://github.com/metafacture/metafacture-documentation/blob/master/flux-commands.md) +To lookup the signatures, again: execute Flux without arguments or see: [[Metafix-User-Guide#parameters-to-metafix-definitions]]). It will list all available commands, including signatures. Or simply have a look at the [list of available FLUX commands.](/docs/flux/flux-commands.html) ### Variables Variables are always Strings and can be concatenated with the `+` operator. Escape sequences follow the Java String conventions: `\n`=line break, `\t`=tab, `\\`=\, `\u0024`=unicode character, etc. @@ -113,16 +115,16 @@ Flux supports single line C/Java-style comments: `//comment`. ## Overview of the commands and some examples -1. Have a look at the [List of available FLUX commands](https://github.com/metafacture/metafacture-documentation/blob/master/flux-commands.md) or execute the flux without arguments to get a short help text along with a list of all registered commands. This is the list of FLUX commands mentioned already above. -2. There are several example flux files along with sample data in the folder `examples/`: https://github.com/metafacture/metafacture-core/tree/master/metafacture-runner/src/main/dist/examples +1. Have a look at the [List of available FLUX commands](/flux-commands.md) or execute the flux without arguments to get a short help text along with a list of all registered commands. This is the list of FLUX commands mentioned already above. +2. There are several example flux files along with sample data in the repo folder `examples/`: [https://github.com/metafacture/metafacture-core/tree/master/metafacture-runner/src/main/dist/examples](https://github.com/metafacture/metafacture-core/tree/master/metafacture-runner/src/main/dist/examples) _________________________ -# For developers: +## For developers: > [!NOTE] > Coding in JAVA. -## Adding new Commands +### Adding new Commands Add your class and a descriptive flux shortcut to `flux-commands.properties`. This file acts as a lookup table for flux commands. Use the proper file, i.e. the one residing in the same module where your newly created class resides. If you have e.g. created a class in the module `metafacture-biblio`, you add the flux-command to https://github.com/metafacture/metafacture-core/blob/master/metafacture-biblio/src/main/resources/flux-commands.properties. Recompile. That's all to add a command. diff --git a/docs/flux/flux.md b/docs/flux/flux.md index 2ae2cf0..9bd6e69 100644 --- a/docs/flux/flux.md +++ b/docs/flux/flux.md @@ -9,6 +9,6 @@ has_children: true Flux is a scripting language to easily build and run processing pipelines. No Java programming is necessary - it's used as a command line. To use Flux you may download the binary distribution of Metafacture. -For more information on how to use Flux, see the [Flux User Guide](/Flux-User-Guide.md). +For more information on how to use Flux, see the [Flux User Guide](/docs/flux/Flux-User-Guide.html). -See [here a list for all available FLUX-Commands](/flux-commands.md). \ No newline at end of file +See [here a list for all available FLUX-Commands](/docs/flux/flux-commands.html). \ No newline at end of file diff --git a/docs/java-integration/Framework-User-Guide.md b/docs/java-integration/Framework-User-Guide.md index 278e0fc..e987add 100644 --- a/docs/java-integration/Framework-User-Guide.md +++ b/docs/java-integration/Framework-User-Guide.md @@ -8,7 +8,7 @@ nav_order: 1 # Framework User Guide > [!NOTE] ->Relevant for Java developers. For using metafacture without Java Code see the [FLUX user guide](/Flux-User-Guide.md). +>Relevant for Java developers. For using metafacture without Java Code see the [FLUX user guide](/docs/flux/Flux-User-Guide.html). This page explains how to create a Metafacture objects and how to assemble them to form a processing pipeline. We use as an example a simple pipeline containing a Metafix instance. diff --git a/docs/java-integration/java-integration.md b/docs/java-integration/java-integration.md index 517432e..772d082 100644 --- a/docs/java-integration/java-integration.md +++ b/docs/java-integration/java-integration.md @@ -12,4 +12,4 @@ has_children: true The framework includes the interfaces and abstract classes which form the foundation of the data processing pipelines. This part of Metafacture is only relevant for you if you plan to use Metafacture as a Java library or if you wish to add pipe elements to Flux. -For more information see the [Framework User Guide](/Framework-User-Guide.md). \ No newline at end of file +For more information see the [Framework User Guide](/docs/java-integration/Framework-User-Guide.html). \ No newline at end of file diff --git a/index.md b/index.md index 9cd651c..2ed31ce 100644 --- a/index.md +++ b/index.md @@ -10,7 +10,7 @@ permalink: / Metafacture is a toolkit for processing semi-structured data with a focus on library metadata. It provides a versatile set of tools for reading, writing and transforming data. Metafacture can be used as a stand-alone application via CLI or as a Java library in other applications. There is also a playground where you can test workflows. -[Have a look here for a quick intro into metafacture.](./MF-in-5-min.md) +[Have a look here for a quick intro into metafacture.](./docs/MF-in-5-min.html) This is the central place for the documentation about Metafacture. @@ -31,5 +31,5 @@ Deciding which parts are relevant to you depends on the way you are using Metafa > [!NOTE] > No Java-Code is necessary!!! -While working with the playground or the command line you only need [Flux](#flux) and the transformation module [Fix](#fix). -Have a look here for [Getting started](/Getting-Started.md). +While working with the playground or the command line you only need [Flux](/docs/flux/flux.html) and the transformation module [Fix](/docs/fix/fix.html). +Have a look here for [Getting started](/docs/Getting-Started.html).