~ubuntu-branches/ubuntu/maverick/zapping/maverick

« back to all changes in this revision

Viewing changes to help/C/zapzilla.xml

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-03-08 23:19:08 UTC
  • mfrom: (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050308231908-oip7rfv6lcmo8c0e
Tags: 0.9.2-2ubuntu1
Rebuilt for Python transition (2.3 -> 2.4)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
  <sect1 id="zapzilla">
 
2
    <title>Teletext</title>
 
3
 
 
4
    <para>Zapping has a built-in Teletext viewer called Zapzilla.</para>
 
5
 
 
6
    <figure id="zapzilla-figure"> 
 
7
      <title>Zapzilla</title> 
 
8
      <screenshot>
 
9
        <mediaobject> 
 
10
          <imageobject>
 
11
            <imagedata fileref="figures/zapzilla.png" format="PNG"/> 
 
12
          </imageobject>
 
13
          <textobject>
 
14
            <phrase>Zapzilla window. Contains titlebar, menubar, toolbar, display area showing a Teletext page, and statusbar. The menubar contains File, Edit, View, Go, Channels and Bookmarks menus.</phrase>
 
15
          </textobject>
 
16
        </mediaobject>
 
17
      </screenshot>
 
18
    </figure>
 
19
 
 
20
    <para>The Zapzilla window contains a menu, toolbar and a context menu which opens when you click on the page with the right mouse button.</para>
 
21
 
 
22
    <figure id="zapzilla-context-figure"> 
 
23
      <title>Zapzilla Context Menu</title>
 
24
      <screenshot>
 
25
        <mediaobject>
 
26
          <imageobject>
 
27
            <imagedata fileref="figures/zapzilla-context.png" format="PNG"/>
 
28
          </imageobject>
 
29
          <textobject>
 
30
            <phrase>Context menu with New window, Save as, Search, Colors, Subtitles, and Bookmarks entries.</phrase>
 
31
          </textobject>
 
32
        </mediaobject>
 
33
      </screenshot>
 
34
    </figure>
 
35
 
 
36
    <sect2 id="zapzilla-navigation-embed">
 
37
      <title>To Start Teletext</title>
 
38
 
 
39
      <para>You can browse Teletext in the main video window or open new Teletext windows. To do the former, choose <menuchoice>
 
40
          <guimenu>View</guimenu>
 
41
          <guisubmenu>Teletext</guisubmenu>
 
42
        </menuchoice> from the main menu, <menuchoice>
 
43
          <guimenu>Teletext</guimenu>
 
44
        </menuchoice> from the context menu, or click on the <guilabel>Teletext</guilabel> button in the toolbar.</para>
 
45
      <para>Only a subset of the Teletext toolbar buttons and context menu items appears in this mode, along with video related items. It is not yet possible to browse Teletext in fullscreen mode.</para>
 
46
      <para>To leave the Teletext mode, choose one of the video display modes (fullscreen, capture or overlay mode) or click on the <guilabel>Video</guilabel> button in the toolbar.</para>
 
47
    </sect2>
 
48
 
 
49
    <sect2 id="zapzilla-navigation-new-window">
 
50
      <title>To Open a New Teletext Window</title>
 
51
 
 
52
      <para>In the video window, choose <menuchoice>
 
53
          <guimenu>View</guimenu>
 
54
          <guisubmenu>New Teletext View</guisubmenu>
 
55
        </menuchoice> from the main menu.</para>
 
56
      <para>In a Teletext window, choose <menuchoice>
 
57
          <guimenu>File</guimenu>
 
58
          <guisubmenu>New Window</guisubmenu>
 
59
        </menuchoice> from the main menu, <menuchoice>
 
60
          <guimenu>New Window</guimenu>
 
61
        </menuchoice> from the context menu, or click on the <guilabel>New</guilabel> button in the toolbar.</para>
 
62
    </sect2>
 
63
    
 
64
    <sect2 id="zapzilla-navigation-open-page">
 
65
      <title>To Open a Teletext Page</title>
 
66
      
 
67
      <para>Type the page number on the keyboard. You can also press the cursor keys or click on the small arrow buttons in the toolbar to go to the next or previous page or subpage.</para>
 
68
      <para>You can click on a page number in the page. With the first (left) mouse button the page opens in the same window, with the third (middle) button in a new window. When the page has subpages it often contains a subpage number like 2/5 (meaning this is subpage 2 of 5). As with page numbers you can click on this number to go to the next subpage. Two right angle brackets &gt;%gt; on a page also link to the next subpage.</para>
 
69
      <para>If Zapzilla can identify web links or e-mail addresses you can click on them to open your web browser or e-mail application.</para>
 
70
    </sect2>
 
71
 
 
72
    <sect2 id="zapzilla-navigation-rotating-subpages">
 
73
      <title>Rotating Subpages</title>
 
74
      
 
75
      <para>When you open a page it will automatically rotate through its subpages, if it has any. This can be disabled by clicking on the page number in the toolbar.</para>
 
76
    </sect2>
 
77
 
 
78
    <sect2 id="zapzilla-navigation-top-flof">
 
79
      <title>Links in the last row</title>
 
80
      
 
81
      <para>Some TV stations provide a basic navigation system called TOP or FLOF. Here the last row of the page shows links to important pages or sections. You can click on these links to browse the Teletext. A complete TOP index is available under the <menuchoice>
 
82
          <guimenu>Go</guimenu>
 
83
        </menuchoice> menu.</para>
 
84
    </sect2>
 
85
 
 
86
    <sect2 id="zapzilla-navigation-bookmarks">
 
87
      <title>Bookmarks</title>
 
88
 
 
89
      <para>When you choose <menuchoice>
 
90
          <guimenu>Bookmarks</guimenu>
 
91
          <guisubmenu>Add Bookmark</guisubmenu>
 
92
        </menuchoice> from the main or context menu the current page will be added to the <guimenu>Bookmarks</guimenu> menu. When you choose a bookmark Zapzilla will change to the respective channel and open the page. You can remove or edit the bookmarks by choosing <menuchoice>
 
93
          <guimenu>Bookmarks</guimenu>
 
94
          <guisubmenu>Edit Bookmarks</guisubmenu>
 
95
        </menuchoice>.</para>
 
96
      
 
97
      <para>Some TV stations provide additional information, for example links to a program schedule page or subtitle pages. Similar to bookmarks these pages are listed in the context menu, subtitle pages in the <guisubmenu>Subtitles</guisubmenu> submenu.</para>
 
98
    </sect2>
 
99
    
 
100
    <sect2 id="zapzilla-navigation-history">
 
101
      <title>History</title>
 
102
 
 
103
      <para>By clicking on the <guilabel>Back</guilabel> and <guilabel>Forward</guilabel> buttons in the toolbar, or by choosing from the <menuchoice>
 
104
          <guimenu>Go</guimenu>
 
105
        </menuchoice> menu you can browse through previously visited pages. The <guilabel>Index</guilabel> button brings you back to the main page, usually page 100.</para>
 
106
    </sect2>
 
107
    
 
108
    <sect2 id="zapzilla-concealed">
 
109
      <title>Concealed Text</title>
 
110
 
 
111
      <para>Teletext pages can contain concealed text, typically to hide quiz answers. You can see this text after clicking on the <guilabel>Reveal</guilabel> button in the toolbar.</para>
 
112
    </sect2>
 
113
 
 
114
    <sect2 id="zapzilla-character-encoding">
 
115
      <title>Character Encoding</title>
 
116
 
 
117
      <para>TV stations do not always transmit correct character set codes. By choosing from <menuchoice>
 
118
          <guimenu>View</guimenu>
 
119
          <guisubmenu>Encoding</guisubmenu>
 
120
        </menuchoice> you can override the default character encoding.</para>
 
121
    </sect2>
 
122
 
 
123
    <sect2 id="zapzilla-channels">
 
124
      <title>Multi-Channel Page Memory</title>
 
125
 
 
126
      <para>The Zapzilla page memory can contain pages of more than one station. To switch between stations choose from the <menuchoice>
 
127
          <guimenu>Channels</guimenu>
 
128
        </menuchoice> menu. Note when the memory limit is reached, older pages are removed from page memory. You can change the limit in the Teletext preferences, by choosing <menuchoice>
 
129
          <guimenu>Edit</guimenu>
 
130
          <guisubmenu>Preferences</guisubmenu>
 
131
        </menuchoice>. When you choose the <menuchoice>
 
132
          <guimenu>Received</guimenu>
 
133
        </menuchoice> channel, Zapzilla shows only pages of the currently received channel and updates the display on channel changes.</para>
 
134
    </sect2>
 
135
 
 
136
    <sect2 id="zapzilla-export">
 
137
      <title>Exporting Pages</title>
 
138
      
 
139
      <para>Zapzilla supports the X Window clipboard. To mark a section of text, click on the page with the left mouse button and drag the mouse while pressing the button. When you press the <keycap>Shift</keycap> key at the same time you can mark a rectangular section of text. There is no cut or copy menu, to paste the text simply move the mouse pointer into another application window and press the third (middle) mouse button.</para>
 
140
 
 
141
      <para>You can save a Teletext page in various formats by choosing <menuchoice>
 
142
          <guimenu>File</guimenu>
 
143
          <guisubmenu>Save As</guisubmenu>
 
144
        </menuchoice> from the main menu, or <menuchoice>
 
145
          <guimenu>Save As</guimenu>
 
146
        </menuchoice> from the context menu.</para>
 
147
 
 
148
      <figure id="zapzilla-save-as-figure"> 
 
149
        <title>Zapzilla Save As Dialog</title>
 
150
        <screenshot>
 
151
          <mediaobject> 
 
152
            <imageobject>
 
153
              <imagedata fileref="figures/zapzilla-export.png" format="PNG"/> 
 
154
            </imageobject>
 
155
            <textobject>
 
156
              <phrase>Save As dialog. Contains filename entry, format menu and format options.</phrase>
 
157
            </textobject>
 
158
          </mediaobject>
 
159
        </screenshot>
 
160
      </figure>
 
161
 
 
162
      <para>You can enter a filename for the page and choose a file format. Options will appear depending on the chosen format:</para>
 
163
 
 
164
      <variablelist>
 
165
        <varlistentry>
 
166
          <term><guilabel>Graphics char</guilabel></term>
 
167
          <listitem><para>Text based formats cannot represent graphics characters in Teletext pages. Here you can enter a replacement.</para>
 
168
          </listitem>
 
169
        </varlistentry>
 
170
        <varlistentry>
 
171
          <term><guilabel>Color (CSS)</guilabel></term>
 
172
          <listitem><para>This is a HTML option. When enabled, page colors will be encoded as Cascading Style Sheets markup.</para>
 
173
          </listitem>
 
174
        </varlistentry>
 
175
        <varlistentry>
 
176
          <term><guilabel>HTML header</guilabel></term>
 
177
          <listitem><para>This is another HTML option. When disabled the HTML header will be omitted, which is useful to integrate several pages in one HTML file.</para>
 
178
          </listitem>
 
179
        </varlistentry>
 
180
        <varlistentry>
 
181
          <term><guilabel>Correct aspect ratio</guilabel></term>
 
182
          <listitem><para>This is a graphical format option. When enabled the image will be scaled to the correct aspect ratio.</para>
 
183
          </listitem>
 
184
        </varlistentry>
 
185
        <varlistentry>
 
186
          <term><guilabel>Control codes</guilabel></term>
 
187
          <listitem><para>This is a text format option. You can choose if terminal control codes shall be inserted to preserve colors and some text styles. If the page uses more than the eight primary colors the actual color will be approximated.</para>
 
188
          </listitem>
 
189
        </varlistentry>
 
190
      </variablelist>
 
191
    </sect2>
 
192
 
 
193
    <sect2 id="zapzilla-search">
 
194
      <title>Search the page memory</title>
 
195
 
 
196
      <para>You can search for text in the page memory by choosing <menuchoice>
 
197
          <guimenu>Edit</guimenu>
 
198
          <guisubmenu>Search</guisubmenu>
 
199
        </menuchoice> from the main menu, <menuchoice>
 
200
          <guimenu>Search</guimenu>
 
201
        </menuchoice> from the context menu, or by clicking on the <guilabel>Find</guilabel> button in the toolbar.</para>
 
202
 
 
203
      <figure id="zapzilla-search-figure"> 
 
204
        <title>Zapzilla Search Dialog</title>
 
205
        <screenshot>
 
206
          <mediaobject> 
 
207
            <imageobject>
 
208
              <imagedata fileref="figures/zapzilla-search.png" format="PNG"/> 
 
209
            </imageobject>
 
210
            <textobject>
 
211
              <phrase>Search dialog. Contains text entry, regular expression and case insensitive option, cancel, forward and back button.</phrase>
 
212
            </textobject>
 
213
          </mediaobject>
 
214
        </screenshot>
 
215
      </figure>
 
216
 
 
217
      <para>Enter a text and click on the <guilabel>Forward</guilabel> button to find the next occurence of the text. Accordingly <guilabel>Back</guilabel> will find the previous occurence. When the text has been found, the Zapzilla window will show the page with the search text highlighted.</para>
 
218
 
 
219
      <sect3 id="zapzilla-regexp">
 
220
        <title>Regular Expressions</title>
 
221
 
 
222
        <para>Regular expressions are a powerful way to search certain patterns in a text. Apart of simply giving the text you want to find, you can build a set of rules to be matched, allowing for much more complex search patterns.</para>
 
223
        <para>Unicode is a way of encoding characters that aims to support all possible character sets in the world. Using Unicode we can assign a unique code to every character, disregarding whether it is Latin, Greek, Cyrillic, Hebrew or Arabic. Zapzilla uses a Unicode flavour called UCS-2, representing each character as a 16 bit number.</para>
 
224
        <para>Regular expressions have a syntax in which a few characters are special constructs and the rest are "ordinary". An ordinary character is a simple regular expression which matches that same character and nothing else. The special characters are <userinput>$</userinput>, <userinput>^</userinput>, <userinput>.</userinput>, <userinput>*</userinput>, <userinput>+</userinput>, <userinput>?</userinput>, <userinput>[</userinput>, <userinput>]</userinput> and <userinput>\</userinput>. Any other character appearing in a regular expression is ordinary, unless a <userinput>\</userinput> precedes it.</para>
 
225
        <para>For example, <userinput>f</userinput> is not a special character, so it is ordinary, and therefore <userinput>f</userinput> is a regular expression that matches the string "f" and no other string. (It does <emphasis>not</emphasis> match the string "ff".) Likewise, <userinput>o</userinput> is a regular expression that matches only "o". When searching case insensitive these regular expressions also match "F" and "O", but we consider this a generalization of "the same string," rather than an exception.</para>
 
226
        <para>Any two regular expressions A and B can be concatenated. The result is a regular expression which matches a string if A matches some amount of the beginning of that string and B matches the rest of the string.</para>
 
227
        <para>As a simple example, we can concatenate the regular expressions <userinput>f</userinput> and <userinput>o</userinput> to get the regular expression <userinput>fo</userinput>, which matches only the string "fo". Still trivial. To do something nontrivial, you need to use one of the special characters. Here is a list of them:</para>
 
228
 
 
229
        <variablelist>
 
230
          <varlistentry>
 
231
            <term><userinput>.</userinput> (Period)</term>
 
232
            <listitem><para>is a special character that matches any single character except a newline, that is an invisible character marking the end of the line. Using concatenation, we can make regular expressions like <userinput>a.b</userinput>, which matches any three-character string that begins with "a" and ends with "b".</para>
 
233
            </listitem>
 
234
          </varlistentry>
 
235
          <varlistentry>
 
236
            <term><userinput>*</userinput></term>
 
237
            <listitem><para>is not a construct by itself; it is a postfix operator that means to match the preceding regular expression repetitively as many times as possible. Thus, <userinput>o*</userinput> matches any number of "o"s (including no "o"s).</para>
 
238
              <para><userinput>*</userinput> always applies to the <emphasis>smallest</emphasis> possible preceding expression. Thus, <userinput>fo*</userinput> has a repeating <userinput>o</userinput>, not a repeating <userinput>fo</userinput>. It matches "f", "fo", "foo", and so on.</para>
 
239
              <para>The matcher processes a <userinput>*</userinput> construct by matching, immediately, as many repetitions as can be found. Then it continues with the rest of the pattern. If that fails, backtracking occurs, discarding some of the matches of the <userinput>*</userinput>-modified construct in case that makes it possible to match the rest of the pattern. For example, in matching <userinput>ca*ar</userinput> against the string "caaar", the <userinput>a*</userinput> first tries to match all three "a"s; but the rest of the pattern is <userinput>ar</userinput> and there is only "r" left to match, so this try fails. The next alternative is for <userinput>a*</userinput> to match only two "a"s. With this choice, the rest of the regular expression matches successfully.</para>
 
240
            </listitem>
 
241
          </varlistentry>
 
242
          <varlistentry>
 
243
            <term><userinput>+</userinput></term>
 
244
            <listitem><para>is a postfix operator, similar to <userinput>*</userinput> except that it must match the preceding expression at least once. So, for example, <userinput>ca+r</userinput> matches the strings "car" and "caaaar" but not the string "cr", whereas <userinput>ca*r</userinput> matches all three strings.</para>
 
245
            </listitem>
 
246
          </varlistentry>
 
247
          <varlistentry>
 
248
            <term><userinput>?</userinput></term>
 
249
            <listitem><para>is a postfix operator, similar to <userinput>*</userinput> except that it can match the preceding expression either once or not at all. For example, <userinput>ca?r</userinput> matches "car" or "cr"; nothing else.</para>
 
250
            </listitem>
 
251
          </varlistentry>
 
252
          <varlistentry>
 
253
            <term><userinput>[ ... ]</userinput></term>
 
254
            <listitem><para>is a "character set", which begins with <userinput>[</userinput> and is terminated by <userinput>]</userinput>. In the simplest case, the characters between the two brackets are what this set can match.</para>
 
255
              <para>Thus, <userinput>[ad]</userinput> matches either one "a" or one "d", and <userinput>[ad]*</userinput> matches any string composed of just "a"s and "d"s (including the empty string), from which it follows that <userinput>c[ad]*r</userinput> matches "cr", "car", "cdr", "caddaar", etc.</para>
 
256
              <para>You can also include character ranges in a character set, by writing the starting and ending characters with a <userinput>-</userinput> between them. Thus, <userinput>[a-z]</userinput> matches any lower-case ASCII letter. Ranges may be intermixed freely with individual characters, as in <userinput>[a-z$%.]</userinput>, which matches any lower-case ASCII letter or "$", "%" or period.</para>
 
257
              <para>Note that the usual regexp special characters are not special inside a character set. A completely different set of special characters exists inside character sets: <userinput>]</userinput>, <userinput>-</userinput> and <userinput>^</userinput>.</para>
 
