Skip to content

Commit

Permalink
Merge pull request #25 from metafacture/Update-Getting-Started
Browse files Browse the repository at this point in the history
Update the getting started page
  • Loading branch information
TobiasNx committed Sep 12, 2023
2 parents fc512c5 + 1dfc871 commit 59fd550
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 3 deletions.
81 changes: 80 additions & 1 deletion getting-started.html
Expand Up @@ -12,6 +12,68 @@
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<link rel="stylesheet" href="github-pandoc.css" />
<!--[if lt IE 9]>
Expand Down Expand Up @@ -50,13 +112,30 @@ <h1 class="title">Getting started</h1>
<h2 id="playground">Playground</h2>
<p>The easiest way to get started with Metafacture is the Playground. Take a look at the <a href="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&amp;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&amp;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&amp;active-editor=fix">first example</a> and run it by pressing the <img src="img/process.png" alt="“Process”" /> button. Check out the other examples (first button, <img src="img/load-exmples.png" alt="“Load Examples”" />) for different input sources, transformations, and output formats.</p>
<p>For commands available in the Flux, see <a href="https://github.com/metafacture/metafacture-documentation/blob/master/flux-commands.md">the Flux commands documentation</a>.</p>
<p>For functions and usage of the Fix, see <a href="https://github.com/metafacture/metafacture-fix#functions-and-cookbook">the Fix functions and cookbook</a>.</p>
<p>For functions and usage of the Fix, see <a href="https://github.com/metafacture/metafacture-documentation/blob/master/Fix-function-and-Cookbook.md">the Fix functions and cookbook</a>.</p>
<h2 id="command-line">Command line</h2>
<p>To use Metafacture as a command-line tool, download the latest metafix-runner from our <a href="https://github.com/metafacture/metafacture-fix/releases">releases page</a>. Extract the downloaded archive and change into the newly created directory (e.g. <code>cd metafacture-runner-0.4.0</code>). Run a Flux workflow with:</p>
<p><code>$ ./bin/metafix-runner /path/to/your.flux</code> on Unix/Linux/Mac or <code>$ ./bin/metafix-runner.bat /path/to/your.flux</code> on Windows.</p>
<p>To get started, you can export a workflow from the Playground (last button, <img src="img/export.png" alt="“Export Workflow”" />).</p>
<p>To set up IDE support for editing your Flux and Fix files, see <a href="/ide-extensions/index.html">the IDE extensions page</a>.</p>
<h2 id="using-metafacture-as-a-java-library">Using Metafacture as a Java library</h2>
<p>If you want to use Metafacture in your own Java projects all you need is to add some dependencies to your project. As of Metafacture 5, the single metafacture-core package has been replaced with a number of domain-specific packages. You can find the list of packages on <a href="https://search.maven.org/search?q=g:org.metafacture">Maven Central</a>.</p>
<p>Alternatively, you can simply guess the package names from the top-level folders in the source code repository – they are the same.</p>
<p>For instance, if you want to use the <code>metafacture-io</code> library in your project, simply add the following dependency to your <code>pom.xml</code>:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode xml"><code class="sourceCode xml"><span id="cb1-1"><a href="#cb1-1"></a><span class="kw">&lt;dependency&gt;</span></span>
<span id="cb1-2"><a href="#cb1-2"></a> <span class="kw">&lt;groupId&gt;</span>org.metafacture<span class="kw">&lt;/groupId&gt;</span></span>
<span id="cb1-3"><a href="#cb1-3"></a> <span class="kw">&lt;artifactId&gt;</span>metafacture-io<span class="kw">&lt;/artifactId&gt;</span></span>
<span id="cb1-4"><a href="#cb1-4"></a> <span class="kw">&lt;version&gt;</span>$VERSION<span class="kw">&lt;/version&gt;</span></span>
<span id="cb1-5"><a href="#cb1-5"></a><span class="kw">&lt;/dependency&gt;</span></span></code></pre></div>
<p>or if Gradle is your build tool of choice use:</p>
<pre class="groovy"><code>dependencies {
implementation &#39;org.metafacture:metafacture-io:$VERSION&#39;
}</code></pre>
<p>To use Fix you would declare <code>metafix</code> instead of <code>metafacture-io</code> as in the example above. Note that <code>metafix</code> is not published to maven central but only to <a href="https://github.com/metafacture/metafacture-fix/releases">github releases</a>.</p>
<p>Occasionally, we publish snapshot builds on <a href="https://oss.sonatype.org/index.html#nexus-search;gav~org.metafacture~~~~~kw,versionexpand">Sonatype OSS Repository</a>. The version number is derived from the branch name. Snapshot builds from the master branch always have the version <code>master-SNAPSHOT</code>. We also provide sometimes pre releases as github packages.</p>
<h2 id="next-steps">Next steps</h2>
<p>Get familar with <a href="https://github.com/metafacture/metafacture-documentation/blob/master/Flux-User-Guide.md">FLUX</a> and <a href="https://github.com/metafacture/metafacture-documentation/blob/master/Fix-User-Guide.md">FIX</a>. And try out some Metafacture workflows.</p>
<p>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 <a href="https://github.com/metafacture/metafacture-documentation/blob/master/Framework-User-Guide.md">Framework</a>.</p>
<p>For a complete introduction to Metafacture in German, check out the latest iteration of <a href="https://slides.lobid.org/2022-12-metafacture-workshop/#/">our Metafacture Workshop</a>. For different use cases, e.g. using Metafacture as a library, using the Morph language, and more, see <a href="https://github.com/metafacture/metafacture-documentation">our documentation collection</a>.</p>
</body>
</html>
37 changes: 35 additions & 2 deletions getting-started.md
Expand Up @@ -10,7 +10,7 @@ The easiest way to get started with Metafacture is the Playground. Take a look a

