File: commands.xml

package info (click to toggle)
zapping 0.10~cvs6-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 9,856 kB
  • ctags: 11,841
  • sloc: ansic: 111,154; asm: 11,770; sh: 9,812; xml: 2,742; makefile: 1,283; perl: 488
file content (374 lines) | stat: -rw-r--r-- 17,400 bytes parent folder | download | duplicates (8)
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
<sect1 id="zapping-commands">
  <title>Commands</title>

  <sect2 id="zapping-commands-cli">
    <title>Command Line</title>

    <para>Commands can be given on the command line when Zapping starts. This was intended to change video device properties, the program terminates after executing the command.</para>
    <para><userinput>zapping -c "command"</userinput></para>
    <para>A separate, lightweight tool is planned for this purpose, and to send commands to a running Zapping process. Up to version 0.6.x these commands are available:</para>

    <variablelist>
      <varlistentry>
        <term>set_channel (name | number)</term>
        <listitem><para>Switch to the channel. By default the command tries to find the channel by its name (second column in the channel editor). When no such channel exists or the parameter is a number it selects the nth channel from the list, counted from zero up.</para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>Starting with version 0.7 these commands are superseded by the new Python command set, see below.</para>
  </sect2>

  <sect2 id="zapping-commands-kbd">
    <title>Keyboard Customization</title>

    <para>Commands can be assigned to keyboard keys in the preferences. Starting with version 0.7 we use the new Python command set, see below.</para>
    <para>The old command set listed here is automatically converted for compatibility with older versions of Zapping. The commands are generally equivalent to their new Python counterparts. Parameters in [square brackets] are optional.</para>

    <itemizedlist>
      <listitem><para>channel_up</para></listitem>
      <listitem><para>channel_down</para></listitem>
      <listitem><para>set_channel nth</para></listitem>
      <listitem><para>lookup_channel name</para></listitem>
      <listitem><para>mute [toggle]</para></listitem>
      <listitem><para>volume_incr [n]</para></listitem>
      <listitem><para>ttx_open_new [page [subpage]]</para></listitem>
      <listitem><para>ttx_page_incr [n]</para></listitem>
      <listitem><para>ttx_subpage_incr [n]</para></listitem>
      <listitem><para>ttx_home</para></listitem>
      <listitem><para>ttx_hold [toggle]</para></listitem>
      <listitem><para>ttx_reveal [toggle]</para></listitem>
      <listitem><para>screenshot [format]</para></listitem>
      <listitem><para>quickshot [format]</para></listitem>
    </itemizedlist>
  </sect2>

  <sect2 id="zapping-commands-lirc">
    <title>LIRC/ALIRC Plugin</title>

    <para>These commands are mostly superseded by the new Python command set, see below. They are still supported for compatibility with older versions of Zapping.</para>

    <variablelist>
      <varlistentry>
        <term>QUIT</term>
        <listitem><para>Terminate the program.</para></listitem>
      </varlistentry>
      <varlistentry>
        <term>CHANUP</term>
        <listitem><para>Switch to the next channel in the list.</para></listitem>
      </varlistentry>
      <varlistentry>
        <term>CHANDOWN</term>
        <listitem><para>Switch to the previous channel in the list.</para></listitem>
      </varlistentry>
      <varlistentry>
        <term>SETCHANNEL n</term>
        <listitem><para>The function of this command is affected by
        the <link linkend="zapping-settings-main">preferences setting</link> for entering channel numbers on the numeric keypad. By the default it switches to the nth channel in the list, the count starts at zero. Alternatively the number is interpreted as the RF channel number of the requested channel.</para>
          <para>Single digits combine to numbers when the command is executed repeatedly within a short period. For example "SETCHANNEL 1", "SETCHANNEL 3" jumps to channel 13.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>ZOOM</term>
        <listitem><para>Switch between fullscreen and windowed mode.</para></listitem>
      </varlistentry>
      <varlistentry>
        <term>MUTE</term>
        <listitem><para>When audio is on, mute it, when muted switch it back on.</para></listitem>
      </varlistentry>
      <varlistentry>
        <term>VOL_UP</term>
        <listitem><para>Increase the audio volume.</para></listitem>
      </varlistentry>
      <varlistentry>
        <term>VOL_UP</term>
        <listitem><para>Decrease the audio volume.</para></listitem>
      </varlistentry>
    </variablelist>
  </sect2>

  <sect2 id="zapping-commands-python">
    <title>Python commands</title>

    <para>Parameters in [square brackets] are optional. Parameters in 'single quotes' are strings, otherwise they are numbers. A toggle parameter can be zero to switch the property off, non-zero to switch it on, or it can be omitted to invert the current setting.</para>

    <sect3 id="zapping-commands-python-general">
      <title>General</title>

      <variablelist>
        <varlistentry>
          <term>zapping.quit()</term>
          <listitem><para>Terminate the program.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.switch_mode('mode')</term>
          <listitem><para>Switch the current display mode. You can switch display mode and capture mode at once, for example: zapping.switch_mode('fullscreen capture').</para>
            <variablelist>
              <varlistentry>
                <term>'window'</term>
                <listitem><para>display video or Teletext in a window</para></listitem>
              </varlistentry>
              <varlistentry>
                <term>'fullscreen'</term>
                <listitem><para>display video or Teletext fullscreen</para></listitem>
              </varlistentry>
              <varlistentry>
                <term>'background'</term>
                <listitem><para>like fullscreen, but puts the display in the background (if supported by the window manager)</para></listitem>
              </varlistentry>
              <varlistentry>
                <term>'capture'</term>
                <listitem><para>display video in capture mode (starting with version 0.7.2 this will not switch to window mode)</para></listitem>
              </varlistentry>
              <varlistentry>
                <term>'overlay'</term>
                <listitem><para>display video in overlay mode</para></listitem>
              </varlistentry>
              <varlistentry>
                <term>'preview'</term>
                <listitem><para>display video in overlay mode (starting with version 0.7.2 this will not switch to window mode)</para></listitem>
              </varlistentry>
              <varlistentry>
                <term>'teletext'</term>
                <listitem><para>display Teletext (starting with version 0.7.2 this will not switch to window mode)</para></listitem>
              </varlistentry>
            </variablelist>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.toggle_mode('mode')</term>
          <listitem><para>Switch to this mode. When this is already the current mode, switch to the previous mode. You can switch display and capture mode at once, for example: zapping.switch_mode('fullscreen capture').</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.restore_mode('mode')</term>
          <listitem><para>Synonym for zapping.toggle_mode(), deprecated.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.channel_up()</term>
          <listitem><para>Switch to the next channel in the list.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.channel_down()</term>
          <listitem><para>Switch to the previous channel in the list.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.set_channel(nth)</term>
          <listitem><para>Switch to the nth channel in the list, the count starts at zero.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.lookup_channel('name')</term>
          <listitem><para>Switch to the channel with this name (second column in the channel editor).</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.resize_screen(width, height)</term>
          <listitem><para>Resize the video window.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.picture_size_cycle([n])</term>
          <listitem><para>Switch to the next entry in the list of favourite picture sizes (as displayed in the context menu), +1 forward, -1 back.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.hide_controls(toggle)</term>
          <listitem><para>Whether to hide the main menu and toolbar.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.keep_on_top(toggle)</term>
          <listitem><para>Whether to keep the main window on top of all other windows (if this is supported by the window manager).</para></listitem>
        </varlistentry>
      </variablelist>
    </sect3>

    <sect3 id="zapping-commands-python-dialogs">
      <title>Dialogs</title>

      <variablelist>
        <varlistentry>
          <term>zapping.control_box()</term>
          <listitem><para>Start the picture controls dialog.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.program_info()</term>
          <listitem><para>Start the program info dialog.</para></listitem>
        </varlistentry>
