<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://okapiframework.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kuro</id>
	<title>Okapi Framework - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://okapiframework.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kuro"/>
	<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php/Special:Contributions/Kuro"/>
	<updated>2026-04-22T08:41:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>http://okapiframework.org/wiki/index.php?title=JSON_Filter&amp;diff=767</id>
		<title>JSON Filter</title>
		<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php?title=JSON_Filter&amp;diff=767"/>
		<updated>2018-11-07T18:44:32Z</updated>

		<summary type="html">&lt;p&gt;Kuro: &amp;lt;note&amp;gt; support added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Filters Header}}&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The JSON Filter is an Okapi component that implements the IFilter interface for JSON (Javascript Object Notation).&lt;br /&gt;
&lt;br /&gt;
The implementation is based on the JSON specifications: http://www.json.org/&lt;br /&gt;
&lt;br /&gt;
The following is an example of a very simple JSON file. The translatable text is highlighted:&lt;br /&gt;
&lt;br /&gt;
 {&amp;quot;menu&amp;quot;: {&lt;br /&gt;
   &amp;quot;value&amp;quot;: &amp;quot;&amp;lt;span class=&amp;quot;hi&amp;quot;&amp;gt;File&amp;lt;/span&amp;gt;&amp;quot;,&lt;br /&gt;
    &amp;quot;popup&amp;quot;: {&lt;br /&gt;
       &amp;quot;menuitem&amp;quot;: [&lt;br /&gt;
          {&amp;quot;value&amp;quot;: &amp;quot;&amp;lt;span class=&amp;quot;hi&amp;quot;&amp;gt;New&amp;lt;/span&amp;gt;&amp;quot;},&lt;br /&gt;
          {&amp;quot;value&amp;quot;: &amp;quot;&amp;lt;span class=&amp;quot;hi&amp;quot;&amp;gt;Open&amp;lt;/span&amp;gt;&amp;quot;},&lt;br /&gt;
          {&amp;quot;value&amp;quot;: &amp;quot;&amp;lt;span class=&amp;quot;hi&amp;quot;&amp;gt;Close&amp;lt;/span&amp;gt;&amp;quot;}&lt;br /&gt;
       ]&lt;br /&gt;
    }&lt;br /&gt;
 }}&lt;br /&gt;
