/usr/share/bibledit-gtk/site/gtk/reference/menu/menu-preferences/filters.html is in bibledit-gtk-data 4.9-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 139 140 141 142 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../../../../bibledit.css" rel="stylesheet" type="text/css" /><!--
Copyright (©) 2003-2011 Teus Benschop and Contributors to the Wiki.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled "GNU
Free Documentation License" in the file FDL.
-->
<title></title>
</head>
<body>
<div id="menu">
<ul>
<li>
<a href="../../../../home.html">1 Bibledit</a>
</li>
<li>
<a href="../menu-preferences.html">Menu-preferences</a>
</li>
<li style="list-style: none; display: inline">
<hr />
</li>
<li>Filters
<ul>
<li>
<a href="filters/tec.html">TECkit</a>
</li>
<li>
<a href="filters/regex.html">regex</a>
</li>
<li>
<a href="filters/sed.html">sed</a>
</li>
</ul>
</li>
<li>
<a href="planning-setup.html">Planning</a>
</li>
<li>
<a href="project-notes.html">Project notes</a>
</li>
<li>
<a href="dialog-remote-repository.html">Remote Repository</a>
</li>
<li>
<a href="text-replacement.html">Text replacement</a>
</li>
<li>
<a href="tidy-text.html">Tidy Text</a>
</li>
<li>
<a href="user-interface.html">User interface</a>
</li>
<li>
<a href="windows-outpost.html">Windows Outpost</a>
</li>
</ul>
</div>
<div id="content">
<h1>
Filters
</h1>
<p>
The dialog is accessible through menu Preferences / Filters.
</p>
<h3>
<a name="general" href="" id="general"></a>General
</h3>
<p>
It creates, edits and deletes filters.
</p>
<p>
Creating a new filter is simple. Just press button "New", type a name for the filter, choose the type of the filter, and press OK.
</p>
<p>
Deleting an existing filter is simple too. Select the filter, then press "Delete".
</p>
<p>
Editing a filter is another simple matter. Select the filter, and type the rules in the Rules window. More about the rules later on.
</p>
<p>
A filter can be tried out. Press the "Try" button to do that. The text at the left of the button is passed through the filter, and then becomes visible at the right side. Any errors show up there too. The text at the left of the button can be changed to anything.
</p>
<h3>
<a name="rules" href="" id="rules"></a>Rules
</h3>
<p>
Depending on the type of the filter, there are various programs that run the rules.
</p>
<h4>
<a name="sedrules" href="" id="sedrules"></a>Sed rules
</h4>
<p>
The program "sed" is used for operating the filter. Sed is a Stream EDitor. It takes the input text, passes it through one or more rules, and then outputs it, modifying it on the fly. The modifications are done according to the rules that have been given.
</p>
<p>
More help about creating rules is in the <a href="https://sites.google.com/site/bibledit/gtk/reference/menu/menu-preferences/filters/sed">sed rules</a> reference, and in the <a href="https://sites.google.com/site/bibledit/gtk/reference/menu/menu-preferences/filters/regex">regular expressions</a> reference. A wealth of information about sed, and the rules to write, is available at <a href="http://sed.sourceforge.net/" rel="nofollow">sed.sourceforge.net</a>.
</p>
<h4>
<a name="teckitmapping" href="" id="teckitmapping"></a>TECkit mapping
</h4>
<p>
The TECkit package is used for running the filter. TECkit is a toolkit for conversion of data to Unicode. Bibledit uses it only for converting Unicode to Unicode. The package takes the input text, passes it through a set of mapping rules, and then outputs it, modifying it on the fly.
</p>
<p>
More help about creating the mapping rules is in the <a href="https://sites.google.com/site/bibledit/gtk/reference/menu/menu-preferences/filters/tec">TECkit mapping rules</a> reference. More information is available from SIL through the <a href="http://www.sil.org/computing/index.html" rel="nofollow">computing index</a>, or more specifically at the <a href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&cat_id=TECkit" rel="nofollow">TECkit home page</a>.
</p>
<h4>
<a name="freescript" href="" id="freescript"></a>Free script
</h4>
<p>
A free script is used for running the filter. A free script means any script that you can give and that will run in the shell. Here is an example of a very basic script, one that really doesn't filter at all, it only shows how to write a script:
</p>
<pre>
cat inputfile > outputfile
</pre>
<p>
Bibledit searches for a text "inputfile", and replaces that with the input data. It also searches for text "outputfile", and replaces that with the output data. The script then is passed to the shell, and runs there. The output data is then read again and used.
</p>
<p>
The above script just takes the input file and copies that to the output file.
</p>
<p>
Any custom script that you made will do here, in any language. The only thing that is important is that the texts "inputfile" and "outputfile" are there. And of course that the script does something sensible.
</p>
<h3>
<a name="notes" href="" id="notes"></a>Notes
</h3>
<p>
While the USFM text is ran through the filter, an attempt is made that the USFM codes themselves will not be changed. To protect these codes from being changed, the codes are temporally changed into numbers. The assumption here is that the user will not write filters that change numbers. After filtering the numbers are changed back to the original USFM codes again. This process is transparent to the user, that is, the user does not notice that it happens. This process will work well only if the filters don't change the numbers.
</p>
</div>
</body>
</html>
|