Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

28 use jekyll theme #43

Merged
merged 37 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5806a50
Create jekyll.yml
Phu2 Mar 27, 2024
ca2b9c1
Copy content of README.md into index.md
Phu2 Mar 27, 2024
865d8ff
Restructure files/pages, add YAML headers
Phu2 Mar 28, 2024
bfa7d8b
Add logo to header/sidebar, remove from pages
Phu2 Mar 28, 2024
9d9df6d
Add footer
Phu2 Mar 28, 2024
0788e96
Add custom link color and font sizes
Phu2 Mar 28, 2024
86278fa
Fix links and some formatting
Phu2 Mar 28, 2024
d0fe9a5
Fix link
Phu2 Mar 28, 2024
99971ae
Adjust some search options
Phu2 Mar 28, 2024
c344831
Update _config.yml
TobiasNx Mar 28, 2024
123d229
Update index.md
TobiasNx Mar 28, 2024
cfc200d
Add transparent logo
Phu2 Apr 2, 2024
56ad766
Merge pull request #2 from TobiasNx/patch-3
Phu2 Apr 2, 2024
150e2e2
Merge pull request #3 from TobiasNx/patch-4
Phu2 Apr 2, 2024
b5d13a2
Merge branch 'master' of https://github.com/Phu2/metafacture-document…
Phu2 Apr 2, 2024
902cb08
Merge branch 'Phu2-master' into 28-use-jekyll-theme
Phu2 Apr 2, 2024
e59f6b9
Change url from Phu2 to metafacture
Phu2 Apr 2, 2024
6cb778d
Delete workflow file
Phu2 Apr 2, 2024
3e1ba90
Merge pull request #35 from metafacture/master
Phu2 Apr 3, 2024
d3b6a63
Add Gemfile
Phu2 Apr 3, 2024
6be8781
Change callout for notes #28
TobiasNx Apr 3, 2024
a8eb25a
Merge pull request #36 from metafacture/28-calloutForNote
Phu2 Apr 3, 2024
75959f8
Adjust note callout #28
TobiasNx Apr 3, 2024
6c1659c
Configure callouts
Phu2 Apr 3, 2024
fbb9576
Update Fix-functions-and-Cookbook.md
TobiasNx Apr 9, 2024
d199d78
Update MF-in-5-min.md (#42)
TobiasNx Apr 19, 2024
fd5bfb1
Merge remote-tracking branch 'origin/master' into 28-use-jekyll-theme
TobiasNx Apr 24, 2024
2864245
Update README.md for new format #28
TobiasNx Apr 24, 2024
59f4895
Update Getting-Started.md
TobiasNx May 6, 2024
0f52245
Update Documentation-Maintainer-Guide.md
TobiasNx May 6, 2024
38bb8d8
Update Documentation-Maintainer-Guide.md
TobiasNx May 6, 2024
a771c6f
Merge remote-tracking branch 'origin/master' into 28-use-jekyll-theme
TobiasNx May 17, 2024
1a4ef58
Apply suggestions from code review by @fsteeg #28
TobiasNx May 21, 2024
893c7be
Update Fix-functions-and-Cookbook.md
TobiasNx May 22, 2024
264ff3d
Apply suggestions from code review
TobiasNx May 22, 2024
0c5ea55
Adjust License linking #28
TobiasNx May 22, 2024
035c82f
Apply suggestions from code review
TobiasNx May 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source 'https://rubygems.org'

gem "jekyll", "~> 4.3.3" # installed by `gem jekyll`
# gem "webrick" # required when using Ruby >= 3 and Jekyll <= 4.2.2

gem "just-the-docs", "0.8.1" # pinned to the current release
# gem "just-the-docs" # always download the latest release
65 changes: 5 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,16 @@

# Metafacture Documentation

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.
Metafacture is a toolkit for processing semi-structured data with a focus on library metadata
For the documentation see: http://metafacture.github.io/metafacture-documentation/

[Have a look here for a quick intro into metafacture.](./MF-in-5-min.md)
This repo is the central place for the documentation about Metafacture that we render using the jekyll template [Just the docs](https://github.com/just-the-docs/just-the-docs).

This is the central place for the documentation about Metafacture.

Metafacture comprises three main parts: **Framework**, **Flux** and one of the **Transformation-Modules Fix and Morph**. It can be extended with modules.
The content pages can be found [here](/docs/)

> [!NOTE]
> With regard to the Transformation-Modules this documentation focusses on Fix instead of MORPH. If you want to find out more about 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/).


Our goal with this repo is to collaboratively create comprehensive documentation on Metafacture in the [issue tracker](https://github.com/culturegraph/metafacture-documentation/issues?q=). Feel free to open issues not only for bugs or enhancements, but also questions about Metafacture usage, or to share your experiences. We hope that over time, in that way we can create useful tutorials, how-tos, and collect good practices for using Metafacture.

__________________

Deciding which parts are relevant to you depends on the way you are using Metafacture:

## Using Metafacture via playground or CLI

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

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

__________________

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

For more information on how to use Flux, see the [Flux User Guide](/Flux-User-Guide.md).

See [here a list for all available FLUX-Commands](/flux-commands.md).

__________________

## FIX

Metafix is a domain specific language for metadata transformation based on Catmandu FIX. The FIX object performing the transformation is used as part of a processing pipeline.

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

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

> [!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/).

__________________

## Framework

> [!NOTE]
>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](/Framework-User-Guide.md).
Our goal with this repo is to collaboratively create comprehensive documentation on Metafacture in the [issue tracker](https://github.com/metafacture/metafacture-documentation/issues?q=). Feel free to open issues not only for bugs or enhancements, but also questions about Metafacture usage, or to share your experiences. We hope that over time, in that way we can create useful tutorials, how-tos, and collect good practices for using Metafacture.

56 changes: 56 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
title: Metafacture Documentation
description: This is the central place for the documentation about Metafacture.
theme: just-the-docs

url: https://metafacture.github.io/metafacture-documentation

aux_links:
Metafacture Documentation on Github: https://github.com/metafacture/metafacture-documentation

# External navigation links
nav_external_links:
- title: LICENSE
url: https://github.com/metafacture/metafacture-core/blob/master/LICENSE

# Set a path/url to a logo that will be displayed instead of the title
logo: "/assets/images/metafacture_small.png"
favicon_ico: "/assets/images/favicon.ico"

# Footer content
# appears at the bottom of every page's main content

# Back to top link
back_to_top: true
back_to_top_text: "Back to top"

footer_content: 'Metafacture Documentation is maintained by the <a href="https://lobid.org/team-en/">Open infrastructure team of hbz.</a>'

# Footer last edited timestamp
last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter
last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html

# Custom colors, see _sass/color_schemes/metafacture.scss
color_scheme: metafacture

# see https://just-the-docs.github.io/just-the-docs/docs/search/#search-granularity
search:
heading_level: 6
previews: 6

# Callouts, see https://just-the-docs.com/docs/configuration/#callouts
callouts_level: quiet # or loud
callouts:
highlight:
color: yellow
important:
title: Important
color: blue
new:
title: New
color: green
note:
title: Note
color: purple
warning:
title: Warning
color: red
1 change: 1 addition & 0 deletions _sass/color_schemes/metafacture.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$link-color: #4183c4;
4 changes: 4 additions & 0 deletions _sass/custom/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
h4 {font-size: 1rem !important;}
h5 {
font-size: 1.5rem !important;
}
Binary file added assets/images/favicon.ico
Binary file not shown.
Binary file added assets/images/metafacture_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
layout: default
title: Approaching a transformation with metafacture
nav_order: 4
---

Every approach to transform metadata with metafacture is quite similiar:

- You need to know the type and source of the input and the type and destination of the output:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
---
layout: default
title: Maintainer Guide
nav_order: 8
---

## how to change flux-commands.md
# Maintainer Guide

The entries in flux-commands.md describe the usage of commands used by flux.
## how to change [docs/flux/flux-commands.md](https://github.com/metafacture/metafacture-documentation/blob/28-use-jekyll-theme/docs/flux/flux-commands.md)

The entries in [docs/flux/flux-commands.md](https://github.com/metafacture/metafacture-documentation/blob/28-use-jekyll-theme/docs/flux/flux-commands.md) describe the usage of commands used by flux.
flux-commands.md is fully automatically generated. To make this happen one has to
fill in the proper annotations in the correponding java classes. E.g.

Expand Down Expand Up @@ -30,7 +37,7 @@ The option's name is produced by cutting away the "set" from the methods name, l
"BatchSize" which is then lowercased. The parameter of this option is generated from the
parameter type of the method - here an "int"eger.

## how to publish flux-commands.md
## how to publish [docs/flux/flux-commands.md](https://github.com/metafacture/metafacture-documentation/blob/28-use-jekyll-theme/docs/flux/flux-commands.md)

If you have updated some of these annotations, say "description", and these changes are
merged into the master branch, generate a new flux-commands.md like this:
Expand All @@ -43,6 +50,7 @@ $ flux.sh > flux-commands.md
```

Open the generated flux-commands.md and remove some boilerplate at the beginning of the
file manually. Save it, copy it here, commit and push.
file manually. Add the naviagtion part of the page, save it, copy it [here](https://github.com/metafacture/metafacture-documentation/blob/28-use-jekyll-theme/docs/flux/flux-commands.md), commit and push.


The [publishing process will be automated with an github action](https://github.com/metafacture/metafacture-core/issues/368).
19 changes: 11 additions & 8 deletions Getting-Started.md → docs/Getting-Started.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
![logo](https://github.com/culturegraph/metafacture-core/wiki/img/metafacture_small.png)

---
layout: default
title: Getting Started
nav_order: 2
---

# Getting started!

## Playground

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](/flux-commands.md).
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](/Fix-functions-and-cookbook).
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](/Flux-User-Guide.md) and [FIX](/Fix-User-Guide.md). 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 @@ -22,9 +25,9 @@ To use Metafacture as a command-line tool, download the latest metafix-runner fr

To get started, you can export a workflow from the Playground (last button, !["Export Workflow"](https://metafacture.org/img/export.png)).

To set up IDE support for editing your Flux and Fix files, see [the IDE extensions page](https://metafacture.org/ide-extensions/index.html).
To set up IDE support for editing your Flux and Fix files, see [the IDE extensions page](https://metafacture.org/ide-extensions.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](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 @@ -55,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](java-integration/Framework-User-Guide.html).
12 changes: 9 additions & 3 deletions MF-in-5-min.md → docs/MF-in-5-min.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
layout: default
title: 5 min Intro into MF
nav_order: 3
---

# Introduction - A quick 5 minute introduction to Metafacture

## HELLO WORLD
Expand Down Expand Up @@ -87,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](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 @@ -173,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](./Getting-Started.md).
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)
(Note: This mini introduction to Metafacture is inspired by the mini [introduction to Catmandu](https://metacpan.org/dist/Catmandu/view/lib/Catmandu/Introduction.pod))
11 changes: 8 additions & 3 deletions Fix-User-Guide.md → docs/fix/Fix-User-Guide.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
![logo](https://github.com/culturegraph/metafacture-core/wiki/img/metafacture_small.png)
---
layout: default
title: Fix User Guide
parent: Fix
nav_order: 1
---

# Fix User Guide

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](../flux/Flux-User-Guide.html), for this you have to use this in your pipeline:

Flux-Example:
```PERL
Expand Down Expand Up @@ -85,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](Fix-functions-and-Cookbook.html).


## Addressing Pieces of Data: FIX-Path and the record structure in FIX
Expand Down
Loading