&lt;br /&gt;
==Processing Details==&lt;br /&gt;
&lt;br /&gt;
===Input Encoding===&lt;br /&gt;
&lt;br /&gt;
JSON files are normally in one of the Unicode encoding, but the filter supports any encoding. It decides which encoding to use for the input file using the following logic:&lt;br /&gt;
&lt;br /&gt;
* If the file has a Unicode Byte-Order-Mark:&lt;br /&gt;
** Then, the corresponding encoding (e.g. UTF-8, UTF-16, etc.) is used.&lt;br /&gt;
* Else, if a header entry with a &amp;lt;code&amp;gt;charset&amp;lt;/code&amp;gt; declaration exists in the first 1000 characters of the file:&lt;br /&gt;
** If the value of the &amp;lt;code&amp;gt;charset&amp;lt;/code&amp;gt; is &amp;quot;&amp;lt;code&amp;gt;charset&amp;lt;/code&amp;gt;&amp;quot; (case insensitive):&lt;br /&gt;
*** Then the file is likely to be a template with no encoding declared, so the current encoding (auto-detected or default) is used.&lt;br /&gt;
*** Else, the declared encoding is used. Note that if the encoding has been detected from a Byte-Order-Mark and the encoding declared in the header entry does not match, a warning is generated and the encoding of the Byte-Order-Mark is used.&lt;br /&gt;
* Otherwise, the input encoding used is the default encoding that was specified when setting the filter options.&lt;br /&gt;
&lt;br /&gt;
===Output Encoding===&lt;br /&gt;
&lt;br /&gt;
If the output encoding is UTF-8:&lt;br /&gt;
&lt;br /&gt;
* If the input encoding was also UTF-8, a Byte-Order-Mark is used for the output document only if one was detected in the input document.&lt;br /&gt;
* If the input encoding was not UTF-8, no Byte-Order-Mark is used in the output document.&lt;br /&gt;
&lt;br /&gt;
===Line-Breaks===&lt;br /&gt;
&lt;br /&gt;
The type of line-breaks of the output is the same as the one of the original input.&lt;br /&gt;
&lt;br /&gt;
===Comments===&lt;br /&gt;
&lt;br /&gt;
Though not technically legal in JSON these comment types are supported:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* // comment&lt;br /&gt;
* # comment&lt;br /&gt;
* /* comment */&lt;br /&gt;
* &amp;amp;lt;!-- comment --&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
=== Options Tab===&lt;br /&gt;
&lt;br /&gt;
====Stand-alone strings====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cite&amp;gt;Extract strings without associated key&amp;lt;/cite&amp;gt; &amp;amp;mdash; Set this option to extract string that are not associated directly to a key value.&lt;br /&gt;
&lt;br /&gt;
====Strings with keys====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cite&amp;gt;Extract all key/strings pairs&amp;lt;/cite&amp;gt; &amp;amp;mdash; Set this option to extract all strings that have a key associated. If a regular expression for exceptions is defined, the strings that have a key matching the expression are not extracted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cite&amp;gt;Do not extract key/string pairs&amp;lt;/cite&amp;gt; &amp;amp;mdash; Set the option to not extract any string that has an associated key. If a regular expression for exceptions is defined, the strings that have a key matching the expression are extracted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cite&amp;gt;Excepted when the key matches the following regular expression&amp;lt;/cite&amp;gt; &amp;amp;mdash; Enter a regular expression that correspond to the keys that should have a behavior inverse to the default behavior you have selected for the key/strings pairs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cite&amp;gt;Use the key as the resname&amp;lt;/cite&amp;gt; &amp;amp;mdash; Set this option to use the value of the key as the value of the name of the extracted item (&amp;lt;code&amp;gt;resname&amp;lt;/code&amp;gt; in XLIFF).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cite&amp;gt;Use the full key path&amp;lt;/cite&amp;gt; &amp;amp;mdash; Set this option to use the full key path in the &amp;lt;code&amp;gt;resname&amp;lt;/code&amp;gt;. For example: &amp;lt;code&amp;gt;/menu/value/popup/menuitem/value&amp;lt;/code&amp;gt;. The use key name as resname option must be set for this option to take effect. If enabled, exception regular expressions apply to the full path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cite&amp;gt;Include leading &amp;quot;/&amp;quot; on key path&amp;lt;/cite&amp;gt; &amp;amp;mdash; Set this option to have a leading character '/' in the full key path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cite&amp;gt;Comma-separated list of simple keys, values of which to appear as &amp;amp;lt;note&amp;gt; in XLIFF&amp;lt;/cite&amp;gt; &amp;amp;mdash; Specify a list of keys separated by a comma. The value of the key-value pairs matching the specified keys will be transferred to &amp;amp;lt;note&amp;gt; elements in XLIFF. (This is available in M37 dev build after mid October, 2018.)&lt;br /&gt;
&lt;br /&gt;
===Content Processing Tab===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cite&amp;gt;Process text content with this sub-filter&amp;lt;/cite&amp;gt; &amp;amp;mdash; Specify an Okapi filter ID (e.g. &amp;lt;code&amp;gt;okf_html&amp;lt;/code&amp;gt;) to process the content of all translatable text with that filter. Leave this field blank for default behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cite&amp;gt;Find inline codes by patterns defined below&amp;lt;/cite&amp;gt; &amp;amp;mdash; Set this option to use the specified regular expressions on the text of the extracted items. Any match will be converted to an inline code.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This option cannot be used together with the sub-filtering option.&lt;br /&gt;
&lt;br /&gt;
By default the expression is:&lt;br /&gt;
&lt;br /&gt;
 ((%(([-0+#]?)[-0+#]?)((\d\$)?)(([\d\*]*)(\.[\d\*]*)?)[dioxXucsfeEgGpn])&lt;br /&gt;
 |((\\r\\n)|\\a|\\b|\\f|\\n|\\r|\\t|\\v)&lt;br /&gt;
 |(\{\d.*?\}))&lt;br /&gt;
&lt;br /&gt;
{{CodeFinder Help}}&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
Comments within a JSON string are parsed as part of the string content, not as comments. A configured subfilter will then process these as true comments (they will become part of the skeleton or whatever the filter is configured to do).&lt;br /&gt;
[[Category:Filters]]&lt;/div&gt;</summary>
		<author><name>Kuro</name></author>
	</entry>
	<entry>
		<id>http://okapiframework.org/wiki/index.php?title=Longhorn&amp;diff=749</id>
		<title>Longhorn</title>
		<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php?title=Longhorn&amp;diff=749"/>
		<updated>2018-08-13T22:56:43Z</updated>

		<summary type="html">&lt;p&gt;Kuro: Java version requirement updated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
Longhorn is a server application that allows you to execute Batch Configurations remotely on any set of input files. Batch Configurations which include pre-defined pipelines and filter configurations, can be exported from [[Rainbow]].&lt;br /&gt;
&lt;br /&gt;
The distribution also includes a client library to access the Longhorn Web services.&lt;br /&gt;
&lt;br /&gt;
==Download and Installation==&lt;br /&gt;
&lt;br /&gt;
* '''Stable release: http://bintray.com/okapi/Distribution/Longhorn&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Development release (snapshot): http://okapiframework.org/snapshots&amp;lt;/del&amp;gt;  Development snapshots are not currently available.&lt;br /&gt;
&lt;br /&gt;
To install Longhorn:&lt;br /&gt;
&lt;br /&gt;
* Unzip the distribution file on your server.&lt;br /&gt;
* Follow the instructions provided with the &amp;lt;code&amp;gt;readme&amp;lt;/code&amp;gt; file of the distribution.&lt;br /&gt;
* Starting with M36, Longhorn requires Java 1.8.&lt;br /&gt;
&lt;br /&gt;
==Functionality==&lt;br /&gt;
&lt;br /&gt;
To process files with Longhorn these steps are required:&lt;br /&gt;
# Create a temporary project&lt;br /&gt;
# Upload a Batch Configuration file into that project&lt;br /&gt;
# Upload the input files into that project&lt;br /&gt;
# Execute the project&lt;br /&gt;
# Download the output files&lt;br /&gt;
# Delete the project&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
There are three ways to access Longhorns functionality. There is&lt;br /&gt;
* a REST interface,&lt;br /&gt;
* a Java API and&lt;br /&gt;
* an HTML client.&lt;br /&gt;
&lt;br /&gt;
They can be used as described below.&lt;br /&gt;
&lt;br /&gt;
===REST-Interface===&lt;br /&gt;
&lt;br /&gt;
Longhorn can be accessed directly via HTTP methods:&lt;br /&gt;
;POST http://{host}/okapi-longhorn/projects/new : Creates a new temporary project and returns its URI (e.g. &amp;lt;code&amp;gt;http://localhost/okapi-longhorn/projects/1&amp;lt;/code&amp;gt;) in the &amp;lt;tt&amp;gt;Location&amp;lt;/tt&amp;gt; header of the response.&lt;br /&gt;
;POST http://{host}/okapi-longhorn/projects/1/batchConfiguration : Uploads a Batch Configuration file (must be given as multipart/form-data)&lt;br /&gt;
;POST http://{host}/okapi-longhorn/projects/1/inputFiles.zip : Adds input files as a zip archive (the zip will be extracted and the included files will be used as input files)&lt;br /&gt;
;PUT http://{host}/okapi-longhorn/projects/1/inputFiles/help.html : Uploads a file that will have the name 'help.html'&lt;br /&gt;
;GET http://{host}/okapi-longhorn/projects/1/inputFiles/help.html: Retrieve an input file that was previously added with PUT or POST&lt;br /&gt;
;POST http://{host}/okapi-longhorn/projects/1/tasks/execute : Executes the Batch Configuration on the uploaded input files&lt;br /&gt;
;POST http://{host}/okapi-longhorn/projects/1/tasks/execute/en-US/de-DE : Executes the Batch Configuration on the uploaded input files with the source language set to 'en-US' and the target language set to 'de-DE'&lt;br /&gt;
;POST http://{host}/okapi-longhorn/projects/1/tasks/execute/en-US?targets=de-DE&amp;amp;targets=fr-FR : Executes the Batch Configuration on the uploaded input files with the source language set to 'en-US' and multiple target languages, 'de-DE' and 'fr-FR'&lt;br /&gt;
;GET http://{host}/okapi-longhorn/projects/1/outputFiles : Returns a list of the output files generated&lt;br /&gt;
;GET http://{host}/okapi-longhorn/projects/1/outputFiles/help.out.html : Accesses the output file 'help.out.html' directly&lt;br /&gt;
;GET http://{host}/okapi-longhorn/projects/1/outputFiles.zip : Returns all output files in a zip archive&lt;br /&gt;
;DEL http://{host}/okapi-longhorn/projects/1 : Deletes the project&lt;br /&gt;
;GET http://{host}/okapi-longhorn/projects : Returns a list of all projects on the server&lt;br /&gt;
&lt;br /&gt;
===REST-Interface Sample code: Python===&lt;br /&gt;
&lt;br /&gt;
This example works with the requests package - minidom is used to parse the XML project list.&lt;br /&gt;
&lt;br /&gt;
    import requests&lt;br /&gt;
    from xml.dom import minidom&lt;br /&gt;
&lt;br /&gt;
    url = 'http://localhost:8080/okapi-longhorn/'&lt;br /&gt;
&lt;br /&gt;
Code to create a new project&lt;br /&gt;
&lt;br /&gt;
    r = requests.post(url+'projects/new')&lt;br /&gt;
    print r.text&lt;br /&gt;
&lt;br /&gt;
Code to '''list''' existing projects (i.e.: to check if the project was created, and to get the ID of the last project)&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(url+'projects/')&lt;br /&gt;
&lt;br /&gt;
    xmlstring = minidom.parseString(r.text)&lt;br /&gt;
    itemlist = xmlstring.getElementsByTagName('e')&lt;br /&gt;
    lastproject = len(itemlist)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code to '''post''' a '''batch config file'''&lt;br /&gt;
&lt;br /&gt;
    batchfile = open('/home/user/batchconfig.bconf', 'rb')&lt;br /&gt;
    r = requests.post(url+'projects/'+str(lastproject)+'/batchConfiguration', files=dict(batchConfiguration=batchfile))&lt;br /&gt;
&lt;br /&gt;
Code to '''put''' a string as a '''file'''&lt;br /&gt;
&lt;br /&gt;
    payload = &amp;quot;hello world!&amp;quot;&lt;br /&gt;
    r = requests.put(url+'projects/'+str(lastproject)+'/inputFiles/test.txt', files=dict(inputFile=payload))&lt;br /&gt;
&lt;br /&gt;
Code to '''post''' a '''file'''&lt;br /&gt;
&lt;br /&gt;
    payload = open('/home/user/test.txt', 'rb')&lt;br /&gt;
    r = requests.post(url+'projects/'+str(lastproject)+'/inputFiles/test.txt', files=dict(inputFile=payload))&lt;br /&gt;
&lt;br /&gt;
===REST-Interface access by curl===&lt;br /&gt;
Longhorn API can be accessed with the curl command, as shown below. Below, '-X GET' is not necessary but used there for clarity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X POST -i  'http://localhost:8080/okapi-longhorn/projects/new'&lt;br /&gt;
&lt;br /&gt;
This cretes a new project. The &amp;quot;Location:&amp;quot; header in the response&lt;br /&gt;
shows the URL for managing this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X POST -F batchConfiguration=@tmp/batchconfig.bconf 'http://localhost:8080/okapi-longhorn/projects/1/batchConfiguration'&lt;br /&gt;
&lt;br /&gt;
This submits the batch config file exported from Rainbow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X POST -F inputFile=@tmp/commonmark_original.md 'http://localhost:8080/okapi-longhorn/projects/1/inputFiles/commonmark.md'&lt;br /&gt;
&lt;br /&gt;
This sends a raw file to be extracted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X POST 'http://localhost:8080/okapi-longhorn/projects/1/tasks/execute'&lt;br /&gt;
&lt;br /&gt;
Longhorn executes the project after receiving this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X GET 'http://localhost:8080/okapi-longhorn/projects/1/outputFiles'&lt;br /&gt;
&lt;br /&gt;
Longhorn returns the list of output files. For example:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;l&amp;gt;&lt;br /&gt;
     &amp;lt;e&amp;gt;pack1/manifest.rkm&amp;lt;/e&amp;gt;&lt;br /&gt;
     &amp;lt;e&amp;gt;pack1/original/commonmark.md&amp;lt;/e&amp;gt;&lt;br /&gt;
     &amp;lt;e&amp;gt;pack1/work/commonmark.md.xlf&amp;lt;/e&amp;gt;&lt;br /&gt;
    &amp;lt;/l&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X GET 'http://localhost:8080/okapi-longhorn/projects/1/outputFiles/pack1/work/commonmark.md.xlf'&lt;br /&gt;
&lt;br /&gt;
You can obtain obtain one of the output files like this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X GET -o out.zip 'http://localhost:8080/okapi-longhorn/projects/1/outputFiles.zip'&lt;br /&gt;
&lt;br /&gt;
Or get all the output files in a zip file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X DELETE 'http://localhost:8080/okapi-longhorn/projects/1'&lt;br /&gt;
&lt;br /&gt;
This ends the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Java API===&lt;br /&gt;
&lt;br /&gt;
The API is distributed as a &amp;lt;code&amp;gt;.jar&amp;lt;/code&amp;gt; file in the Longhorn distribution package. You can also build it from the Okapi source code via Maven from the project &amp;lt;code&amp;gt;lib-longhorn-api&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Maven====&lt;br /&gt;
The API is available as a maven dependency.  Add this repository to your &amp;lt;tt&amp;gt;pom.xml&amp;lt;/tt&amp;gt;:&lt;br /&gt;
    &amp;lt;repository&amp;gt;&lt;br /&gt;
        &amp;lt;id&amp;gt;okapi-longhorn-release&amp;lt;/id&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;Okapi Longhorn Release&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;url&amp;gt;http://repository-opentag.forge.cloudbees.com/release/&amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;/repository&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Along with this dependency, substituting in a valid version number (e.g, &amp;lt;tt&amp;gt;0.27&amp;lt;/tt&amp;gt;):&lt;br /&gt;
    &amp;lt;dependency&amp;gt;&lt;br /&gt;
      &amp;lt;groupId&amp;gt;net.sf.okapi.lib&amp;lt;/groupId&amp;gt;&lt;br /&gt;
      &amp;lt;artifactId&amp;gt;okapi-lib-longhorn-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
      &amp;lt;version&amp;gt;${okapi.version}&amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;/dependency&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Sample Code====&lt;br /&gt;
&lt;br /&gt;
 LonghornService ws = new RESTService(new URI(&amp;quot;http://localhost:9095/okapi-longhorn&amp;quot;));&lt;br /&gt;
 &lt;br /&gt;
 // Create project&lt;br /&gt;
 LonghornProject proj = ws.createProject();&lt;br /&gt;
 &lt;br /&gt;
 // Post batch configuration&lt;br /&gt;
 File bconfFile = new File(&amp;quot;C:\\setup.bconf&amp;quot;);&lt;br /&gt;
 proj.addBatchConfiguration(bconfFile);&lt;br /&gt;
 &lt;br /&gt;
 // Send input files&lt;br /&gt;
 &lt;br /&gt;
 // First by single upload...&lt;br /&gt;
 File file1 = new File(&amp;quot;C:\\help.html&amp;quot;);&lt;br /&gt;
 // * in the root directory&lt;br /&gt;
 proj.addInputFile(file1, file1.getName());&lt;br /&gt;
 // * and in a sub-directory&lt;br /&gt;
 proj.addInputFile(file1, &amp;quot;samefile/&amp;quot; + file1.getName());&lt;br /&gt;
 &lt;br /&gt;
 // ...then by package upload&lt;br /&gt;
 File inputPackage = new File(&amp;quot;C:\\more_files.zip&amp;quot;);&lt;br /&gt;
 proj.addInputFilesFromZip(inputPackage);&lt;br /&gt;
 &lt;br /&gt;
 // Execute pipeline&lt;br /&gt;
 // Languages don't matter&lt;br /&gt;
 proj.executePipeline();&lt;br /&gt;
 // Languages matter&lt;br /&gt;
 proj.executePipeline(&amp;quot;en-US&amp;quot;, &amp;quot;de-DE&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 // Get output files&lt;br /&gt;
 ArrayList&amp;lt;LonghornFile&amp;gt; outputFiles = proj.getOutputFiles();&lt;br /&gt;
 &lt;br /&gt;
 // Does the fetching of files work?&lt;br /&gt;
 for (LonghornFile of : outputFiles) {&lt;br /&gt;
 	InputStream is = of.openStream();&lt;br /&gt;
 	//TODO save InputStream to local file&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Delete project&lt;br /&gt;
 proj.delete();&lt;br /&gt;
&lt;br /&gt;
===HTML-Client===&lt;br /&gt;
&lt;br /&gt;
You can create projects and upload/download files via an integrated HTML client, too. Uploading input files (and downloading output files) as a zip archive is currently not implemented for the HTML client.&lt;br /&gt;
&lt;br /&gt;
[[File:longhorn_html_client.png]]&lt;br /&gt;
&lt;br /&gt;
===Configuration===&lt;br /&gt;
Since Okapi M22 Okapi Longhorn can be build to run multiple instances on one server.&lt;br /&gt;
You can adjust the build so that it is possible to run multiple Longhorn instances in one JBoss application server. Therefore, the build must be called with an additional parameter:&lt;br /&gt;
&lt;br /&gt;
 mvn clean verify -DuseUniqueContextRoot&lt;br /&gt;
&lt;br /&gt;
====Configure working directory path====&lt;br /&gt;
Longhorn has 2 options to configure the working directory of longhorn (sort by priority): &lt;br /&gt;
#system parameter &amp;quot;LONGHORN_WORKDIR&amp;quot;&lt;br /&gt;
#configuration file in user.home &amp;quot;/okapi-longhorn-configuration.xml&amp;quot;&lt;br /&gt;
If nothing is defined, the working-directory is in user.home in folder &amp;quot;Okapi-Longhorn-Files&amp;quot;.&lt;br /&gt;
Longhorn configuration file example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;longhorn-config&amp;gt;&lt;br /&gt;
     &amp;lt;use-unique-working-directory&amp;gt;True&amp;lt;/use-unique-working-directory&amp;gt;&lt;br /&gt;
     &amp;lt;working-directory&amp;gt;D:\testData\longhorn-files&amp;lt;/working-directory&amp;gt;&lt;br /&gt;
 &amp;lt;/longhorn-config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuration Options====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! option&lt;br /&gt;
! description&lt;br /&gt;
! data type&lt;br /&gt;
|-&lt;br /&gt;
| working-directory&lt;br /&gt;
| path of the working directory&lt;br /&gt;
| string&lt;br /&gt;
|-&lt;br /&gt;
| use-unique-working-directory&lt;br /&gt;
| if set to true the version of longhorn will be added to working directory name&lt;br /&gt;
e.g path/to/working/directory_M0.21&lt;br /&gt;
| boolean(True or False)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Longhorn]]&lt;/div&gt;</summary>
		<author><name>Kuro</name></author>
	</entry>
	<entry>
		<id>http://okapiframework.org/wiki/index.php?title=Longhorn&amp;diff=748</id>
		<title>Longhorn</title>
		<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php?title=Longhorn&amp;diff=748"/>
		<updated>2018-08-13T22:53:32Z</updated>

		<summary type="html">&lt;p&gt;Kuro: Adding curl examples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
Longhorn is a server application that allows you to execute Batch Configurations remotely on any set of input files. Batch Configurations which include pre-defined pipelines and filter configurations, can be exported from [[Rainbow]].&lt;br /&gt;
&lt;br /&gt;
The distribution also includes a client library to access the Longhorn Web services.&lt;br /&gt;
&lt;br /&gt;
==Download and Installation==&lt;br /&gt;
&lt;br /&gt;
* '''Stable release: http://bintray.com/okapi/Distribution/Longhorn&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Development release (snapshot): http://okapiframework.org/snapshots&amp;lt;/del&amp;gt;  Development snapshots are not currently available.&lt;br /&gt;
&lt;br /&gt;
To install Longhorn:&lt;br /&gt;
&lt;br /&gt;
* Unzip the distribution file on your server.&lt;br /&gt;
* Follow the instructions provided with the &amp;lt;code&amp;gt;readme&amp;lt;/code&amp;gt; file of the distribution.&lt;br /&gt;
* Starting with m24, Longhorn requires Java 1.7.&lt;br /&gt;
&lt;br /&gt;
==Functionality==&lt;br /&gt;
&lt;br /&gt;
To process files with Longhorn these steps are required:&lt;br /&gt;
# Create a temporary project&lt;br /&gt;
# Upload a Batch Configuration file into that project&lt;br /&gt;
# Upload the input files into that project&lt;br /&gt;
# Execute the project&lt;br /&gt;
# Download the output files&lt;br /&gt;
# Delete the project&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
There are three ways to access Longhorns functionality. There is&lt;br /&gt;
* a REST interface,&lt;br /&gt;
* a Java API and&lt;br /&gt;
* an HTML client.&lt;br /&gt;
&lt;br /&gt;
They can be used as described below.&lt;br /&gt;
&lt;br /&gt;
===REST-Interface===&lt;br /&gt;
&lt;br /&gt;
Longhorn can be accessed directly via HTTP methods:&lt;br /&gt;
;POST http://{host}/okapi-longhorn/projects/new : Creates a new temporary project and returns its URI (e.g. &amp;lt;code&amp;gt;http://localhost/okapi-longhorn/projects/1&amp;lt;/code&amp;gt;) in the &amp;lt;tt&amp;gt;Location&amp;lt;/tt&amp;gt; header of the response.&lt;br /&gt;
;POST http://{host}/okapi-longhorn/projects/1/batchConfiguration : Uploads a Batch Configuration file (must be given as multipart/form-data)&lt;br /&gt;
;POST http://{host}/okapi-longhorn/projects/1/inputFiles.zip : Adds input files as a zip archive (the zip will be extracted and the included files will be used as input files)&lt;br /&gt;
;PUT http://{host}/okapi-longhorn/projects/1/inputFiles/help.html : Uploads a file that will have the name 'help.html'&lt;br /&gt;
;GET http://{host}/okapi-longhorn/projects/1/inputFiles/help.html: Retrieve an input file that was previously added with PUT or POST&lt;br /&gt;
;POST http://{host}/okapi-longhorn/projects/1/tasks/execute : Executes the Batch Configuration on the uploaded input files&lt;br /&gt;
;POST http://{host}/okapi-longhorn/projects/1/tasks/execute/en-US/de-DE : Executes the Batch Configuration on the uploaded input files with the source language set to 'en-US' and the target language set to 'de-DE'&lt;br /&gt;
;POST http://{host}/okapi-longhorn/projects/1/tasks/execute/en-US?targets=de-DE&amp;amp;targets=fr-FR : Executes the Batch Configuration on the uploaded input files with the source language set to 'en-US' and multiple target languages, 'de-DE' and 'fr-FR'&lt;br /&gt;
;GET http://{host}/okapi-longhorn/projects/1/outputFiles : Returns a list of the output files generated&lt;br /&gt;
;GET http://{host}/okapi-longhorn/projects/1/outputFiles/help.out.html : Accesses the output file 'help.out.html' directly&lt;br /&gt;
;GET http://{host}/okapi-longhorn/projects/1/outputFiles.zip : Returns all output files in a zip archive&lt;br /&gt;
;DEL http://{host}/okapi-longhorn/projects/1 : Deletes the project&lt;br /&gt;
;GET http://{host}/okapi-longhorn/projects : Returns a list of all projects on the server&lt;br /&gt;
&lt;br /&gt;
===REST-Interface Sample code: Python===&lt;br /&gt;
&lt;br /&gt;
This example works with the requests package - minidom is used to parse the XML project list.&lt;br /&gt;
&lt;br /&gt;
    import requests&lt;br /&gt;
    from xml.dom import minidom&lt;br /&gt;
&lt;br /&gt;
    url = 'http://localhost:8080/okapi-longhorn/'&lt;br /&gt;
&lt;br /&gt;
Code to create a new project&lt;br /&gt;
&lt;br /&gt;
    r = requests.post(url+'projects/new')&lt;br /&gt;
    print r.text&lt;br /&gt;
&lt;br /&gt;
Code to '''list''' existing projects (i.e.: to check if the project was created, and to get the ID of the last project)&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(url+'projects/')&lt;br /&gt;
&lt;br /&gt;
    xmlstring = minidom.parseString(r.text)&lt;br /&gt;
    itemlist = xmlstring.getElementsByTagName('e')&lt;br /&gt;
    lastproject = len(itemlist)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code to '''post''' a '''batch config file'''&lt;br /&gt;
&lt;br /&gt;
    batchfile = open('/home/user/batchconfig.bconf', 'rb')&lt;br /&gt;
    r = requests.post(url+'projects/'+str(lastproject)+'/batchConfiguration', files=dict(batchConfiguration=batchfile))&lt;br /&gt;
&lt;br /&gt;
Code to '''put''' a string as a '''file'''&lt;br /&gt;
&lt;br /&gt;
    payload = &amp;quot;hello world!&amp;quot;&lt;br /&gt;
    r = requests.put(url+'projects/'+str(lastproject)+'/inputFiles/test.txt', files=dict(inputFile=payload))&lt;br /&gt;
&lt;br /&gt;
Code to '''post''' a '''file'''&lt;br /&gt;
&lt;br /&gt;
    payload = open('/home/user/test.txt', 'rb')&lt;br /&gt;
    r = requests.post(url+'projects/'+str(lastproject)+'/inputFiles/test.txt', files=dict(inputFile=payload))&lt;br /&gt;
&lt;br /&gt;
===REST-Interface access by curl===&lt;br /&gt;
Longhorn API can be accessed with the curl command, as shown below. Below, '-X GET' is not necessary but used there for clarity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X POST -i  'http://localhost:8080/okapi-longhorn/projects/new'&lt;br /&gt;
&lt;br /&gt;
This cretes a new project. The &amp;quot;Location:&amp;quot; header in the response&lt;br /&gt;
shows the URL for managing this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X POST -F batchConfiguration=@tmp/batchconfig.bconf 'http://localhost:8080/okapi-longhorn/projects/1/batchConfiguration'&lt;br /&gt;
&lt;br /&gt;
This submits the batch config file exported from Rainbow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X POST -F inputFile=@tmp/commonmark_original.md 'http://localhost:8080/okapi-longhorn/projects/1/inputFiles/commonmark.md'&lt;br /&gt;
&lt;br /&gt;
This sends a raw file to be extracted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X POST 'http://localhost:8080/okapi-longhorn/projects/1/tasks/execute'&lt;br /&gt;
&lt;br /&gt;
Longhorn executes the project after receiving this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X GET 'http://localhost:8080/okapi-longhorn/projects/1/outputFiles'&lt;br /&gt;
&lt;br /&gt;
Longhorn returns the list of output files. For example:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;l&amp;gt;&lt;br /&gt;
     &amp;lt;e&amp;gt;pack1/manifest.rkm&amp;lt;/e&amp;gt;&lt;br /&gt;
     &amp;lt;e&amp;gt;pack1/original/commonmark.md&amp;lt;/e&amp;gt;&lt;br /&gt;
     &amp;lt;e&amp;gt;pack1/work/commonmark.md.xlf&amp;lt;/e&amp;gt;&lt;br /&gt;
    &amp;lt;/l&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X GET 'http://localhost:8080/okapi-longhorn/projects/1/outputFiles/pack1/work/commonmark.md.xlf'&lt;br /&gt;
&lt;br /&gt;
You can obtain obtain one of the output files like this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X GET -o out.zip 'http://localhost:8080/okapi-longhorn/projects/1/outputFiles.zip'&lt;br /&gt;
&lt;br /&gt;
Or get all the output files in a zip file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $ curl -X DELETE 'http://localhost:8080/okapi-longhorn/projects/1'&lt;br /&gt;
&lt;br /&gt;
This ends the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Java API===&lt;br /&gt;
&lt;br /&gt;
The API is distributed as a &amp;lt;code&amp;gt;.jar&amp;lt;/code&amp;gt; file in the Longhorn distribution package. You can also build it from the Okapi source code via Maven from the project &amp;lt;code&amp;gt;lib-longhorn-api&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Maven====&lt;br /&gt;
The API is available as a maven dependency.  Add this repository to your &amp;lt;tt&amp;gt;pom.xml&amp;lt;/tt&amp;gt;:&lt;br /&gt;
    &amp;lt;repository&amp;gt;&lt;br /&gt;
        &amp;lt;id&amp;gt;okapi-longhorn-release&amp;lt;/id&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;Okapi Longhorn Release&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;url&amp;gt;http://repository-opentag.forge.cloudbees.com/release/&amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;/repository&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Along with this dependency, substituting in a valid version number (e.g, &amp;lt;tt&amp;gt;0.27&amp;lt;/tt&amp;gt;):&lt;br /&gt;
    &amp;lt;dependency&amp;gt;&lt;br /&gt;
      &amp;lt;groupId&amp;gt;net.sf.okapi.lib&amp;lt;/groupId&amp;gt;&lt;br /&gt;
      &amp;lt;artifactId&amp;gt;okapi-lib-longhorn-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
      &amp;lt;version&amp;gt;${okapi.version}&amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;/dependency&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Sample Code====&lt;br /&gt;
&lt;br /&gt;
 LonghornService ws = new RESTService(new URI(&amp;quot;http://localhost:9095/okapi-longhorn&amp;quot;));&lt;br /&gt;
 &lt;br /&gt;
 // Create project&lt;br /&gt;
 LonghornProject proj = ws.createProject();&lt;br /&gt;
 &lt;br /&gt;
 // Post batch configuration&lt;br /&gt;
 File bconfFile = new File(&amp;quot;C:\\setup.bconf&amp;quot;);&lt;br /&gt;
 proj.addBatchConfiguration(bconfFile);&lt;br /&gt;
 &lt;br /&gt;
 // Send input files&lt;br /&gt;
 &lt;br /&gt;
 // First by single upload...&lt;br /&gt;
 File file1 = new File(&amp;quot;C:\\help.html&amp;quot;);&lt;br /&gt;
 // * in the root directory&lt;br /&gt;
 proj.addInputFile(file1, file1.getName());&lt;br /&gt;
 // * and in a sub-directory&lt;br /&gt;
 proj.addInputFile(file1, &amp;quot;samefile/&amp;quot; + file1.getName());&lt;br /&gt;
 &lt;br /&gt;
 // ...then by package upload&lt;br /&gt;
 File inputPackage = new File(&amp;quot;C:\\more_files.zip&amp;quot;);&lt;br /&gt;
 proj.addInputFilesFromZip(inputPackage);&lt;br /&gt;
 &lt;br /&gt;
 // Execute pipeline&lt;br /&gt;
 // Languages don't matter&lt;br /&gt;
 proj.executePipeline();&lt;br /&gt;
 // Languages matter&lt;br /&gt;
 proj.executePipeline(&amp;quot;en-US&amp;quot;, &amp;quot;de-DE&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 // Get output files&lt;br /&gt;
 ArrayList&amp;lt;LonghornFile&amp;gt; outputFiles = proj.getOutputFiles();&lt;br /&gt;
 &lt;br /&gt;
 // Does the fetching of files work?&lt;br /&gt;
 for (LonghornFile of : outputFiles) {&lt;br /&gt;
 	InputStream is = of.openStream();&lt;br /&gt;
 	//TODO save InputStream to local file&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Delete project&lt;br /&gt;
 proj.delete();&lt;br /&gt;
&lt;br /&gt;
===HTML-Client===&lt;br /&gt;
&lt;br /&gt;
You can create projects and upload/download files via an integrated HTML client, too. Uploading input files (and downloading output files) as a zip archive is currently not implemented for the HTML client.&lt;br /&gt;
&lt;br /&gt;
[[File:longhorn_html_client.png]]&lt;br /&gt;
&lt;br /&gt;
===Configuration===&lt;br /&gt;
Since Okapi M22 Okapi Longhorn can be build to run multiple instances on one server.&lt;br /&gt;
You can adjust the build so that it is possible to run multiple Longhorn instances in one JBoss application server. Therefore, the build must be called with an additional parameter:&lt;br /&gt;
&lt;br /&gt;
 mvn clean verify -DuseUniqueContextRoot&lt;br /&gt;
&lt;br /&gt;
====Configure working directory path====&lt;br /&gt;
Longhorn has 2 options to configure the working directory of longhorn (sort by priority): &lt;br /&gt;
#system parameter &amp;quot;LONGHORN_WORKDIR&amp;quot;&lt;br /&gt;
#configuration file in user.home &amp;quot;/okapi-longhorn-configuration.xml&amp;quot;&lt;br /&gt;
If nothing is defined, the working-directory is in user.home in folder &amp;quot;Okapi-Longhorn-Files&amp;quot;.&lt;br /&gt;
Longhorn configuration file example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;longhorn-config&amp;gt;&lt;br /&gt;
     &amp;lt;use-unique-working-directory&amp;gt;True&amp;lt;/use-unique-working-directory&amp;gt;&lt;br /&gt;
     &amp;lt;working-directory&amp;gt;D:\testData\longhorn-files&amp;lt;/working-directory&amp;gt;&lt;br /&gt;
 &amp;lt;/longhorn-config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuration Options====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! option&lt;br /&gt;
! description&lt;br /&gt;
! data type&lt;br /&gt;
|-&lt;br /&gt;
| working-directory&lt;br /&gt;
| path of the working directory&lt;br /&gt;
| string&lt;br /&gt;
|-&lt;br /&gt;
| use-unique-working-directory&lt;br /&gt;
| if set to true the version of longhorn will be added to working directory name&lt;br /&gt;
e.g path/to/working/directory_M0.21&lt;br /&gt;
| boolean(True or False)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Longhorn]]&lt;/div&gt;</summary>
		<author><name>Kuro</name></author>
	</entry>
	<entry>
		<id>http://okapiframework.org/wiki/index.php?title=Markdown_Filter&amp;diff=739</id>
		<title>Markdown Filter</title>
		<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php?title=Markdown_Filter&amp;diff=739"/>
		<updated>2018-05-11T22:41:00Z</updated>

		<summary type="html">&lt;p&gt;Kuro: /* Processing Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Filters Header}}&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The Markdown Filter is an Okapi component for extracting translatable text from Markdown files. See https://en.wikipedia.org/wiki/Markdown for more information about the format.&lt;br /&gt;
Markdown is a family of formats, not all of them mutually compatible.  This filter is designed to work with markdown based on the [http://commonmark.org CommonMark] specification, with additional features to support [https://guides.github.com/features/mastering-markdown/ GitHub-flavored Markdown].&lt;br /&gt;
&lt;br /&gt;
==Processing Details==&lt;br /&gt;
&lt;br /&gt;
===Input Encoding===&lt;br /&gt;
&lt;br /&gt;
The filter decides which encoding to use for the input file using the following logic:&lt;br /&gt;
&lt;br /&gt;
If the file has a Unicode Byte-Order-Mark:&lt;br /&gt;
Then, the corresponding encoding (e.g. UTF-8, UTF-16, etc.) is used.&lt;br /&gt;
Otherwise, the input encoding used is the default encoding that was specified when setting the filter options.&lt;br /&gt;
&lt;br /&gt;
===HTML Elements===&lt;br /&gt;
The HTML Inline Elements, i.e. the tags, and the HTML Block, a chunk of text sandwiched between a block-forming start tag and its corresponding end tag, are processed by the HTML filter. The HTML filter to use can be customized separately.&lt;br /&gt;
&lt;br /&gt;
===Inline Codes===&lt;br /&gt;
The [[HTML_Filter#Inline_Code_Finder|Inline Code Finder]] is supported by this filter. &lt;br /&gt;
&lt;br /&gt;
The subfilter applies to the translatable text within the proper part of Markdown document. It does not apply to the HTML inline tags or HTML blocks. For that, you would need to enable and specify the inline code pattern for the HTML filter separately, name the configuration as okf_html@''arbitary-name''.fprm, and specify that name for the htmlSubfilter parameter.&lt;br /&gt;
&lt;br /&gt;
Note, the support of the Inline Code Finder was temporarily unavailable in some snapshot builds of version 0.36, but it has been restored.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
; Translate URLs (translateUrls)&lt;br /&gt;
: By default, URLs in link and image statements are not exposed for translation.  If this option is enabled, they will be extracted.  &amp;lt;i&amp;gt;Note&amp;lt;/i&amp;gt;: URLs are currently extracted inline in their containing segment, rather than as a subflow. Default: false&lt;br /&gt;
&lt;br /&gt;
; Translate Code Blocks (translateCodeBlocks)&lt;br /&gt;
: This option controls whether the contents of fenced code blocks are exposed for translation. Default: true&lt;br /&gt;
&lt;br /&gt;
; Translate YAML Metadata Header (translateImageAltText)&lt;br /&gt;
: Some markdown formats support a [http://pandoc.org/MANUAL.html#extension-yaml_metadata_block YAML Metadata Header] that contains key/value data. By default, this header is not exposed for translation. When the &amp;quot;Translate YAML Metadata Header&amp;quot; option is enabled, the header will be parsed and the metadata values will be exposed for translation. Default: false&lt;br /&gt;
&lt;br /&gt;
; Translate Image Alt Text (translateImageAltText)&lt;br /&gt;
: The alt text for a graphic image in the form of &amp;lt;nowiki&amp;gt;![alt text](https://foo.com/images/bar.jpg)&amp;lt;/nowiki&amp;gt; or as the alt attribute of an img tag &amp;lt;nowiki&amp;gt;&amp;lt;img src=&amp;quot;https://foo.com/images/bar.jpg&amp;quot; alt=&amp;quot;alt text&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt; will be extracted if this parameter is true. Default: true.&lt;br /&gt;
&lt;br /&gt;
; HTML Subfilter Configuration ID (htmlSubfilter)&lt;br /&gt;
: The custom configuration ID of the HTML filter that will be called to process HTML contents within Markdown documents. The configuration file must be saved in a known location with ''.fprm'' suffix. Specify nothing to use the default HTML filter configuration tailored for the Markdown filter. Default: (empty)&lt;br /&gt;
&lt;br /&gt;
; Use Code Finder (useCodeFinder)&lt;br /&gt;
: Determines whether to use the Inline Code Finder or not. Default: false&lt;br /&gt;
&lt;br /&gt;
; Number of Code Finder Rules (codeFinderRules.count)&lt;br /&gt;
: The number of rules, i.e. regular expression patterns. Default: 1&lt;br /&gt;
&lt;br /&gt;
; Code Finder Rule N (codeFinderRules.rule``N``) &lt;br /&gt;
: N'th matching pattern for codes. &lt;br /&gt;
&lt;br /&gt;
; Sample Text (codeFinderRules.sample)&lt;br /&gt;
: Sample text to test the rules on UI. &lt;br /&gt;
&lt;br /&gt;
; Use All Rules (codeFinderRules.useAllRulesWhenTesting)&lt;br /&gt;
: Determines whether to apply all rules when testing on UI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
=== Subflows are Not Supported ===&lt;br /&gt;
&lt;br /&gt;
When there is a subflow of text in the middle of the main text, the subflow will be inter-mixed with the main flow of text.  For example, for this run of Markdown text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Please click ![The Information desk logo](images/circled-i.jpg) for help.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The extracted text in the XLIFF file will look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Please click &amp;lt;x id=&amp;quot;1&amp;quot;/&amp;gt;The Information desk logo&amp;lt;x id=&amp;quot;2/&amp;gt; for help.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Filters]]&lt;/div&gt;</summary>
		<author><name>Kuro</name></author>
	</entry>
	<entry>
		<id>http://okapiframework.org/wiki/index.php?title=Markdown_Filter&amp;diff=738</id>
		<title>Markdown Filter</title>
		<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php?title=Markdown_Filter&amp;diff=738"/>
		<updated>2018-05-11T22:38:12Z</updated>

		<summary type="html">&lt;p&gt;Kuro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Filters Header}}&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The Markdown Filter is an Okapi component for extracting translatable text from Markdown files. See https://en.wikipedia.org/wiki/Markdown for more information about the format.&lt;br /&gt;
Markdown is a family of formats, not all of them mutually compatible.  This filter is designed to work with markdown based on the [http://commonmark.org CommonMark] specification, with additional features to support [https://guides.github.com/features/mastering-markdown/ GitHub-flavored Markdown].&lt;br /&gt;
&lt;br /&gt;
==Processing Details==&lt;br /&gt;
&lt;br /&gt;
===Input Encoding===&lt;br /&gt;
&lt;br /&gt;
The filter decides which encoding to use for the input file using the following logic:&lt;br /&gt;
&lt;br /&gt;
If the file has a Unicode Byte-Order-Mark:&lt;br /&gt;
Then, the corresponding encoding (e.g. UTF-8, UTF-16, etc.) is used.&lt;br /&gt;
Otherwise, the input encoding used is the default encoding that was specified when setting the filter options.&lt;br /&gt;
&lt;br /&gt;
===Inline Codes===&lt;br /&gt;
The [[HTML_Filter#Inline_Code_Finder|Inline Code Finder]] is supported by this filter. &lt;br /&gt;
&lt;br /&gt;
The subfilter applies to the translatable text within the proper part of Markdown document. It does not apply to the HTML inline tags or HTML blocks. For that, you would need to enable and specify the inline code pattern for the HTML filter separately, name the configuration as okf_html@''arbitary-name''.fprm, and specify that name for the htmlSubfilter parameter.&lt;br /&gt;
&lt;br /&gt;
Note, the support of the Inline Code Finder was temporarily unavailable in some snapshot builds of version 0.36, but it has been restored.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
; Translate URLs (translateUrls)&lt;br /&gt;
: By default, URLs in link and image statements are not exposed for translation.  If this option is enabled, they will be extracted.  &amp;lt;i&amp;gt;Note&amp;lt;/i&amp;gt;: URLs are currently extracted inline in their containing segment, rather than as a subflow. Default: false&lt;br /&gt;
&lt;br /&gt;
; Translate Code Blocks (translateCodeBlocks)&lt;br /&gt;
: This option controls whether the contents of fenced code blocks are exposed for translation. Default: true&lt;br /&gt;
&lt;br /&gt;
; Translate YAML Metadata Header (translateImageAltText)&lt;br /&gt;
: Some markdown formats support a [http://pandoc.org/MANUAL.html#extension-yaml_metadata_block YAML Metadata Header] that contains key/value data. By default, this header is not exposed for translation. When the &amp;quot;Translate YAML Metadata Header&amp;quot; option is enabled, the header will be parsed and the metadata values will be exposed for translation. Default: false&lt;br /&gt;
&lt;br /&gt;
; Translate Image Alt Text (translateImageAltText)&lt;br /&gt;
: The alt text for a graphic image in the form of &amp;lt;nowiki&amp;gt;![alt text](https://foo.com/images/bar.jpg)&amp;lt;/nowiki&amp;gt; or as the alt attribute of an img tag &amp;lt;nowiki&amp;gt;&amp;lt;img src=&amp;quot;https://foo.com/images/bar.jpg&amp;quot; alt=&amp;quot;alt text&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt; will be extracted if this parameter is true. Default: true.&lt;br /&gt;
&lt;br /&gt;
; HTML Subfilter Configuration ID (htmlSubfilter)&lt;br /&gt;
: The custom configuration ID of the HTML filter that will be called to process HTML contents within Markdown documents. The configuration file must be saved in a known location with ''.fprm'' suffix. Specify nothing to use the default HTML filter configuration tailored for the Markdown filter. Default: (empty)&lt;br /&gt;
&lt;br /&gt;
; Use Code Finder (useCodeFinder)&lt;br /&gt;
: Determines whether to use the Inline Code Finder or not. Default: false&lt;br /&gt;
&lt;br /&gt;
; Number of Code Finder Rules (codeFinderRules.count)&lt;br /&gt;
: The number of rules, i.e. regular expression patterns. Default: 1&lt;br /&gt;
&lt;br /&gt;
; Code Finder Rule N (codeFinderRules.rule``N``) &lt;br /&gt;
: N'th matching pattern for codes. &lt;br /&gt;
&lt;br /&gt;
; Sample Text (codeFinderRules.sample)&lt;br /&gt;
: Sample text to test the rules on UI. &lt;br /&gt;
&lt;br /&gt;
; Use All Rules (codeFinderRules.useAllRulesWhenTesting)&lt;br /&gt;
: Determines whether to apply all rules when testing on UI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
=== Subflows are Not Supported ===&lt;br /&gt;
&lt;br /&gt;
When there is a subflow of text in the middle of the main text, the subflow will be inter-mixed with the main flow of text.  For example, for this run of Markdown text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Please click ![The Information desk logo](images/circled-i.jpg) for help.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The extracted text in the XLIFF file will look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Please click &amp;lt;x id=&amp;quot;1&amp;quot;/&amp;gt;The Information desk logo&amp;lt;x id=&amp;quot;2/&amp;gt; for help.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Filters]]&lt;/div&gt;</summary>
		<author><name>Kuro</name></author>
	</entry>
	<entry>
		<id>http://okapiframework.org/wiki/index.php?title=FAQ&amp;diff=737</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php?title=FAQ&amp;diff=737"/>
		<updated>2018-05-11T21:48:03Z</updated>

		<summary type="html">&lt;p&gt;Kuro: Fixing Yahoo! group URL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Capabilities==&lt;br /&gt;
&lt;br /&gt;
====What formats are supported?====&lt;br /&gt;
&lt;br /&gt;
The framework offers filters for many file formats, including XML, XLIFF, TMX, HTML, DOCX, ODT, Properties, PO, and many more.&amp;lt;br&amp;gt;&lt;br /&gt;
For a more complete list of the supported formats, see the &amp;quot;[[Filters]]&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
Note that you can also create your own filter configurations to support some formats. You can also create your own filters and use them seamlessly with the Okapi tools.&lt;br /&gt;
&lt;br /&gt;
====How do I extract text for translation?====&lt;br /&gt;
&lt;br /&gt;
See the article &amp;quot;[[How to Extract Text for Translation]]&amp;quot; in the [[Knowledge Base]].&lt;br /&gt;
&lt;br /&gt;
====Does Okapi provide a translation editor?====&lt;br /&gt;
&lt;br /&gt;
Not at this time. The Okapi tools allow you to create translation packages in various formats that can be opened in different translation editors such as OmegaT, MemoQ, Trados Workbench, Swordfish, Wordfast, etc.&lt;br /&gt;
&lt;br /&gt;
For translating XLIFF files see: &amp;quot;[[How to Translate XLIFF Documents]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Does Okapi provide a TM (Translation Memory)?====&lt;br /&gt;
&lt;br /&gt;
Yes. There are currently two TM engines implemented in the framework:&lt;br /&gt;
&lt;br /&gt;
* [[Pensieve TM]] is the main TM engine.&lt;br /&gt;
* [[SimpleTM TM]] is a limited and older engine that '''is being progressively phased out'''.&lt;br /&gt;
&lt;br /&gt;
You can also use third-part TM engines through the the different [[Connectors|connectors]] that the framework provides. For example: the [[Translate Toolkit TM Connector|Translate Toolkit TM]], [[GlobalSight TM Connector|GlobalSight TM]], the [[OpenTran Translation Repository Connector|OpenTran Translation Repository]], [[MyMemory TM Connector|MyMemory]], etc. For a complete list and more details see the &amp;quot;[[Connectors]]&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
====Does Okapi provide a MT (Machine Translation) system?====&lt;br /&gt;
&lt;br /&gt;
Not at this time. But you can use different third-party MT system using one of the connectors distributed with the framework. For example you can work with [[Google MT v2 Connector|Google MT]], [[Apertium MT Connector|Apertium MT]], [[Microsoft Translator Connector|Microsoft Translator]], etc. For a complete list, see the [[Connectors|Connectors page]].&lt;br /&gt;
&lt;br /&gt;
====Why is there several distributions, isn't Java cross-platform?====&lt;br /&gt;
&lt;br /&gt;
Yes, Java is cross-platform, and most of the Okapi code runs anywhere Java runs.&lt;br /&gt;
However, for a better internationalization support and a more seamless integration with each platform, we have selected to use Eclipse SWT (http://www.eclipse.org/swt) as the foundation for the UI of our applications. That library requires a different distribution for each platform and architecture.&lt;br /&gt;
&lt;br /&gt;
Okapi's source code has been carefully designed to separate UI-dependant code and non-UI code, so most of the components (such as the [[Filters]], the [[Steps]] and the [[Connectors]]) can be used on any platform.&lt;br /&gt;
&lt;br /&gt;
====Can I change the Java VM settings when running the tools?====&lt;br /&gt;
&lt;br /&gt;
Yes. See [[How to Change the Java Parameters for Rainbow]]. You can follow the same steps for all Okapi tools.&lt;br /&gt;
&lt;br /&gt;
==Simple Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
====Is there a Getting Started guide?====&lt;br /&gt;
&lt;br /&gt;
Yes. See the &amp;quot;[[Getting Started]]&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
====When I try to start Rainbow/Ratel/CheckMate nothing happens. What is wrong?====&lt;br /&gt;
&lt;br /&gt;
* Check that you have the proper version of Java (1.7 or above).&lt;br /&gt;
* Make sure you have installed the correct distribution for your platform.&lt;br /&gt;
* If your machine is 32-bit make sure to have installed the 32-bit distribution.&lt;br /&gt;
* If your machine is 64-bit make sure to have installed the 64-bit distribution.&lt;br /&gt;
&lt;br /&gt;
==Licenses==&lt;br /&gt;
&lt;br /&gt;
====Under what licence the Okapi Framework is developed?====&lt;br /&gt;
&lt;br /&gt;
* The source code is under [https://www.apache.org/licenses/LICENSE-2.0 Apache Licence version 2.0].&lt;br /&gt;
* The documentation is under [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-ShareAlike License (CC-BY-SA)].&lt;br /&gt;
&lt;br /&gt;
====Can I use Okapi's components in my applications?====&lt;br /&gt;
&lt;br /&gt;
Yes. The project uses the Apache license which allows open-source or commercial products to use our applications and components. See more information the license at [https://www.apache.org/licenses/LICENSE-2.0].&lt;br /&gt;
&lt;br /&gt;
==Support==&lt;br /&gt;
&lt;br /&gt;
====Is there a users group or a support mailing list?====&lt;br /&gt;
&lt;br /&gt;
Yes. There are two main mailing lists. Both have public archives, and both require registration to post a message:&lt;br /&gt;
&lt;br /&gt;
* [http://groups.yahoo.com/group/okapitools/ https://groups.yahoo.com/group/okapitools/] is the group and mailing list '''for the end users'''.&lt;br /&gt;
* [http://groups.google.com/group/okapi-devel https://groups.google.com/group/okapi-devel] is the group and mailing list '''for the developers''' working on the source code.&lt;br /&gt;
&lt;br /&gt;
====How do I report bugs or request enhancement?====&lt;br /&gt;
&lt;br /&gt;
* You can post a bug report or an enhancement request in the issues tracking page: http://code.google.com/p/okapi/issues/entry if you have a Google account.&lt;br /&gt;
&lt;br /&gt;
* You can post a message to the [http://groups.yahoo.com/group/okapitools/ Okapi Tools users group] if you are part of the group.&lt;br /&gt;
&lt;br /&gt;
* You can just [mailto:okapitools@opentag.com&amp;amp;subject=Feedback send feedback by email].&lt;br /&gt;
&lt;br /&gt;
==Miscellaneous==&lt;br /&gt;
&lt;br /&gt;
====What does 'Okapi' mean?====&lt;br /&gt;
&lt;br /&gt;
An okapi is an African animal looking somewhat like [http://en.wikipedia.org/wiki/Okapi a cross between a zebra and a giraffe]. Okapi is pronounced [http://en.wikipedia.org/wiki/Wikipedia:IPA_for_English /oʊˈkɑːpɪ/] ([http://www.m-w.com/cgi-bin/audio.pl?okapi001.wav=okapi hear it])&lt;br /&gt;
&lt;br /&gt;
The usage of this name for the framework has its roots to much older projects. At some point it was an acronym for &amp;quot;Open Kit API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====What happened to the .NET Okapi?====&lt;br /&gt;
&lt;br /&gt;
The older version of the Okapi Framework for .NET is no longer developed. Its distribution and source code is still available here: http://sourceforge.net/projects/okapi/. All new development is now done in the Java branch.&lt;br /&gt;
&lt;br /&gt;
====Where is Olifant?====&lt;br /&gt;
&lt;br /&gt;
Olifant, the TMX editor, is currently only part of the .NET Okapi. It is still available [http://sourceforge.net/projects/okapi/files/ from the SourceForge project]. Note that Olifant is for Windows only.&lt;br /&gt;
&lt;br /&gt;
==For developers==&lt;br /&gt;
&lt;br /&gt;
====Getting set up====&lt;br /&gt;
&lt;br /&gt;
* Check out the source code from Bitbucket using git clone: https://bitbucket.org/okapiframework/okapi&lt;br /&gt;
* Or, if you want to submit pull requests, first create a fork of the Okapi project. &lt;br /&gt;
* Import into your IDE. For example, in Eclipse go to File &amp;gt; Import &amp;gt; Maven &amp;gt; Existing Maven project. &lt;br /&gt;
If you want to keep several distinct Okapi repositories in the same Eclipse workspace (for instance, your fork and the main Okapi project), you need to assign a name template under the &amp;quot;Advanced&amp;quot; section in the first step of the import wizard. &lt;br /&gt;
* The &amp;quot;master&amp;quot; branch contains the latest release version. The &amp;quot;dev&amp;quot; branch contains the current work (the &amp;quot;snapshot&amp;quot; in Maven terms). &lt;br /&gt;
* See also: https://bitbucket.org/okapiframework/okapi/wiki/How%20to%20Contribute&lt;br /&gt;
Happy coding!&lt;br /&gt;
&lt;br /&gt;
====How to build okapi-lib locally====&lt;br /&gt;
&lt;br /&gt;
The Okapi Framework consists of Maven projects. However, in order to build the apps and lib projects locally, you need to use the Ant build configurations. &lt;br /&gt;
&lt;br /&gt;
For instance, to create a local version of okapi-lib.jar, go to &amp;lt;OKAPI_HOME&amp;gt;/deployment/maven/ and run ant -f build_okapi-lib.xml init okapiLib. The jar will be generated in &amp;lt;OKAPI_HOME&amp;gt;/deployment/maven/dist_common/lib/. &lt;br /&gt;
&lt;br /&gt;
If you use the default build.xml by running above command without the -f option, platform-specific distributions of the apps will be created plus the platform-indipendent okapi-lib.jar.&lt;/div&gt;</summary>
		<author><name>Kuro</name></author>
	</entry>
	<entry>
		<id>http://okapiframework.org/wiki/index.php?title=Markdown_Filter&amp;diff=724</id>
		<title>Markdown Filter</title>
		<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php?title=Markdown_Filter&amp;diff=724"/>
		<updated>2018-03-29T03:23:31Z</updated>

		<summary type="html">&lt;p&gt;Kuro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Filters Header}}&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The Markdown Filter is an Okapi component for extracting translatable text from Markdown files. See https://en.wikipedia.org/wiki/Markdown for more information about the format.&lt;br /&gt;
Markdown is a family of formats, not all of them mutually compatible.  This filter is designed to work with markdown based on the [http://commonmark.org CommonMark] specification, with additional features to support [https://guides.github.com/features/mastering-markdown/ GitHub-flavored Markdown].&lt;br /&gt;
&lt;br /&gt;
==Processing Details==&lt;br /&gt;
&lt;br /&gt;
===Input Encoding===&lt;br /&gt;
&lt;br /&gt;
The filter decides which encoding to use for the input file using the following logic:&lt;br /&gt;
&lt;br /&gt;
If the file has a Unicode Byte-Order-Mark:&lt;br /&gt;
Then, the corresponding encoding (e.g. UTF-8, UTF-16, etc.) is used.&lt;br /&gt;
Otherwise, the input encoding used is the default encoding that was specified when setting the filter options.&lt;br /&gt;
&lt;br /&gt;
===Inline Codes===&lt;br /&gt;
&lt;br /&gt;
The Markdown filter of Okapi Framework version 0.36 and later no longer supports the [[HTML_Filter#Inline_Code_Finder|Inline Code Finder]] because it now uses the HTML filter as its subfilter, which is known to be incompatible with the Inline Code Finder.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
; Translate URLs (translateUrls)&lt;br /&gt;
: By default, URLs in link and image statements are not exposed for translation.  If this option is enabled, they will be extracted.  &amp;lt;i&amp;gt;Note&amp;lt;/i&amp;gt;: URLs are currently extracted inline in their containing segment, rather than as a subflow. Default: false&lt;br /&gt;
&lt;br /&gt;
; Translate Code Blocks (translateCodeBlocks)&lt;br /&gt;
: This option, enabled by default, controls whether the contents of fenced code blocks are exposed for translation. Default: true&lt;br /&gt;
&lt;br /&gt;
; Translate YAML Metadata Header (translateImageAltText)&lt;br /&gt;
: Some markdown formats support a [http://pandoc.org/MANUAL.html#extension-yaml_metadata_block YAML Metadata Header] that contains key/value data. By default, this header is not exposed for translation. When the &amp;quot;Translate YAML Metadata Header&amp;quot; option is enabled, the header will be parsed and the metadata values will be exposed for translation. Default: false&lt;br /&gt;
&lt;br /&gt;
; Translate Image Alt Text (translateImageAltText)&lt;br /&gt;
: The alt text for a graphic image in the form of &amp;lt;nowiki&amp;gt;![alt text](https://foo.com/images/bar.jpg)&amp;lt;/nowiki&amp;gt; or as the alt attribute of an img tag &amp;lt;nowiki&amp;gt;&amp;lt;img src=&amp;quot;https://foo.com/images/bar.jpg&amp;quot; alt=&amp;quot;alt text&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt; will be extracted if this parameter is true. Default: true.&lt;br /&gt;
&lt;br /&gt;
; HTML Subfilter Configuration ID (htmlSubfilter)&lt;br /&gt;
: The custom configuration ID of the HTML filter that will be called to process HTML contents within Markdown documents. The configuration file must be saved in a known location with ''.fprm'' suffix. Specify nothing to use the default HTML filter configuration tailored for the Markdown filter. Default: (empty)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
* None known&lt;br /&gt;
&lt;br /&gt;
[[Category:Filters]]&lt;/div&gt;</summary>
		<author><name>Kuro</name></author>
	</entry>
	<entry>
		<id>http://okapiframework.org/wiki/index.php?title=Markdown_Filter&amp;diff=723</id>
		<title>Markdown Filter</title>
		<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php?title=Markdown_Filter&amp;diff=723"/>
		<updated>2018-03-29T00:10:45Z</updated>

		<summary type="html">&lt;p&gt;Kuro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Filters Header}}&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The Markdown Filter is an Okapi component for extracting translatable text from Markdown files. See https://en.wikipedia.org/wiki/Markdown for more information about the format.&lt;br /&gt;
Markdown is a family of formats, not all of them mutually compatible.  This filter is designed to work with markdown based on the [http://commonmark.org CommonMark] specification, with additional features to support [https://guides.github.com/features/mastering-markdown/ GitHub-flavored Markdown].&lt;br /&gt;
&lt;br /&gt;
==Processing Details==&lt;br /&gt;
&lt;br /&gt;
===Input Encoding===&lt;br /&gt;
&lt;br /&gt;
The filter decides which encoding to use for the input file using the following logic:&lt;br /&gt;
&lt;br /&gt;
If the file has a Unicode Byte-Order-Mark:&lt;br /&gt;
Then, the corresponding encoding (e.g. UTF-8, UTF-16, etc.) is used.&lt;br /&gt;
Otherwise, the input encoding used is the default encoding that was specified when setting the filter options.&lt;br /&gt;
&lt;br /&gt;
===Inline Codes===&lt;br /&gt;
&lt;br /&gt;
The Markdown filter of Okapi Framework version 0.36 and later no longer support the [[HTML_Filter#Inline_Code_Finder|Inline Code Finder]] because it now uses the HTML filter as its subfilter, which is known to be incompatible with the Inline Code Finder.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
; Translate URLs (translateUrls)&lt;br /&gt;
: By default, URLs in link and image statements are not exposed for translation.  If this option is enabled, they will be extracted.  &amp;lt;i&amp;gt;Note&amp;lt;/i&amp;gt;: URLs are currently extracted inline in their containing segment, rather than as a subflow. Default: false&lt;br /&gt;
&lt;br /&gt;
; Translate Code Blocks (translateCodeBlocks)&lt;br /&gt;
: This option, enabled by default, controls whether the contents of fenced code blocks are exposed for translation. Default: true&lt;br /&gt;
&lt;br /&gt;
; Translate YAML Metadata Header (translateImageAltText)&lt;br /&gt;
: Some markdown formats support a [http://pandoc.org/MANUAL.html#extension-yaml_metadata_block YAML Metadata Header] that contains key/value data. By default, this header is not exposed for translation. When the &amp;quot;Translate YAML Metadata Header&amp;quot; option is enabled, the header will be parsed and the metadata values will be exposed for translation. Default: false&lt;br /&gt;
&lt;br /&gt;
; Translate Image Alt Text (translateImageAltText)&lt;br /&gt;
: The alt text for a graphic image in the form of &amp;lt;nowiki&amp;gt;![alt text](https://foo.com/images/bar.jpg)&amp;lt;/nowiki&amp;gt; or as the alt attribute of an img tag &amp;lt;nowiki&amp;gt;&amp;lt;img src=&amp;quot;https://foo.com/images/bar.jpg&amp;quot; alt=&amp;quot;alt text&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt; will be extracted if this parameter is true. Default: true.&lt;br /&gt;
&lt;br /&gt;
; HTML Subfilter Configuration ID (htmlSubfilter)&lt;br /&gt;
: The custom configuration ID of the HTML filter that will be called to process HTML contents within Markdown documents. The configuration file must be saved in a known location with ''.fprm'' suffix. Specify nothing to use the default HTML filter configuration tailored for the Markdown filter. Default: (empty)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
* None known&lt;br /&gt;
&lt;br /&gt;
[[Category:Filters]]&lt;/div&gt;</summary>
		<author><name>Kuro</name></author>
	</entry>
	<entry>
		<id>http://okapiframework.org/wiki/index.php?title=Markdown_Filter&amp;diff=722</id>
		<title>Markdown Filter</title>
		<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php?title=Markdown_Filter&amp;diff=722"/>
		<updated>2018-03-29T00:07:07Z</updated>

		<summary type="html">&lt;p&gt;Kuro: Added description of translateImageAltText and htmlSubfilter. Clarified the default values.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Filters Header}}&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The Markdown Filter is an Okapi component for extracting translatable text from Markdown files. See https://en.wikipedia.org/wiki/Markdown for more information about the format.&lt;br /&gt;
Markdown is a family of formats, not all of them mutually compatible.  This filter is designed to work with markdown based on the [http://commonmark.org CommonMark] specification, with additional features to support [https://guides.github.com/features/mastering-markdown/ GitHub-flavored Markdown].&lt;br /&gt;
&lt;br /&gt;
==Processing Details==&lt;br /&gt;
&lt;br /&gt;
===Input Encoding===&lt;br /&gt;
&lt;br /&gt;
The filter decides which encoding to use for the input file using the following logic:&lt;br /&gt;
&lt;br /&gt;
If the file has a Unicode Byte-Order-Mark:&lt;br /&gt;
Then, the corresponding encoding (e.g. UTF-8, UTF-16, etc.) is used.&lt;br /&gt;
Otherwise, the input encoding used is the default encoding that was specified when setting the filter options.&lt;br /&gt;
&lt;br /&gt;
===Inline Codes===&lt;br /&gt;
&lt;br /&gt;
The Markdown filter of Okapi Framework version 0.36 and later no longer support the [[HTML_Filter#Inline_Code_Finder|Inline Code Finder]] because it now uses the HTML filter as its subfilter, which is known to be incompatible with the Inline Code Finder.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
; Translate URLs (translateUrls)&lt;br /&gt;
: By default, URLs in link and image statements are not exposed for translation.  If this option is enabled, they will be extracted.  &amp;lt;i&amp;gt;Note&amp;lt;/i&amp;gt;: URLs are currently extracted inline in their containing segment, rather than as a subflow. Default: false&lt;br /&gt;
&lt;br /&gt;
; Translate Code Blocks (translateCodeBlocks)&lt;br /&gt;
: This option, enabled by default, controls whether the contents of fenced code blocks are exposed for translation. Default: true&lt;br /&gt;
&lt;br /&gt;
; Translate YAML Metadata Header (translateImageAltText)&lt;br /&gt;
: Some markdown formats support a [http://pandoc.org/MANUAL.html#extension-yaml_metadata_block YAML Metadata Header] that contains key/value data. By default, this header is not exposed for translation. When the &amp;quot;Translate YAML Metadata Header&amp;quot; option is enabled, the header will be parsed and the metadata values will be exposed for translation. Default: false&lt;br /&gt;
&lt;br /&gt;
; Translate Image Alt Text (translateImageAltText)&lt;br /&gt;
: The alt text for a graphic image in the form of `![alt text](https://foo.com/images/bar.jpg)` or as the alt attribute of an img tag `&amp;lt;img src=&amp;quot;https://foo.com/images/bar.jpg&amp;quot; alt=&amp;quot;alt text&amp;quot;&amp;gt;` will be extracted if this parameter is true. Default: true.&lt;br /&gt;
&lt;br /&gt;
; HTML Subfilter Configuration ID (htmlSubfilter)&lt;br /&gt;
: The custom configuration ID of the HTML filter that will be called to process HTML contents within Markdown documents. The configuration file must be saved in a known location with `.fprm` suffix. Specify nothing to use the default HTML filter configuration tailored for the Markdown filter. Default: (empty)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
* None known&lt;br /&gt;
&lt;br /&gt;
[[Category:Filters]]&lt;/div&gt;</summary>
		<author><name>Kuro</name></author>
	</entry>
</feed>