Skip to content

Commit

Permalink
Fix links and some formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Phu2 committed Mar 28, 2024
1 parent 0788e96 commit 86278fa
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 23 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/?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

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](/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

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](/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).
2 changes: 1 addition & 1 deletion 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. 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.

Expand Down
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](/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
Expand Down Expand Up @@ -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
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/fix/fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
16 changes: 9 additions & 7 deletions docs/flux/Flux-User-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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.
Expand All @@ -90,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.](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.
(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.](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.
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/flux/flux.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
See [here a list for all available FLUX-Commands](/docs/flux/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](/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.

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 @@ 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).
For more information see the [Framework User Guide](/docs/java-integration/Framework-User-Guide.html).
6 changes: 3 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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).

0 comments on commit 86278fa

Please sign in to comment.