|
12 | 12 | div.column{display: inline-block; vertical-align: top; width: 50%;}
|
13 | 13 | div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
14 | 14 | ul.task-list{list-style: none;}
|
| 15 | + pre > code.sourceCode { white-space: pre; position: relative; } |
| 16 | + pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } |
| 17 | + pre > code.sourceCode > span:empty { height: 1.2em; } |
| 18 | + code.sourceCode > span { color: inherit; text-decoration: inherit; } |
| 19 | + div.sourceCode { margin: 1em 0; } |
| 20 | + pre.sourceCode { margin: 0; } |
| 21 | + @media screen { |
| 22 | + div.sourceCode { overflow: auto; } |
| 23 | + } |
| 24 | + @media print { |
| 25 | + pre > code.sourceCode { white-space: pre-wrap; } |
| 26 | + pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } |
| 27 | + } |
| 28 | + pre.numberSource code |
| 29 | + { counter-reset: source-line 0; } |
| 30 | + pre.numberSource code > span |
| 31 | + { position: relative; left: -4em; counter-increment: source-line; } |
| 32 | + pre.numberSource code > span > a:first-child::before |
| 33 | + { content: counter(source-line); |
| 34 | + position: relative; left: -1em; text-align: right; vertical-align: baseline; |
| 35 | + border: none; display: inline-block; |
| 36 | + -webkit-touch-callout: none; -webkit-user-select: none; |
| 37 | + -khtml-user-select: none; -moz-user-select: none; |
| 38 | + -ms-user-select: none; user-select: none; |
| 39 | + padding: 0 4px; width: 4em; |
| 40 | + color: #aaaaaa; |
| 41 | + } |
| 42 | + pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } |
| 43 | + div.sourceCode |
| 44 | + { } |
| 45 | + @media screen { |
| 46 | + pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } |
| 47 | + } |
| 48 | + code span.al { color: #ff0000; font-weight: bold; } /* Alert */ |
| 49 | + code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ |
| 50 | + code span.at { color: #7d9029; } /* Attribute */ |
| 51 | + code span.bn { color: #40a070; } /* BaseN */ |
| 52 | + code span.bu { } /* BuiltIn */ |
| 53 | + code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ |
| 54 | + code span.ch { color: #4070a0; } /* Char */ |
| 55 | + code span.cn { color: #880000; } /* Constant */ |
| 56 | + code span.co { color: #60a0b0; font-style: italic; } /* Comment */ |
| 57 | + code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ |
| 58 | + code span.do { color: #ba2121; font-style: italic; } /* Documentation */ |
| 59 | + code span.dt { color: #902000; } /* DataType */ |
| 60 | + code span.dv { color: #40a070; } /* DecVal */ |
| 61 | + code span.er { color: #ff0000; font-weight: bold; } /* Error */ |
| 62 | + code span.ex { } /* Extension */ |
| 63 | + code span.fl { color: #40a070; } /* Float */ |
| 64 | + code span.fu { color: #06287e; } /* Function */ |
| 65 | + code span.im { } /* Import */ |
| 66 | + code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ |
| 67 | + code span.kw { color: #007020; font-weight: bold; } /* Keyword */ |
| 68 | + code span.op { color: #666666; } /* Operator */ |
| 69 | + code span.ot { color: #007020; } /* Other */ |
| 70 | + code span.pp { color: #bc7a00; } /* Preprocessor */ |
| 71 | + code span.sc { color: #4070a0; } /* SpecialChar */ |
| 72 | + code span.ss { color: #bb6688; } /* SpecialString */ |
| 73 | + code span.st { color: #4070a0; } /* String */ |
| 74 | + code span.va { color: #19177c; } /* Variable */ |
| 75 | + code span.vs { color: #4070a0; } /* VerbatimString */ |
| 76 | + code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ |
15 | 77 | </style>
|
16 | 78 | <link rel="stylesheet" href="github-pandoc.css" />
|
17 | 79 | <!--[if lt IE 9]>
|
@@ -50,13 +112,30 @@ <h1 class="title">Getting started</h1>
|
50 | 112 | <h2 id="playground">Playground</h2>
|
51 | 113 | <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&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">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>
|
52 | 114 | <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>
|
53 |
| -<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> |
| 115 | +<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> |
54 | 116 | <h2 id="command-line">Command line</h2>
|
55 | 117 | <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>
|
56 | 118 | <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>
|
57 | 119 | <p>To get started, you can export a workflow from the Playground (last button, <img src="img/export.png" alt="“Export Workflow”" />).</p>
|
58 | 120 | <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>
|
| 121 | +<h2 id="using-metafacture-as-a-java-library">Using Metafacture as a Java library</h2> |
| 122 | +<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> |
| 123 | +<p>Alternatively, you can simply guess the package names from the top-level folders in the source code repository – they are the same.</p> |
| 124 | +<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> |
| 125 | +<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"><dependency></span></span> |
| 126 | +<span id="cb1-2"><a href="#cb1-2"></a> <span class="kw"><groupId></span>org.metafacture<span class="kw"></groupId></span></span> |
| 127 | +<span id="cb1-3"><a href="#cb1-3"></a> <span class="kw"><artifactId></span>metafacture-io<span class="kw"></artifactId></span></span> |
| 128 | +<span id="cb1-4"><a href="#cb1-4"></a> <span class="kw"><version></span>$VERSION<span class="kw"></version></span></span> |
| 129 | +<span id="cb1-5"><a href="#cb1-5"></a><span class="kw"></dependency></span></span></code></pre></div> |
| 130 | +<p>or if Gradle is your build tool of choice use:</p> |
| 131 | +<pre class="groovy"><code>dependencies { |
| 132 | + implementation 'org.metafacture:metafacture-io:$VERSION' |
| 133 | +}</code></pre> |
| 134 | +<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> |
| 135 | +<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> |
59 | 136 | <h2 id="next-steps">Next steps</h2>
|
| 137 | +<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> |
| 138 | +<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> |
60 | 139 | <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>
|
61 | 140 | </body>
|
62 | 141 | </html>
|
0 commit comments