summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--README74
-rw-r--r--epgfixer/charset.conf4
-rw-r--r--epgfixer/regexp.conf10
-rw-r--r--po/fi_FI.po75
-rw-r--r--setup_menu.c19
-rw-r--r--setup_menu.h2
7 files changed, 137 insertions, 48 deletions
diff --git a/HISTORY b/HISTORY
index 56daeca..09de591 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5,6 +5,7 @@ VDR Plugin 'epgfixer' Revision History
- Support for character set conversion for selected channels.
- Support for stripping HTML entities.
- Cleaning up code (some cleanup by Rolf Ahrenberg).
+- Supply user with extra information for each setup menu option using Info key.
2012-04-13: Version 0.0.6
diff --git a/README b/README
index 4ee0b5c..68ddf32 100644
--- a/README
+++ b/README
@@ -1,8 +1,8 @@
This is a "plugin" for the Video Disk Recorder (VDR).
-Written by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
+Written by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
-Project's homepage: http://projects.vdr-developer.org/projects/plg-epgfixer
+Project's homepage: http://projects.vdr-developer.org/projects/plg-epgfixer
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -10,20 +10,42 @@ the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
See the file COPYING for more information.
+Requirements:
+ - VDR 1.7.26 or later
+ - PCRE library
+
Description:
-Epgfixer is a VDR plugin for doing extra fixing of EPG data. Everything is
-done using regular expressions. Correctly named back references are placed
-to the named EPG field.
+Epgfixer is a VDR plugin for doing extra fixing of EPG data.
-Plugin also has EPG bug fixes included in VDR individually selectable from
-setup menu.
+Features:
-Requirements:
- - VDR 1.7.26 or later
- - PCRE
+- Modifying EPG data using regular expressions. Correctly named back references
+ are placed to the named EPG field.
+- Character set conversions for channel using incorrect encoding.
+- Both regular expressions and character set conversions can be applied to
+ either all channels or only to selected channels.
+- Editing regular expressions and character set conversions through setup menu.
+- EPG bug fixes included in VDR individually selectable from
+ setup menu.
-Usage:
+Installation:
+
+cd /put/your/path/here/VDR/PLUGINS/src
+tar -xzf /put/your/path/here/vdr-epgfixer-X.Y.Z.tgz
+ln -s epgfixer-X.Y.Z epgfixer
+cd /put/your/path/here/VDR
+cp -R PLUGINS/src/epgfixer/epgfixer /path/to/vdrconf/plugins/
+make
+make plugins
+./vdr -P epgfixer
+
+Configuration:
+
+Regular expressions and character set conversions are defined in regexp.conf
+and charset.conf, respectively, located in VDR's configuration directory for
+plugins. Check the example configuration files under "epgfixer" subdirectory
+for further information.
General syntax of configuration files:
- Lines beginning with # are regarded as comments.
@@ -33,8 +55,6 @@ General syntax of configuration files:
- Channel_list can contain either channel IDs (e.g. S19.2E-1-1089-12003-0) or
numbers but not both.
-All regular expressions are placed to VDRPLUGINCONFDIR/epgfixer/regexp.conf.
-
Syntax of regexp.conf line is "Channel_list:Parsed_epg_field=Regexp" with:
- Parsed_epg_field is the EPG field for which the regular expression is applied
with available field names title, shorttext and description.
@@ -45,33 +65,5 @@ Syntax of regexp.conf line is "Channel_list:Parsed_epg_field=Regexp" with:
content of the target EPG field, respectively.
- Several regular expressions may be applied to same field.
-All character set conversions are placed to
-VDRPLUGINCONFDIR/epgfixer/charset.conf.
-
Syntax of charset.conf line is "Channel_list:OriginalCharSet" with:
- OriginalCharSet is a name of a character set (e.g. iso8859-1).
-
-Examples of regexp.conf:
-
-# Example of disabled regexp:
-!title=^(?:Movie: |Document: )(?<title>.*)$
-
-# Remove "Movie: " or "Document: " from the beginning of title field for
-# channels 1, 3 and 5:
-1,3,5:title=^(?:Movie: |Document: )(?<title>.*)$
-
-# Move parental rating from end of title to correct EPG field:
-# Program title (12)
-title=^(?<title>.*)[ ][(](?<rating>[0-9S]{1,2})[)][ ]*$
-
-
-Examples of charset.conf:
-
-# Convert character set of channels 1, 2 and 3 from iso8859-1 to character set
-# used by VDR
-1,2,3:iso8859-1
-
-# Convert character set of all channels from iso8859-1 to character set
-# used by VDR
-iso8859-1
-
diff --git a/epgfixer/charset.conf b/epgfixer/charset.conf
index 5dd81ef..18788c8 100644
--- a/epgfixer/charset.conf
+++ b/epgfixer/charset.conf
@@ -1,6 +1,6 @@
# Convert character set of channels 1, 2 and 3 from iso8859-1 to character set
# used by VDR
-1,2,3:iso8859-1
+#1,2,3:iso8859-1
# Convert character set of all channels from iso8859-1 to character set
# used by VDR
-iso8859-1
+#iso8859-1
diff --git a/epgfixer/regexp.conf b/epgfixer/regexp.conf
index 7495aaa..8b868c8 100644
--- a/epgfixer/regexp.conf
+++ b/epgfixer/regexp.conf
@@ -1,4 +1,10 @@
-# Remove "Movie: " or "Document: " from the beginning of title field:
-title=^(?:Movie: |Document: )(?<title>.*)$
+# Example of disabled regexp:
+!title=^(?:Movie: |Document: )(?<title>.*)$
+
+# Remove "Movie: " or "Document: " from the beginning of title field for
+# channels 1, 3 and 5:
+1,3,5:title=^(?:Movie: |Document: )(?<title>.*)$
+
# Move parental rating from end of title to correct EPG field:
+# Program title (12)
title=^(?<title>.*)[ ][(](?<rating>[0-9S]{1,2})[)][ ]*$
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 770b25c..800ad93 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-epgfixer 0.0.3\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2012-05-03 21:34+0300\n"
+"POT-Creation-Date: 2012-05-05 15:17+0300\n"
"PO-Revision-Date: 2012-05-03 22:20+0300\n"
"Last-Translator: Matti Lehtimäki <matti.lehtimaki@gmail.com>\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n"
@@ -34,41 +34,112 @@ msgstr "Peru"
msgid "Regular expressions"
msgstr "Säännölliset lausekkeet"
+msgid "Edit regular expressions."
+msgstr "Muokkaa säännöllisiä lausekkeita."
+
msgid "Character set conversions"
msgstr "Merkistömuunnokset"
+msgid "Edit character set conversions."
+msgstr "Muokkaa merkistömuunnoksia."
+
msgid "Remove quotes from ShortText"
msgstr "Poista lainaukset lyhyestä kuvauksesta"
-msgid "Move Description from ShortText"
+msgid ""
+"EPG bugfix level >= 1: Some channels put the ShortText in quotes and use either the ShortText or the Description field, depending on how long the string is:\n"
+"\n"
+"Title\n"
+"\"ShortText\". Description"
+msgstr ""
+"Ohjelmaoppaan korjaustaso >= 1: Jotkin kanavat laittavat lyhyen kuvauksen lainausmerkkeihin joko lyhyeen kuvaukseen tai kuvaukseen riippuen tekstin pituudesta:\n"
+"\n"
+"Otsikko\n"
+"\"Lyhyt kuvaus\". Kuvaus"
+
+msgid "Move Description from ShortText."
msgstr "Siirrä kuvaus lyhyeen kuvaukseen"
+msgid ""
+"EPG bugfix level >= 1: Some channels put the Description into the ShortText (preceded by a blank) if there is no actual ShortText and the Description is short enough:\n"
+"\n"
+"Title\n"
+" Description"
+msgstr ""
+"Ohjelmaoppaan korjaustaso >= 1: Jotkin kanavat laittavat kuvauksen lyhyeen kuvaukseen (alussa välilyönti) mikäli varsinaista lyhyttä kuvausta ei ole ja kuvaus on tarpeeksi lyhyt:\n"
+"\n"
+"Otsikko\n"
+" Kuvaus"
+
msgid "Remove repeated title from ShortText"
msgstr "Poista nimi lyhyestä kuvauksesta"
+msgid ""
+"EPG bugfix level >= 1: Sometimes they repeat the Title in the ShortText:\n"
+"\n"
+"Title\n"
+"Title"
+msgstr ""
+"Ohjelmaoppaan korjaustaso >= 1: Joskus otsikko toistetaan lyhyessä kuvauksessa:\n"
+"\n"
+"Otsikko\n"
+"Otsikko"
+
msgid "Remove double quotes from ShortText"
msgstr "Poista lainausmerkit lyhyestä kuvauksesta"
+msgid ""
+"EPG bugfix level >= 1: Some channels put the ShortText between double quotes, which is nothing but annoying (some even put a '.' after the closing '\"'):\n"
+"\n"
+"Title\n"
+"\"ShortText\"[.]"
+msgstr ""
+"Ohjelmaoppaan korjaustaso >= 1: Jotkin kanavat laittavat lyhyen kuvausksen lainusmerkkeihin, mikä oli ärsyttävää (jotkut jopa laittavat '.' viimeisen '\"' jälkeen):\n"
+"\n"
+"Otsikko\n"
+"\"Lyhyt kuvaus\"[.]"
+
msgid "Remove useless formatting"
msgstr "Poista ylimääräinen muotoilu"
+msgid "EPG bugfix level >= 2: Some channels apparently try to do some formatting in the texts, which is a bad idea because they have no way of knowing the width of the window that will actually display the text. Remove excess whitespace."
+msgstr "Ohjelmaoppaan korjaustaso >= 2: Jotkin kanavat yrittävät muotoilla tekstejä, mikä on huono idea koska tekstin näyttävän ikkunan leveyttä ei voida tietää. Poista ylimääräiset näkymättömät merkit."
+
msgid "Move long ShortText to Description"
msgstr "Siirrä pitkä lyhyt kuvaus kuvaukseksi"
+msgid "EPG bugfix level >= 2: Some channels put a whole lot of information in the ShortText and leave the Description totally empty. So if the ShortText length exceeds 40, let's put this into the Description instead."
+msgstr "Ohjelmaoppaan korjaustaso >= 2: Jotkin kanavat laittavat paljon tietoa lyhyeen kuvaukseen ja jättävät kuvauksen tyhjäksi. Mikäli lyhyen kuvauksen pituus on suurempi kuin 40, siirretään lyhyt kuvaus kuvaukseen."
+
msgid "Prevent equal ShortText and Description"
msgstr "Estä identtinen kuvaus ja lyhyt kuvaus"
+msgid "EPG bugfix level >= 2: Some channels put the same information into ShortText and Description. In that case we delete one of them."
+msgstr "Ohjelmaoppaan korjaustaso >= 2: Jotkin kanavat laittavat saman tiedon lyhyeen kuvaukseen ja kuvaukseen. Poista toinen näistä."
+
msgid "Replace backticks with single quotes"
msgstr "Korvaa gravis heittomerkillä"
+msgid "EPG bugfix level >= 2: Some channels use the ` (\"backtick\") character, where a ' (single quote) would be normally used. Actually, \"backticks\" in normal text don't make much sense, so let's replace them."
+msgstr "Ohjelmaoppaan korjaustaso >= 2: Jotkin kanavat käyttävät ` (gravis) merkkiä ' (lainausmerkki) sijaan. Itse asiassa gravis ei ole järkevä normaalissa tekstissä, joten korvataan ne."
+
msgid "Fix stream component descriptions"
msgstr "Korjaa lähetekomponenttien kuvaukset"
+msgid "EPG bugfix level = 3: The stream components have a \"description\" field which some channels apparently have no idea of how to set correctly."
+msgstr "Ohjelmaoppaan korjaustaso = 3: Lähetysvirran komponenteissa on \"kuvaus\"-kenttä, jota jotkin kanavat eivät osaa asettaa oikein."
+
msgid "Strip HTML entities"
msgstr "Poista HTML-merkit"
+msgid "Convert HTML entities from all fields to matching regular characters."
+msgstr "Korvaa HTML merkit kaikista kentistä normaaleilla merkeillä."
+
msgid "Reload files"
msgstr "Lataa uudelleen tiedostot"
msgid "Clear EPG data"
msgstr "Tyhjennä EPG tiedot"
+
+msgid "Help"
+msgstr "Ohje"
diff --git a/setup_menu.c b/setup_menu.c
index c45fafb..016abfd 100644
--- a/setup_menu.c
+++ b/setup_menu.c
@@ -161,29 +161,42 @@ cMenuSetupEpgfixer::cMenuSetupEpgfixer(void)
void cMenuSetupEpgfixer::Set(void)
{
Clear();
+ help.Clear();
Add(new cOsdItem(tr("Regular expressions"), osUser1));
+ help.Append(tr("Edit regular expressions."));
Add(new cOsdItem(tr("Character set conversions"), osUser2));
+ help.Append(tr("Edit character set conversions."));
Add(new cMenuEditBoolItem(tr("Remove quotes from ShortText"),
&newconfig.quotedshorttext));
- Add(new cMenuEditBoolItem(tr("Move Description from ShortText"),
+ help.Append(tr("EPG bugfix level >= 1: Some channels put the ShortText in quotes and use either the ShortText or the Description field, depending on how long the string is:\n\nTitle\n\"ShortText\". Description"));
+ Add(new cMenuEditBoolItem(tr("Move Description from ShortText."),
&newconfig.blankbeforedescription));
+ help.Append(tr("EPG bugfix level >= 1: Some channels put the Description into the ShortText (preceded by a blank) if there is no actual ShortText and the Description is short enough:\n\nTitle\n Description"));
Add(new cMenuEditBoolItem(tr("Remove repeated title from ShortText"),
&newconfig.repeatedtitle));
+ help.Append(tr("EPG bugfix level >= 1: Sometimes they repeat the Title in the ShortText:\n\nTitle\nTitle"));
Add(new cMenuEditBoolItem(tr("Remove double quotes from ShortText"),
&newconfig.doublequotedshorttext));
+ help.Append(tr("EPG bugfix level >= 1: Some channels put the ShortText between double quotes, which is nothing but annoying (some even put a '.' after the closing '\"'):\n\nTitle\n\"ShortText\"[.]"));
Add(new cMenuEditBoolItem(tr("Remove useless formatting"),
&newconfig.removeformatting));
+ help.Append(tr("EPG bugfix level >= 2: Some channels apparently try to do some formatting in the texts, which is a bad idea because they have no way of knowing the width of the window that will actually display the text. Remove excess whitespace."));
Add(new cMenuEditBoolItem(tr("Move long ShortText to Description"),
&newconfig.longshorttext));
+ help.Append(tr("EPG bugfix level >= 2: Some channels put a whole lot of information in the ShortText and leave the Description totally empty. So if the ShortText length exceeds 40, let's put this into the Description instead."));
Add(new cMenuEditBoolItem(tr("Prevent equal ShortText and Description"),
&newconfig.equalshorttextanddescription));
+ help.Append(tr("EPG bugfix level >= 2: Some channels put the same information into ShortText and Description. In that case we delete one of them."));
Add(new cMenuEditBoolItem(tr("Replace backticks with single quotes"),
&newconfig.nobackticks));
+ help.Append(tr("EPG bugfix level >= 2: Some channels use the ` (\"backtick\") character, where a ' (single quote) would be normally used. Actually, \"backticks\" in normal text don't make much sense, so let's replace them."));
Add(new cMenuEditBoolItem(tr("Fix stream component descriptions"),
&newconfig.components));
+ help.Append(tr("EPG bugfix level = 3: The stream components have a \"description\" field which some channels apparently have no idea of how to set correctly."));
Add(new cMenuEditBoolItem(tr("Strip HTML entities"),
&newconfig.striphtml));
+ help.Append(tr("Convert HTML entities from all fields to matching regular characters."));
SetHelp(tr("Reload files"),NULL,NULL, tr("Clear EPG data"));
Display();
}
@@ -223,6 +236,10 @@ eOSState cMenuSetupEpgfixer::ProcessKey(eKeys Key)
cEitFilter::SetDisableUntil(time(NULL) + 10);
state = osContinue;
break;
+ case kInfo:
+ if (Current() < help.Size())
+ return AddSubMenu(new cMenuText(cString::sprintf("%s - %s '%s'", tr("Help"), trVDR("Plugin"), PLUGIN_NAME_I18N), help[Current()]));
+ break;
default:
break;
}
diff --git a/setup_menu.h b/setup_menu.h
index 53d7996..4e12ac2 100644
--- a/setup_menu.h
+++ b/setup_menu.h
@@ -8,6 +8,7 @@
#ifndef __EPGFIXER_SETUP_MENU_H
#define __EPGFIXER_SETUP_MENU_H
+#include <vdr/menu.h>
#include <vdr/menuitems.h>
#include "config.h"
@@ -15,6 +16,7 @@ class cMenuSetupEpgfixer : public cMenuSetupPage
{
private:
cEpgfixerSetup newconfig;
+ cVector<const char*> help;
protected:
virtual void Store(void);
void Set(void);