258
              <para>To include a <userinput>]</userinput> in a character set, you must make it the first character. For example, <userinput>[]a]</userinput> matches "]" or "a". To include a <userinput>-</userinput>, write <userinput>-</userinput> as the first or last character of the set, or put it after a range. Thus, <userinput>[]-]</userinput> matches both "]" and "-".</para>
 
259
              <para>To include <userinput>^</userinput> in a set, put it anywhere but at the beginning of the set.</para>
 
260
              <para>When you use a range in case-insensitive search, you should write both ends of the range in upper case, or both in lower case, or both should be non-letters.</para>
 
261
            </listitem>
 
262
          </varlistentry>
 
263
          <varlistentry>
 
264
            <term><userinput>[^ ... ]</userinput></term>
 
265
            <listitem><para><userinput>[^</userinput> begins a "complemented character set", which matches any character except the ones specified. Thus, <userinput>[^a-z0-9A-Z]</userinput> matches all characters <emphasis>except</emphasis> letters and digits. <userinput>^</userinput> is not special in a character set unless it is the first character. The character following the <userinput>^</userinput> is treated as if it were first (in other words, <userinput>-</userinput> and <userinput>]</userinput> are not special there).</para>
 
266
            </listitem>
 
267
          </varlistentry>
 
268
          <varlistentry>
 
