-
Notifications
You must be signed in to change notification settings - Fork 0
/
getting-started.html
138 lines (135 loc) · 9.34 KB
/
getting-started.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Metafacture – Getting started</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<style type="text/css">
a.sourceLine { display: inline-block; line-height: 1.25; }
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
a.sourceLine:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
a.sourceLine { text-indent: -1em; padding-left: 1em; }
}
pre.numberSource a.sourceLine
{ position: relative; left: -4em; }
pre.numberSource a.sourceLine::before
{ content: attr(title);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; pointer-events: all; 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 {
a.sourceLine::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" />
<link rel="Metafacture Icon" type="image/x-icon" href="./img/metafacture-icon.png">
</head>
<body>
<img src="./img/metafacture.png" alt="Metafacture" style="max-width:100%"/>
<center>
<b>
<a href="./index.html">Home</a>
 | 
<a href="./getting-started.html">Getting started</a>
 | 
<a href="https://metafacture.github.io/metafacture-documentation/">Documentation</a>
 | 
<a href="./ide-extensions.html">IDE Extensions</a>
 | 
<a href="https://blog.metafacture.org">Blog</a>
 | 
<a href="https://metafacture.org/playground">Playground</a>
  
</br>
<a href='https://openbiblio.social/@metafacture'><img src='./img/Mastodon.png'/></a>
<a href='https://twitter.com/metafacture'><img src='./img/Twitter.png'/></a>
<a href='https://github.com/metafacture'><img src='./img/GitHub.png'/></a>
</b>
</center>
<header id="title-block-header">
<h1 class="title">Getting started</h1>
</header>
<h2 id="playground">Playground</h2>
<p>The easiest way to get started with Metafacture is the Playground. Take a look at an <a href="https://metafacture.org/playground/?example=encode-xml">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-documentation/blob/master/Fix-function-and-Cookbook.md">the Fix functions and cookbook</a>.</p>
<p>For a tutorial, see <a href="https://metafacture.github.io/metafacture-tutorial/">metafacture-tutorial</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"><a class="sourceLine" id="cb1-1" title="1"><span class="kw"><dependency></span></a>
<a class="sourceLine" id="cb1-2" title="2"> <span class="kw"><groupId></span>org.metafacture<span class="kw"></groupId></span></a>
<a class="sourceLine" id="cb1-3" title="3"> <span class="kw"><artifactId></span>metafacture-io<span class="kw"></artifactId></span></a>
<a class="sourceLine" id="cb1-4" title="4"> <span class="kw"><version></span>$VERSION<span class="kw"></version></span></a>
<a class="sourceLine" id="cb1-5" title="5"><span class="kw"></dependency></span></a></code></pre></div>
<p>or if Gradle is your build tool of choice use:</p>
<pre class="groovy"><code>dependencies {
implementation 'org.metafacture:metafacture-io:$VERSION'
}</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>