1epgsearch(4)            Epgsearch Version 0.9.25.beta17           epgsearch(4)
2
3
4

NAME

6       epgsearch - Searchtimer and replacement of the VDR program menu
7

OVERVIEW

9       Since the README get bigger and bigger this man page shall be used to
10       explain some things in detail. So it's not really a manual, but an
11       extended README.
12

CONTENT

14        1.  Using variables in the directory entry of a search timer
15        2.  The format of epgsearch.conf
16        3.  Description of the search process
17        4.  How do Search Timers work?
18        5.  How to trigger a search timer update?
19        6.  The sources of the 'Select directory' menu
20        7.  Language dependent commands for EPG
21        8.  Usage from other plugins or scripts
22        9.  SVDRP interface
23        10. Customizing the EPG menus
24        11. Working with the timer conflict menu
25        12. User defined variables
26        13. Email notifications
27        14. The conf.d subdirectory
28

1. Using variables in the directory entry of a search timer

30       If you are using extended EPG information, you can use variables as
31       part of a directory entry of a search timer. These variables always
32       have the form '%variable%'. The name of a variable corresponds with the
33       internal name of an extended EPG info, as specified in the file
34       epgsearchcats.conf (samples can be found in subdirectory 'conf').
35       Example:
36
37        1|Category|Kategorie|Information,Kinder,Musik,Serie,Show,Spielfilm,Sport|3
38
39       The category with ID 1 has the internal name 'Category'. So you could
40       use it with '%Category%'. The names are not case sensitive. Sample
41       directory entries could look like this:
42
43        My Movies~%Category%
44        Childrens Movies~%category%
45        %CATEGORY%~%genre%
46
47       There are also three other variables: %Title%, %Subtitle% and %chlng%.
48       If you don't use %Title%, the title is always automatically appended to
49       the directory entry, when a timer will be created. If you set 'serial
50       recording' to 'yes' in your search timer then also the subtitle will be
51       automatically appended. So the directory entry
52
53        %Category%~%Genre%~%Title%~%Subtitle%
54
55       is the same as
56
57        %Category%~%Genre%
58        (with 'serial recording' set to 'yes').
59
60       The %chnlng% variable gets replaced with the name of the channel.
61
62       Attention: Automatically appending title and subtitle will not be done,
63       if you use the variables %Title% or %Subtitle% in the directory entry.
64       This allows to form directory entries like this one:
65
66        %Category%~%Genre%~%Title%~%Episode%~%Subtitle%
67
68       There are also the following search variables:
69
70        %search.query% that will be replaced with the query of the search timer
71        %search.series% that is '1', if the search has it's 'Series recording' flag set, else '0'.
72
73       See also "epgsearchuservars.conf(5)".
74

2. The format of epgsearch.conf

