Skip to content

Commit

Permalink
Apply suggestions from code review by @fsteeg #28
Browse files Browse the repository at this point in the history
Co-authored-by: Fabian Steeg <[email protected]>
  • Loading branch information
TobiasNx and fsteeg authored May 21, 2024
1 parent a771c6f commit 1a4ef58
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions docs/Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/?example=encode-xml) 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](/docs/flux/flux-commands.html).
For commands available in the Flux, see [the Flux commands documentation](flux/flux-commands.html).

For functions and usage of the Fix, see [the Fix functions and cookbook](/docs/fix/Fix-functions-and-cookbook.html).
For functions and usage of the Fix, see [the Fix functions and cookbook](fix/Fix-functions-and-cookbook.html).

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.
For next steps get familar with [FLUX](flux/Flux-User-Guide.html) and [FIX](fix/Fix-User-Guide.html). And try out some Metafacture workflows.

## Command line

Expand All @@ -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](/docs/flux/Flux-User-Guide.html) and [FIX](/docs/fix/Fix-User-Guide.html). And try out some Metafacture workflows.
For next steps get familar with [FLUX](flux/Flux-User-Guide.html) and [FIX](fix/Fix-User-Guide.html). And try out some Metafacture workflows.

## Using Metafacture as a Java library

Expand Down Expand Up @@ -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](/docs/java-integration/Framework-User-Guide.html).
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](java-integration/Framework-User-Guide.html).
4 changes: 2 additions & 2 deletions docs/MF-in-5-min.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. See the [full list of Fix functions](/docs/fix/Fix-functions-and-Cookbook.html#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](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.

Expand Down Expand Up @@ -179,6 +179,6 @@ The 245 field with its subfields of each MARC record is mapped to the title fiel
The `retain` Fix function keeps only the title field in the output. (In contrast to Catmandu there are no special marc or pica fixes since the internal handling of records and elements is more generic. Also the internal serialization of MARC is not as complex as in Catmandu.)


Now you should be ready to [get started](/docs/Getting-Started.html).
Now you should be ready to [get started](Getting-Started.html).

(Note: This mini introduction to Metafacture is inspired by the mini introduction to Catmandu here: https://metacpan.org/dist/Catmandu/view/lib/Catmandu/Introduction.pod)
4 changes: 2 additions & 2 deletions docs/fix/Fix-User-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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](/docs/flux/Flux-User-Guide.html), for this you have to use this in your pipeline:
Metafacture Fix is a transformation module that can be used in a [Flux Workflow](../flux/Flux-User-Guide.html), for this you have to use this in your pipeline:

Flux-Example:
```PERL
Expand Down Expand Up @@ -90,7 +90,7 @@ do Bind(params,…)
end
```

Find here a [list of all functions, selectors, binds and conditionals](//docs/fix/s-and-Cookbook.html).
Find here a [list of all functions, selectors, binds and conditionals](Fix-functions-and-Cookbook.html).


## Addressing Pieces of Data: FIX-Path and the record structure in FIX
Expand Down
8 changes: 4 additions & 4 deletions docs/fix/fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Metafix is a domain specific language for metadata transformation based on Catma

If you are using **Metafacture with CLI or Playground** and therefore the Flux scripting language to build and run pipelines, use the `fix` command in your FLUX-Pipeline.

If you are using **Metafacture as a Java library**, just create a Metafix object and add it to your pipeline (see also the [Framework User Guide](#framework)).
If you are using **Metafacture as a Java library**, create a Metafix object and add it to your pipeline (see also the [Framework User Guide](../java-integration/Framework-User-Guide.html)).

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).
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.html).

See [here a list for all available FIX functions and a cookbook for using fix](//docs/fix/Fix-functions-and-Cookbook.html).
See [here a list for all available FIX functions and a cookbook for using 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/).
PS: There is also the transformation module 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/).
8 changes: 4 additions & 4 deletions docs/flux/Flux-User-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ file
```

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.](/docs/flux/flux-commands.html)
A flow is a combination of different FLUX commands. [Here is a list of all available Flux-Commands.](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.
Expand All @@ -92,15 +92,15 @@ 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.](/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.html)


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.
(See also [[Metafix-User-Guide#parameters-to-metafix-definitions]]).

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.](/docs/flux/flux-commands.html)
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.](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.
Expand All @@ -115,7 +115,7 @@ 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](/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.
1. Have a look at the [list of available FLUX commands](flux-commands.html) 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)

_________________________
Expand Down
6 changes: 3 additions & 3 deletions docs/flux/flux.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ has_children: true

# FLUX

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.
Flux is a scripting language to easily build and run processing pipelines. No Java programming is necessary - it's used on the 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](/docs/flux/Flux-User-Guide.html).
For more information on how to use Flux, see the [Flux User Guide](Flux-User-Guide.html).

See [here a list for all available FLUX-Commands](/docs/flux/flux-commands.html).
See [here a list for all available FLUX-Commands](flux-commands.html).
2 changes: 1 addition & 1 deletion docs/java-integration/Framework-User-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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](/docs/flux/Flux-User-Guide.html).
Relevant for Java developers. For using metafacture without Java Code see the [FLUX user guide](../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.

Expand Down
2 changes: 1 addition & 1 deletion docs/java-integration/java-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Relevant for developers

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](/docs/java-integration/Framework-User-Guide.html).
For more information see the [Framework User Guide](Framework-User-Guide.html).
6 changes: 3 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ 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](/docs/flux/flux.html) and the transformation module [Fix](/docs/fix/fix.html).
Have a look here for [Getting started](/docs/Getting-Started.html).
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).


## Framework for Java integration/development

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).
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).

0 comments on commit 1a4ef58

Please sign in to comment.