269
            <term><userinput>^</userinput></term>
 
270
            <listitem><para>is a special character that matches the empty string, but only at the beginning of a row. Otherwise it fails to match anything. Thus, <userinput>^foo</userinput> matches a "foo" that occurs at the beginning of a row.</para>
 
271
            </listitem>
 
272
          </varlistentry>
 
273
          <varlistentry>
 
274
            <term><userinput>$</userinput></term>
 
275
            <listitem><para>is similar to <userinput>^</userinput> but matches only at the end of a row. Thus, <userinput>x+$</userinput> matches a string of one "x" or more at the end of a line.</para>
 
276
            </listitem>
 
277
          </varlistentry>
 
278
          <varlistentry>
 
279
            <term><userinput>\</userinput></term>
 
280
            <listitem><para>has two functions: it quotes the special characters (including <userinput>\</userinput> itself), and it introduces additional special constructs.</para>
 
281
              <para>Because <userinput>\</userinput> quotes special characters, <userinput>\$</userinput> is a regular expression that matches only "$", and "\[" is a regular expression that matches only "[", and so on.</para>
 
282
              <para><userinput>\x</userinput>, <userinput>\X</userinput>, <userinput>\u</userinput> or <userinput>\U</userinput> followed by a hexadecimal number of up to 4 digits will match Unicode characters. <userinput>\x00C9</userinput> for example matches "&Eacute;"</para>
 
283
            </listitem>
 
284
          </varlistentry>
 
285
          <varlistentry>
 
286
            <term><userinput>#url#</userinput> and <userinput>#email#</userinput></term>
 
287
            <listitem><para>are specific to Zapzilla. These regular expressions match any web or e-mail address, respectively.</para>
 
288
            </listitem>
 
289
          </varlistentry>
 
290
        </variablelist>
 
291
 
 
292
        <para>You can find a more comprehensive introduction to regular expressions in the regex manual page.</para>
 
293
      </sect3>
 
294
    </sect2>
 
295
  </sect1>
 
296
 
 
297
  <!--
 
298
Local Variables:
 
299
mode: sgml
 
300
coding: utf-8
 
301
sgml-parent-document: "zapping.xml"
 
302
comment-auto-fill-only-comments: t
 
303
indent-tabs-mode: nil
 
304
End:
 
305
  -->