For commands available in the Flux, see [the Flux commands documentation](https://github.com/metafacture/metafacture-documentation/blob/master/flux-commands.md).

For functions and usage of the Fix, see [the Fix functions and cookbook](https://github.com/metafacture/metafacture-fix#functions-and-cookbook).
For functions and usage of the Fix, see [the Fix functions and cookbook](https://github.com/metafacture/metafacture-documentation/blob/master/Fix-function-and-Cookbook.md).

## Command line

Expand All @@ -23,6 +23,39 @@ 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](/ide-extensions/index.html).

## Using Metafacture as a Java library

If you want to use Metafacture in your own Java projects all you need is to add some dependencies to your project. As of Metafacture 5, the single metafacture-core package has been replaced with a number of domain-specific packages. You can find the list of packages on [Maven Central](https://search.maven.org/search?q=g:org.metafacture).

Alternatively, you can simply guess the package names from the top-level folders in the source code repository -- they are the same.

For instance, if you want to use the `metafacture-io` library in your project, simply add the following dependency to your `pom.xml`:

```xml
<dependency>
<groupId>org.metafacture</groupId>
<artifactId>metafacture-io</artifactId>
<version>$VERSION</version>
</dependency>
```

or if Gradle is your build tool of choice use:

```groovy
dependencies {
implementation 'org.metafacture:metafacture-io:$VERSION'
}
```

To use Fix you would declare `metafix` instead of `metafacture-io` as in the example above. Note that `metafix` is not published to maven central but only to [github releases](https://github.com/metafacture/metafacture-fix/releases).

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.

## Next steps

For a complete introduction to Metafacture in German, check out the latest iteration of [our Metafacture Workshop](https://slides.lobid.org/2022-12-metafacture-workshop/#/). For different use cases, e.g. using Metafacture as a library, using the Morph language, and more, see [our documentation collection](https://github.com/metafacture/metafacture-documentation).
Get familar with [FLUX](https://github.com/metafacture/metafacture-documentation/blob/master/Flux-User-Guide.md) and [FIX](https://github.com/metafacture/metafacture-documentation/blob/master/Fix-User-Guide.md). And try out some Metafacture workflows.

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](https://github.com/metafacture/metafacture-documentation/blob/master/Framework-User-Guide.md).

For a complete introduction to Metafacture in German, check out the latest iteration of [our Metafacture Workshop](https://slides.lobid.org/2022-12-metafacture-workshop/#/).
For different use cases, e.g. using Metafacture as a library, using the Morph language, and more, see [our documentation collection](https://github.com/metafacture/metafacture-documentation).

0 comments on commit 59fd550

Please sign in to comment.