76       Due to some new features there was a change in the format. The format
77       is now signed with a comment in the first line. The field delimiter is
78       ':':
79
80         1 - unique search timer id
81         2 - the search term
82         3 - use time? 0/1
83         4 - start time in HHMM
84         5 - stop time in HHMM
85         6 - use channel? 0 = no,  1 = Interval, 2 = Channel group, 3 = FTA only
86         7 - if 'use channel' = 1 then channel id[|channel id] in vdr format,
87             one entry or min/max entry separated with |, if 'use channel' = 2
88             then the channel group name
89         8 - match case? 0/1
90         9 - search mode:
91              0 - the whole term must appear as substring
92              1 - all single terms (delimiters are blank,',', ';', '|' or '~')
93                 must exist as substrings.
94              2 - at least one term (delimiters are blank, ',', ';', '|' or '~')
95                  must exist as substring.
96              3 - matches exactly
97              4 - regular expression
98              5 - fuzzy searching (specify tolerance in parameter 42, not available
99                  for EPG categories)
100        10 - use title? 0/1
101        11 - use subtitle? 0/1
102        12 - use description? 0/1
103        13 - use duration? 0/1
104        14 - min duration in minutes
105        15 - max duration in minutes
106        16 - use as search timer? 0/1/2 (with 2 one can specify time margins in
107             parameter 48/49 where the search timer is active)
108        17 - use day of week? 0/1
109        18 - day of week (0 = Sunday, 1 = Monday...;
110             -1 Sunday, -2 Monday, -4 Tuesday, ...; -7 Sun, Mon, Tue)
111        19 - use series recording? 0/1
112        20 - directory for recording
113        21 - priority of recording
114        22 - lifetime of recording
115        23 - time margin for start in minutes
116        24 - time margin for stop in minutes
117        25 - use VPS? 0/1
118        26 - action:
119              0 = create a timer
120              1 = announce only via OSD (no timer)
121              2 = switch only (no timer)
122        27 - use extended EPG info? 0/1
123        28 - extended EPG info values. This entry has the following format
124             (delimiter is '|' for each category, '#' separates id and value):
125             1 - the id of the extended EPG info category as specified in
126                 epgsearchcats.conf
127             2 - the value of the extended EPG info category
128                 (a ':' will be translated to "!^colon^!", e.g. in "16:9")
129        29 - avoid repeats? 0/1
130        30 - allowed repeats
131        31 - compare title when testing for a repeat? 0/1
132        32 - compare subtitle when testing for a repeat? 0=no/1=yes/2=yes-if present
133        33 - compare description when testing for a repeat? 0/1
134        34 - compare extended EPG info when testing for a repeat?
135             This entry is a bit field of the category IDs.
136        35 - accepts repeats only within x days
137        36 - delete a recording automatically after x days
138        37 - but keep this number of recordings anyway
139        38 - minutes before switch (if action = 2)
140        39 - pause if x recordings already exist
141        40 - blacklist usage mode (0 none, 1 selection, 2 all)
142        41 - selected blacklist IDs separated with '|'
143        42 - fuzzy tolerance value for fuzzy searching
144        43 - use this search in favorites menu (0 no, 1 yes)
145        44 - number of the search menu template to use (only available if multiple
146             search result templates are defined in epgsearchmenu.conf)
147        45 - auto deletion mode (0 don't delete search timer, 1 delete after given
148             count of recordings, 2 delete after given days after first recording)
149        46 - count of recordings after which to delete the search timer
150        47 - count of days after the first recording after which to delete the search
151             timer
152        48 - first day where the search timer is active (see parameter 16)
153        49 - last day where the search timer is active (see parameter 16)
154        50 - ignore missing EPG categories? 0/1
155        51 - unmute sound if off when used as switch timer
156        52 - the minimum required match in percent when descriptions are compared to avoid repeats (-> 33)
157
158       A ':' in the search term or the directory entry will be translated in a
159       '|'. If a '|' exists in the search term, e.g. when using regular
160       expressions, it will be translated to "!^pipe^!" (I know it's ugly ;-))
161
162       See also "epgsearch.conf(5)".
163

3. Description of the search process

165       First, for each broadcasting a search text divided by '~' is created,
166       depending on the settings of 'Use title', 'Use subtitle' and 'Use
167       description':
168
169        title~subtitle~description
170
171       If "Match case" is not set, the search text and the search term are
172       transformed to lower case.  Now depending on the search mode, the
173       search term will be looked up in the search text:
174
175       - 'Phrase' matches
176           if the search term is found anywhere in the search text.
177
178       - 'at least one word', 'all words'
179           first the search term will be split in single words. Delimiters are
180           a blank and the characters ',' ';' '|' '~'.
181
182           Then we check if at least one or all words appear in the search
183           text.
184
185       - 'match exactly'
186           matches if search term and search text are identical.
187
188       - 'regular expression'
189           the search is done with a regular expression. You don't need a
190           leading and trailing '/' in your search term.  Two standards of
191           regular expression are supported: extended POSIX and Perl
192           compatible regular expressions (PCRE) (see INSTALL).
193
194       If the search was successful until now, the other criterions (start
195       time, duration, week day) are checked.
196

4. How do Search Timers work?

198       With each update, the plugin searches for new matches of your search
199       timers. If a new match is found then a new timer is created. For serial
200       recordings, the subtitle is appended to the recording directory. Many
201       providers deliver the subtitle just 1-2 days before the event. The
202       plugin uses then a date/time string for the subtitle, but replaces this
203       one later if the subtitle is present.
204
205       Start and end times of a broadcasting often vary a little bit. To avoid
206       getting many different timers for the same event, the plugin checks
207       before adding a new timer, if there is one, that has start and end
208       times which only differ by a maximum of 10 minutes (or the events
209       duration if this is less then 10 minutes). If so, the present timer is
210       modified, else a new timer is created. If the timer was set to inactive
211       there will be no update. Also manually corrected priority or lifetime
212       will not be changed when updating.
213
214       If you have set 'Announce only (no timer)' to yes, no timer is created.
215       Instead you get an OSD message about the event. This message is
216       displayed at each scan, but only if there is no timer for the event.
217

5. How to trigger a search timer update?

219       the update of search timers runs in its own thread. There are several
220       ways to trigger it:
221
222       - automatically
223           after VDR starts there is always an update (after a few seconds).
224           After this, the setup option 'Update interval' tells epgsearch when
225           the next update should be done repeatedly (in minutes).
226
227       - manually extern
228           the thread observes the file '.epgsearchupdate' in the plugins
229           config directory. When you
230
231            touch /path_to_file/.epgsearchupdate
232
233           this will also trigger an update. So this is a simple solution to
234           make an update e.g. by a script.
235
236       - manually intern
237           calling actions or pressing '3' in the menu of searches asks also
238           for an update.
239
240       - from other plugins
241
242       there's a service 'Epgsearch-updatesearchtimers-v1.0' that can be used
243       with the service interface of VDR from other plugins with the option to
244       inform via OSD when the update has finished
245

6. The sources of the 'Select directory' menu

247       This menu displays directories, that can be used for search timers or
248       ordinary timers. The items displayed are read from the following
249       sources:
250
251          * current recording directories
252          * current timer directories
253          * directories used in search timers
254          * directories specified in F<epgsearchdirs.conf>,
255            see C<epgsearchdirs.con(5)>
256
257       The menu merges theses directories and displays only distinct
258       directories. With key 'yellow' one can change the depth of the
259       directories shown. If there are items, that contain category variables
260       like '%genre%', these entries are always shown before any other
261       directories. They are also not level dependent, but are always shown
262       with their full directory.
263
264       If this menu is called from the timer edit menu and an item is selected
265       that contains the variables "%title%" or "%subtitle" then the 'file'
266       item of the timer gets cleared, since title or subtitle already exist
267       in the 'directory' item.  This list can also be accessed via the SVDRP
268       command 'LSRD'.
269

7. Language dependent commands for EPG

271       If you like to have a language dependent list of commands simply
272       translate your present epgsearchcmds.conf to your preferred OSD
273       language and store it with the filename epgsearchcmds-XXX.conf, where
274       XXX is the language code from i18n.c:
275
276         { "eng,dos",
277           "deu,ger",
278           "slv",
279           "ita",
280           "dut,nla,nld",
281           "por",
282           "fra,fre",
283           "nor",
284           "fin,smi",
285           "pol",
286           "esl,spa",
287           "ell,gre",
288           "sve,swe",
289           "rom,rum",
290           "hun",
291           "cat,cln",
292           "rus",
293           "hrv",
294           "est",
295           "dan",
296         }
297
298       If there are more codes for one language (e.g. "deu,ger") choose one of
299       them. If there is no language dependent file, epgsearch loads the file
300       epgsearchcmds.conf.
301
302       See also "epgsearchcmds.conf(5)".
303

8. Usage from other plugins or scripts

305       Searching the EPG and other functionality can be used by other plugins
306       or scripts. There are two approaches:
307
308   8.1. File-based (intended for use in scripts)
309       Therefore simply create the file '.epgsearchrc' in the plugins config
310       directory with the following lines in it:
311
312        Search=your search term
313        Searchmode=x  // 0=phrase, 1=and, 2=or, 3=regular expression
314        ChannelNr=x   // add this line, to search on a specific channel
315        UseTitle=x    // 1(default) or 0
316        UseSubtitle=x // 1(default) or 0
317        UseDescr=x    // 1(default) or 0
318
319       Then call Epgsearch via svdrpsend.pl (you must have assigned a key to
320       it), e.g.
321
322        svdrpsend.pl HITK green
323
324       At startup Epgsearch will look for this file and give you the search
325       results for your search, if it exists. After that the file is removed.
326
327       A sample script recrep.sh, that searches for the repeats of a recording
328       exists in the scripts subdirectory of Epgsearch.
329
330   8.2. via Plugin-Interface (intended for use in plugins)
331       A plugin can directly call two functions of epgsearch with only some
332       lines of source code:
333
334        - searching the EPG for some criteria and display the result list
335        - extended timer edit menu
336
337       I have added a quick and dirty dummy plugin
338       (source/vdr-epgsearchclient-0.0.1.tgz), that demonstrates the usage.
339

9. SVDRP interface

341       epgsearch implements a SVDRP interface, that can be accessed for
342       example like this
343
344        svdrpsend.pl PLUG epgsearch LSTS
345
346       the following commands are available:
347
348   search management:
349        * 'LSTS [ID]' to list all searches, or the one with the passed ID
350          (format is the same as epgsearch.conf)
351        * 'NEWS <settings>' to add a new search
352          REMARK: the value of element ID is ignored. epgsearch will always
353          assign the next free ID
354        * 'DELS <ID>' to delete the search with ID
355        * 'EDIS <settings>' to modify an existing search
356        * 'UPDS [OSD]' to update the search timers. Passing the optional keyword
357          'OSD' pops up an OSD message after the update has finished.
358        * 'MODS ID ON|OFF' turns on/off the option 'Use as search timer'.
359        * 'UPDD' to reload the file epgsearchdone.data, e.g. after an
360          external tool has modified it.
361        * 'SETS <ON|OFF>' to temporarily activate or cancel the search timer background
362          thread.
363        * 'FIND <settings>' for searching the EPG
364          input is the same as with 'NEWS'. output is a list of found events formatted
365          as 'NEWT' lines. So they can be immediately used to create a new timer for
366          an event.
367        * 'QRYS < ID(s) >' to get the results for a search with the given
368          ID. Multiple IDs can also be passed and have to be separated with '|'.
369          The results are formatted like this:
370
371          search ID    : // the ID of the corresponding search timer
372          event ID     : // VDR event ID
373          title        : // event title, any ':' will be converted to '|'
374          episode name : // event short text, any ':' will be converted to '|'
375          event start  : // event start in seconds since 1970-01-01
376          event stop   : // event stop in seconds since 1970-01-01
377          channel      : // channel ID in VDR's internal representation (e.g. 'S19.2E-1-1101-28106')
378          timer start  : // timer start in seconds since 1970-01-01 (only valid if timer flag is > 0)
379          timer stop   : // timer stop in seconds since 1970-01-01 (only valid if timer flag is > 0)
380          timer file   : // timer file (only valid if timer flag is > 0)
381          timer flag   : // 0 = no timer needed, 1 = has timer, 2 timer planned for next update)
382        * 'QRYS <settings>' to get the results for a search with the given search
383          settings.
384        * 'QRYF [hours]' to get the results for the favorites menu, see QRYS for
385          result format. The optional parameter specifies the number of hours to
386          evaluate and defaults to 24h.
387        * 'MENU [PRG|NOW|SUM]' calls one of the main menus of epgsearch or the summary
388          of the current event.
389
390   channel group management:
391        * 'LSTC [channel group name]'
392          list all channel groups or if given the one with name 'group name'
393        * 'NEWC <channel group settings>'
394          create a new channel group, format as in epgsearchchangrps.conf
395        * 'EDIC <channel group settings>'
396          modify an existing channel group, format as in epgsearchchangrps.conf
397        * 'DELC <channel group name>'
398          delete an existing channel group
399        * 'RENC <old channel group name|new channel group name>'
400          rename an existing channel group
401
402   blacklist management:
403        * 'LSTB [ID]' to list all blacklists, or the one with the passed ID
404          (format is the same as epgsearchblacklists.conf)
405        * 'NEWB <settings>' to add a new blacklist
406          REMARK: the value of element ID is ignored. epgsearch will always
407          assign the next free ID
408        * 'DELB <ID>' to delete the blacklist with ID
409        * 'EDIB <settings>' to modify an existing blacklist
410
411   search template management:
412        * 'LSTT [ID]' to list all search templates, or the one with the passed ID
413          (format is the same as epgsearch.conf)
414        * 'NEWT <settings>' to add a new search template
415          REMARK: the value of element ID is ignored. epgsearch will always
416          assign the next free ID
417        * 'DELT <ID>' to delete the search template with ID
418        * 'EDIT <settings>' to modify an existing search template
419        * 'DEFT [ID]' returns the ID of the default search template. When passing an
420          ID it activates the corresponding template as default.
421
422   extended EPG categories:
423        * 'LSTE [ID] to get the extended EPG categories defined in epgsearchcats.conf
424          or the one with the given ID. (format is the same as epgsearchcats.conf)
425
426   misc:
427        * 'SETP [option]' returns the current value of the given setup option or a
428          list of all options with their current values.
429          The following options can be accessed:
430           - ShowFavoritesMenu
431           - UseSearchTimers
432
433   timer conflicts:
434        * 'LSCC [REL]' returns the current timer conflicts. With the option 'REL' only
435          relevant conflicts are listed. The result list looks like this for example
436          when we have 2 timer conflicts at one time:
437
438          1190232780:152|30|50#152#45:45|10|50#152#45
439
440          '1190232780' is the time of the conflict in seconds since 1970-01-01. It's
441          followed by list of timers that have a conflict at this time:
442
443          '152|30|50#152#45' is the description of the first conflicting timer. Here:
444
445          '152' is VDR's timer id of this timer as returned from VDR's LSTT command
446          '30' is the percentage of recording that would be done (0...100)
447          '50#152#45' is the list of concurrent timers at this conflict
448
449          '45|10|50#152#45' describes the next conflict
450

10. Customizing the EPG menus

452       The file epgsearchmenu.conf in your plugins config directory is used to
453       store the entries for customizing the EPG menus. You specify the look
454       of each menu (What's on now, What's on next, What's on at ...,
455       Schedule, Search results, Favorites) with a separate line. Here's a
456       sample:
457
458        MenuWhatsOnNow=%chnr%:3|%progrt2s%:5| %time% %t_status%:8|%category%:6| %title% ~ %subtitle%:35
459        MenuWhatsOnNext=%chnr%:3|%time% %t_status%:8|%category%:8| %title% ~ %subtitle%:35
460        MenuWhatsOnElse=%chnr%:3|%time% %t_status%:8|%category%:8| %title% ~ %subtitle%:35
461        MenuSchedule=%time% %t_status%:8|%genre%:14| %title% ~ %subtitle%:35
462        MenuSearchResults=%chnr%:3|%datesh% %time% %t_status%:14|%genre%:8| %title%%colon% %subtitle%:35
463        MenuFavorites=%chnr%:3|%time%:6|%timespan%:7|%t_status%:14|%genre%:8| %title%%colon%%subtitle%:35
464
465       E.g. the entry 'MenuWhatsOnNow' tells epgsearch how you would like to
466       build a line for the menu 'What's on now'. This would create a menu
467       line starting with the channel number, followed by a progress bar in
468       text2skin style, a space of one char, the start time, the timer status,
469       the EPG category (like "movie") and finally the title and subtitle.
470
471       The values for MenuWhatsOnNext, MenuWhatsOnElse, MenuSchedule,
472       MenuSearchResults, MenuFavorites specify the menu 'What's on next',
473       'What's on at ...', 'Schedule', 'Search results' and 'Favorites'
474       respectively. If you do not specify one entry, epgsearch uses it's
475       default menu look.
476
477       'MenuSearchResults' has something special: If you want to have
478       different layouts for your search results depending on the search, you
479       can use more then one menu template. Simply define e.g. an additional
480
481        MenuSearchResultsTip of the Day=%chnr%:3|%time_w%:4|%t_status%:3|%genre%:10|%title%%colon% %subtitle%:35
482
483       This will produce an additional menu item "Result menu layout" in the
484       edit menu of a search where you can choose between the default menu
485       template and your own templates. In the example above you will get "Tip
486       of the Day" as selection entry, since epgsearch simply cuts the leading
487       "MenuSearchResults". When you display the search results the chosen
488       template will be used instead of the default one.
489
490       The following variables exist:
491
492        %time%           - start time in format HH:MM
493        %timeend%        - end time in format HH:MM
494        %date%           - start date in format DD.MM.YY
495        %datesh%         - start date in format DD.MM.
496        %date_iso%       - start date in format YYYY-MM-DD.
497        %year%           - year with century
498        %month%          - month (1-12)
499        %day%            - day (1-31)
500        %time_w%         - weekday name
501        %time_d%         - start day in format TT
502        %time_lng%       - start time in seconds since 1970-01-01 00:00
503        %timespan%       - timespan from now to the beginning of an event, e.g. 'in 15m'
504                           or the time an event is already running, e.g. '10m'.
505        %length%         - length in seconds
506        %title%          - title
507        %subtitle%       - subtitle
508        %summary%        - summary
509        %htmlsummary%    - summary, where all CR are replaced with '<br />'
510        %eventid%        - numeric event ID
511        %liveeventid%    - encoded event ID as used in the frontend 'live'
512        %t_status%       - timer status ('T', 't', 'R')
513        %v_status%       - VPS status
514        %r_status%       - running status
515        %status%         - complete status, the same as
516                           '%t_status%%v_status%%r_status%'
517
518        %<epg-category>% - a value from the extended EPG categories, specified in
519                           epgsearchcats.conf, like %genre% or %category%
520
521       for the 'Whats on...' and 'Search results' menu there are also:
522
523        %chnr%           - channel number
524        %chsh%           - the short channel name (>=vdr-1.3.15)
525        %chlng%          - the 'normal' channel name
526        %chdata%         - VDR's internal channel representation (e.g. 'S19.2E-1-1101-28106')
527        %progr%          - graphical progress bar (not for menu 'Search results'),
528                           requires VDRSymbols font for vdr>=1.5.3
529        %progrT2S%       - progress bar in text2skin style (not for menu 'Search results')
530
531       some indepent variables:
532
533        %colon%          - the sign ':'
534        %datenow%        - current date in format DD.MM.YY
535        %dateshnow%      - current date in format DD.MM.
536        %date_iso_now%   - current date in format YYYY-MM-DD
537        %timenow%        - current time in format HH:MM
538        %videodir%       - VDR video directory (e.g. /video)
539        %plugconfdir%    - VDR plugin config directory (e.g. /etc/vdr/plugins)
540        %epgsearchdir%   - epgsearchs config directory (e.g. /etc/vdr/plugins/epgsearch)
541
542       The variables are not case sensitive. You can also use variables for
543       extended EPG categories defined in epgsearchcats.conf or use your own
544       user defined variables defined in epgsearchuservars.conf
545
546       An entry consists of up to 6 tables separated with '|'. The last entry
547       of each table should declare the table width in chars, separated with
548       ':'.
549
550       If you use a separator like '~', '-' or '#' to separate items like
551       title or subtitle, e.g. %title% ~ %subtitle%, and the subtitle is
552       empty, then epgsearch will try to fix this automatically to avoid a
553       trailing separator.
554
555       You should vary the tab width values to fit your needs, since the look
556       often depends on the selected skin. epgsearchmenu.conf is not reloaded
557       with every plugin call, since this is only useful when testing the conf
558       file. To activate the permanent reload for testing your conf, pass the
559       new start parameter '-r' or '--reloadmenuconf' in your runvdr.
560
561       There's a sample epgsearchmenu.conf in the subdirectory "conf". For a
562       quick try copy it to your plugins config directory (e.g.
563       /etc/vdr/plugins).
564
565       To enable icons from WarEagleIcon-Patch simply put the line
566
567        WarEagleIcons=1
568
569       to epgsearchmenu.conf. This also works for vdr>=1.5.3, which uses true
570       type fonts, if you have installed and selected the font VDRSymbols.ttf
571       (available at http://andreas.vdr-developer.org/fonts/download.html)
572
573       NOTE: As long as there is a file epgsearchmenu.conf with an entry for a
574       special menu, all setup settings regarding the look of this menu are
575       ignored.
576
577       See also "epgsearchmenu.con(5)".
578

11. Working with the timer conflict menu

580       If a conflict is detected within the periodic conflict background check
581       you get an OSD message which informs you about it. Pressing 'Ok' you
582       will get a menu that displays all relevant conflicts. You can manually
583       call this menu in epgsearch in the menu 'Search/Actions'.
584
585       Besides the relevant conflicts (relevance is controlled via the setup
586       options of epgsearch) there may also be conflicts which are not
587       classified as important. If so, you can press 'Show all' to get the
588       complete list. The menu title always displays the number of relevant
589       conflicts and the total number.
590
591       The list displays first the time when a conflict appears and then all
592       timers that will fail here. A timer entry consists of the channel
593       number and its name followed by the timer priority and the percentage
594       value that shows how much of the timer will be recorded. Finally the
595       timer's file entry is displayed.
596
597       When you select a timer entry and press 'Ok' or 'Details' you get a new
598       menu which displays all concurrent timers. This menu allows you to
599       resolve the conflict by
600
601        - searching a repeat for an event
602        - disabling a timer
603        - deleting a timer
604        - changing the timers start- or stop-time or its priority
605        - executing any other commands on this timer
606
607       An entry of this menu consists of the sign '>' to indicate an active
608       timer, the channel number, the start and stop time, the priority, the
609       number of the device that will do the recording (or 'C' for conflict)
610       and the timer's file entry. Pressing 'Ok' on a timer entry will show
611       you its event description if present.
612
613       If one returns from this menu to the conflict overview menu there will
614       be an automatic update to see if a conflict was really resolved. Some
615       changes to a timer (like modifying start/stop or deleting a timer) in
616       the conflict details menu also cause an immediate return to the
617       overview menu and produce an update.
618

12. User defined variables

620       You can create your own variables to be used in any place that supports
621       variables, like the default recording directory for manually created
622       timers, the recording directory of a search timer or in your customized
623       EPG menus.  Put them in the file epgsearchuservars.conf.
624
625       Variables looks like %Variablename%.
626
627       "Variablename" can be consist of any alphanumerical character. Space
628       and special characters are not allowed.
629
630       The variable names are case-insensitive.
631
632       Examples for possible names:
633
634        %Series% %DocuVar1% %ThemesSubtitleDate1%
635
636   Assignment
637        %Series%=New series~Thriller
638
639       The variable %Series% will be assigned with the string "New
640       series~Thriller".
641
642       Assignments are always strings. Spaces stay spaces.
643
644        %Path%=%Series%
645
646       The variable %Path% gets the content of the variable %Series%.
647
648       You can do nearly everything:
649
650        %Path%=%Serie%~Lost
651
652       The variable %Path% contains now the string "New series~Thriller~Lost".
653
654   Control structures
655       You can use simple "if then else" constructions.
656
657       These constructions cannot contain strings, only variables.  Spaces are
658       ignored.
659
660        %Foo%=Other
661
662        %Variable%=%Path% ? %Path% : %Foo%
663
664       If %Path% is not empty, assign the content of %Path% to %Variable%,
665       otherwise the content of %Foo%.
666
667       "%Path% ?" means "not empty?". You can use other checks.
668
669        %Variable%=%Path%!=5 ? %Path% : %Foo%
670
671       "%Path%!=5 ?" means "is %Path% equal 5?"
672
673       You can also compare variables.
674
675        %Five%=5
676
677        %Variable%=%Path%!=%Five% ? %Path% : %Foo%
678
679       Other possible checks:
680
681        ==   equal
682        !=   not equal
683
684   Calling a system command
685       You can call external commands. The returned string will be assigned to
686       a variable
687
688        %uservar%=system(scriptname[, parameters])
689
690       Calls the script "scriptname" with the parameters defined in the
691       optional list of 'parameters'. This can be an arbitrary expression
692       containing other user variables, but not again a system call or a
693       conditional expression.
694
695       Sample:
696
697        %myVar%=system(/usr/local/bin/myscript.sh, -t %title% -s %subtitle% -u %myOtherVar%)
698
699       The script must return a string without line break!
700
701       If the script returns nothing, an empty string will be assigned to the
702       Variable %Result%.
703
704   Calling a TCP service
705       You can call a TCP service with the following syntax:
706
707        %uservar%=connect(<addr>, <port>, [<data>])
708
709       This will connect to <addr> through the given port and pass the
710       optional given data. <addr> can be an IP address or the domain name of
711       the TCP service. The result returned by the service must be terminated
712       with a line feed.
713
714   Possible variables
715       for a list of already builtin variables refer to the section
716       "Customizing the EPG menus" Furthermore you can use every variable
717       defined in epgsearchcats.conf.
718
719       See "epgsearchcats.conf(5)".
720
721   EXAMPLES
722        # Weekday, Date, Time
723        %DateStr%=%time_w% %date% %time%
724
725        # Themes or Subtitle or Date
726        %ThemesSubtitleDate1%=%Subtitle% ? %Subtitle% : %DateStr%
727        %ThemesSubtitleDate%=%Themes% ? %Themes% : %ThemesSubtitleDate1%
728
729        # Calls this script to get a recording path
730        %DocuScript%=system(doku.pl, -t %Title% -s %Subtitle% -e %Episode% -th %Themes% -c %Category% -g %Genre%)
731        %Docu%=%DocuScript%
732

13. Email notification

734       If you want to get email notifications about timers
735       added/modified/removed by the search timer thread or about timer
736       conflicts, first copy the script 'sendEmail.pl' to the place where your
737       executables are (e.g. /usr/local/bin) and then configure your email
738       account in the setup. Press 'Test' to check if it works. There should
739       be something like 'Email successfully sent' at the end of the output.
740       The content of the mails is defined by the files
741
742         - epgsearchupdmail.templ (for search timer update notifications)
743         - epgsearchconflmail.templ (for timer conflict notifications)
744
745       You can find sample files in the 'conf' directory. Copy them to
746       epgsearchs config directory (e.g. /etc/vdr/plugins/epgsearch).
747
748   Customizing the notifications mails
749       The content of the mails can be customized in many ways. You can use
750       plain text or HTML (see the sample conf/epgsearchupdmail-html.templ).
751       For an update mail you have to define the following sections:
752
753         - "subject" to be used as mail subject
754         - "mailbody" the body of the mail:
755           put %update.newtimers% in the place where the list of new timers should
756           appear. The same for %update.modtimers%, %update.deltimers% and
757           %update.newevents& for the list of changed or deleted timers and event
758           announcements.
759         - "timer" the description of one timer and "event" with the description of
760           one event. This section is used to display one timer within a timer list,
761           e.g. in %update.newtimers%. The same for "event".
762
763       All sections are optional, e.g. if you don't use event announcements
764       you can drop "%update.newevents%" in the mailbody and the "event"
765       section. But of course you should have at least a mailbody ;-) Each
766       section is enclosed in a pseudo XML tag.
767
768       The following variables can be used in the section <mailbody>:
769
770         - %update.newtimers%      - will be replaced with the list of new timers
771                                     created with this update. The timers are
772                                     displayed as defined in the section '<timer>'
773         - %update.countnewtimers% - the number of new timers
774         - %update.modtimers%      - same as %update.newtimers% but for modified
775                                     timers.
776         - %update.countmodtimers% - the number of modified timers
777         - %update.deltimers%      - same as %update.newtimers% but for deleted
778                                     timers. (Note: a deleted timer has eventually
779                                     no event assigned to it. So all event variables
780                                     within the timer section will be substituted to
781                                     an empty string.)
782         - %update.countdeltimers% - the number of deleted timers
783         - %update.newevents%      - will be replaced with the list of events to
784                                     announce. These events are the search result of
785                                     search timers with the action "announce by mail".
786                                     The events are displayed as defined in the section
787                                     '<event>'
788         - %update.countnewevents% - the number of new events
789         - %colon%                 - the sign ':'
790         - %datenow%               - current date in format TT.MM.YY
791         - %dateshnow%             - current date in format TT.MM.
792         - %timenow%               - current time in format HH:MM
793
794       The following variables can be used in the section <timer>:
795
796         - %timer.date%            - date of the timer
797         - %timer.start%           - start time of the timer
798         - %timer.stop%            - stop time of the timer
799         - %timer.file%            - recording directory of the timer
800         - %timer.chnr%            - channel number
801         - %timer.chsh%            - short channel name
802         - %timer.chlng%           - channel name
803         - %timer.search%          - name of the search timer, that created the timer
804         - %timer.searchid%        - id of the search timer, that created the timer
805         - %timer.modreason%       - the reason for a timer modification in plain text
806         - %timer.liveid%          - encoded timer ID as used in the frontend 'live'
807         - any event variable (as in '10. Customizing the EPG menus')
808         - any extended EPG variable as defined in epgsearchcats.conf
809         - any user variable (as in '12. User defined variables')
810
811       The following variables can be used in the section <event>:
812
813         - any event variable (as in '10. Customizing the EPG menus')
814         - %search%                - the name of the search timer that triggered
815                                     this event
816         - %searchid%              - the ID of the corresponding search timer
817         - any extended EPG variable as defined in epgsearchcats.conf
818         - any user variable (as in '12. User defined variables')
819
820       For a conflict notification mail the following sections exist:
821
822         - "subject" to be used as mail subject
823         - "mailbody" the body of the mail. Put %conflict.conflicts% in the place
824           where the list of conflict times should appear (Note: there can be more
825           than one timer conflict at the same time!). A conflict time uses the
826           section 'conflictsat' to display its content.
827         - "conflictsat" the description of one time where one or more conflicts
828           exists. Put %conflict.confltimers% in the place where the list of conflict
829           timers should appear.
830         - "confltimer" the description of one conflicting timer
831
832       The following variables can be used in the section <mailbody>:
833
834         - %conflict.count%        - complete number of timer conflicts
835         - %conflict.conflicts%    - list of times with conflicting timers
836
837       The following variables can be used in the section <conflictsat>:
838
839         - %conflict.date%         - date of the conflict
840         - %conflict.time%         - time of the conflict
841         - %conflict.confltimers%  - list of conflicting timers for this time
842
843       The section <conflicttimer> can use the same variables as the section
844       <timer> in an update mail (see above).
845

14. The conf.d subdirectory

847       epgsearch supports a configuration mechanism well-known in linux. The
848       settings of the configuration files
849
850         - epgsearchuservars.conf
851         - epgsearchdirs.conf
852         - epgsearchmenu.conf
853         - epgsearchcats.conf
854
855       can also be given in a file with arbitrary name in the subdirectory
856       conf.d in <plugin-configuration-directory>/epgsearch. This allows one
857       to quickly test different setups only by exchanging files instead of
858       editing them. The format of these files is
859
860         [<section name>]
861         <settings>
862         ...
863
864         [<section name>]
865         <settings>
866         ...
867
868       where <section_name> is one of the following:
869
870         - epgsearchuservars
871         - epgsearchdirs
872         - epgsearchmenu
873         - epgsearchcats
874
875       The <settings> format follows the one in the corresponding
876       configuration file.  Comments beginning with # are allowed, also blank
877       lines.  At startup epgsearch first reads its 'regular' configuration
878       files and then the conf.d subdirectory.  It's allowed to overwrite
879       variables already defined in other files (although this is signaled
880       with a warning in epgsearch's log file.).
881

SEE ALSO

883       epgsearch(1), "epgsearch.conf(5)", "epgsearchuservars.con(5)",
884       "epgsearchdirs.conf(5)", "epgsearchmenu.conf(5)",
885       "epgsearchcmds.conf(5)"
886

AUTHOR (man pages)

888       Mike Constabel <epgsearch (at) constabel (dot) net>
889

REPORT BUGS

891       Bug reports (german):
892
893       <http://www.vdr-developer.org/mantisbt/>
894
895       Mailing list:
896
897       <http://www.vdr-developer.org/mailman/listinfo/epgsearch>
898
900       Copyright (C) 2004-2010 Christian Wieninger
901
902       This program is free software; you can redistribute it and/or modify it
903       under the terms of the GNU General Public License as published by the
904       Free Software Foundation; either version 2 of the License, or (at your
905       option) any later version.
906
907       This program is distributed in the hope that it will be useful, but
908       WITHOUT ANY WARRANTY; without even the implied warranty of
909       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
910       General Public License for more details.
911
912       You should have received a copy of the GNU General Public License along
913       with this program; if not, write to the Free Software Foundation, Inc.,
914       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Or, point
915       your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
916
917       The author can be reached at cwieninger@gmx.de
918
919       The project's page is at http://winni.vdr-developer.org/epgsearch
920
921       The MD5 code is derived from the RSA Data Security, Inc. MD5 Message-
922       Digest Algorithm.
923
924
925
926perl v5.10.0                      2010-02-11                      epgsearch(4)
Impressum