<!-- temporarily disabled
        <varlistentry>
          <term>zapping.network_info()</term>
          <listitem><para>Start the network info dialog.</para></listitem>
        </varlistentry>
-->
        <varlistentry>
          <term>zapping.channel_editor()</term>
          <listitem><para>Start the channel editing dialog.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.properties(['group' [, 'item']])</term>
          <listitem><para>Start the properties dialog, optionally the given group and item.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.plugin_properties()</term>
          <listitem><para>Start the plugin properties dialog.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.about()</term>
          <listitem><para>Start the about dialog.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.help()</term>
          <listitem><para>Open the Zapping documentation.</para></listitem>
        </varlistentry>
      </variablelist>
    </sect3>

    <sect3 id="zapping-commands-python-teletext">
      <title>Teletext</title>

      <variablelist>
        <varlistentry>
          <term>zapping.ttx_open_new([page [, subpage]])</term>
          <listitem><para>Open a Teletext window. When a page number is given, go to this page.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.ttx_page_incr([n])</term>
          <listitem><para>Advance the Teletext page number by n. This can be a positive or negative value, by default 1.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.ttx_subpage_incr([n])</term>
          <listitem><para>Advance the Teletext subpage number by n. This can be a positive or negative value, by default 1.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.ttx_home()</term>
          <listitem><para>Go to the Teletext home page, usually page 100.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.ttx_history_prev()</term>
          <listitem><para>Go to the previously visited page in the browse history.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.ttx_history_next()</term>
          <listitem><para>Go to the next visited page in the browse history.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.ttx_hold(toggle)</term>
          <listitem><para>Toggle the hold state of the displayed page. When off, Zapzilla will rotate through all subpages of the page, if it has any.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.ttx_reveal(toggle)</term>
          <listitem><para>Whether to reveal concealed characters on the displayed Teletext page.</para></listitem>
        </varlistentry>
      </variablelist>
    </sect3>

    <sect3 id="zapping-commands-python-caption">
      <title>Caption / Subtitles</title>

      <variablelist>
        <varlistentry>
          <term>zapping.closed_caption(toggle)</term>
          <listitem><para>Whether to display closed caption superimposed onto the picture.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.osd_render_markup('Hello &lt;i&gt;World&lt;/i&gt;!')</term>
          <listitem><para>Display text superimposed onto the picture, with Pango markup.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.osd_render('Hello World!')</term>
          <listitem><para>Display text superimposed onto the picture.</para></listitem>
        </varlistentry>
      </variablelist>
    </sect3>

    <sect3 id="zapping-commands-python-audio">
      <title>Audio</title>

      <variablelist>
        <varlistentry>
          <term>zapping.mute(toggle)</term>
          <listitem><para>Change the audio mute control.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.volume_incr([n])</term>
          <listitem><para>This provisional command changed the audio recording volume, it is <emphasis>no longer supported</emphasis>.</para>
          <para>As a replacement use zapping.control_incr('volume'[, n]) to change the soundcard mixer or video device volume as configured in the preferences dialog. Note that changing the volume does not unmute.</para></listitem>
        </varlistentry>
      </variablelist>
    </sect3>

    <sect3 id="zapping-commands-python-controls">
      <title>Controls</title>

      <variablelist>
        <varlistentry>
          <term>zapping.control_incr('name'[, n])</term>
          <listitem><para>Advance the control value by n units, usually +1 or -1, default is +1. The following names are presently recognized:</para>
            <variablelist>
              <varlistentry>
                <term>'brightness'</term>
                <listitem><para>picture brightness</para></listitem>
              </varlistentry>
              <varlistentry>
                <term>'contrast'</term>
                <listitem><para>picture contrast</para></listitem>
              </varlistentry>
              <varlistentry>
                <term>'saturation'</term>
                <listitem><para>picture color saturation</para></listitem>
              </varlistentry>
              <varlistentry>
                <term>'hue'</term>
                <listitem><para>picture color hue</para></listitem>
              </varlistentry>
              <varlistentry>
                <term>'volume'</term>
                <listitem><para>audio volume</para></listitem>
              </varlistentry>
              <varlistentry>
                <term>'bass'</term>
                <listitem><para>audio bass</para></listitem>
              </varlistentry>
              <varlistentry>
                <term>'treble'</term>
                <listitem><para>audio treble</para></listitem>
              </varlistentry>
            </variablelist>
          </listitem>
        </varlistentry>
      </variablelist>
    </sect3>
   
    <sect3 id="zapping-commands-python-plugins">
      <title>Plugins</title>

      <variablelist>
        <varlistentry>
          <term>zapping.screenshot(['format'])</term>
          <listitem><para>Start the screenshot dialog and if given switch to the format. Currently valid formats are: 'jpeg' and 'ppm'.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.quickshot(['format'])</term>
          <listitem><para>Take a screenshot without starting the dialog. The last select file name will be used, with an incrementing number appended. When no format is given the last selected format will be used.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.record(['format'])</term>
          <listitem><para>Start the record dialog and if given switch to the format. Note this is the name the user gives a particular configuration, not the name of the file format.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.quickrec(['format'])</term>
          <listitem><para>Start recording without confirmation. The last select file name will be used, with an incrementing number appended. When no format is given the last selected format will be used.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>zapping.stoprec()</term>
          <listitem><para>Stop recording.</para></listitem>
        </varlistentry>
      </variablelist>
    </sect3>
  </sect2>
</sect1>

<!--
Local Variables:
mode: sgml
sgml-parent-document: "zapping.xml"
comment-auto-fill-only-comments: t
indent-tabs-mode: nil
End:
-->