- plugin.py: just comments
authorMichael Schmidt <drmichael@users.schwerkraft.elitedvb.net>
Sat, 27 Sep 2008 11:26:05 +0000 (11:26 +0000)
committerMichael Schmidt <drmichael@users.schwerkraft.elitedvb.net>
Sat, 27 Sep 2008 11:26:05 +0000 (11:26 +0000)
- reverselookup.xml: fixed klicktel url for better results

fritzcall/src/plugin.py
fritzcall/src/reverselookup.xml

index be93f86..c6ebe01 100644 (file)
@@ -1177,18 +1177,23 @@ class FritzCallList:
                                direction = "->"
                        else:
                                direction = "<-"
+
+                       # shorten the date info
                        found = re.match(".*(\d\d.\d\d.)\d\d( \d\d:\d\d)", date)
                        if found: date = found.group(1) + found.group(2)
+
+                       # our phone could be of the form "0123456789 (home)", then we only take "home"
                        found = re.match(".*\((.*)\)", phone)
                        if found: phone = found.group(1)
-                       # if len(phone) > 20: phone = phone[:20]
 
+                       #  if we have an unknown number, show the number
                        if caller == _("UNKNOWN") and number != "":
                                caller = number
                        else:
+                               # strip off the address part of the remote number, if there is any
                                found = re.match("(.*)\n.*", caller)
                                if found: caller = found.group(1)
-                       # if len(caller) > 20: caller = caller[:20]
+
                        while (len(caller) + len(phone)) > 40:
                                if len(caller) > len(phone):
                                        caller = caller[:-1]
index 28359e6..bf4f74f 100644 (file)
                <website name="dasoertliche.de" url="http://dasoertliche.de/?form_name=search_inv&amp;page=RUECKSUCHE&amp;context=RUECKSUCHE&amp;action=STANDARDSUCHE&amp;la=de&amp;rci=no&amp;ph=$NUMBER" prefix="0">
                <entry>
                        <name>class=&quot;entry&quot;\s*(?:onmouseover=&quot;&quot;)?\s*&gt;([^&lt;]*)&lt;/a&gt;</name>
-                       <street>^\s*([^,&gt;]*),&amp;nbsp;[^&amp;]*[^&lt;]*&lt;br/&gt;</street>
-                       <city>[^,&gt;]*,&amp;nbsp;[^&amp;]*([^&lt;]*)&lt;br/&gt;</city>
-                       <zipcode>[^,&gt;]*,&amp;nbsp;([^&amp;]*)[^&lt;]*&lt;br/&gt;</zipcode>
+                       <street>^\s*([^,]*),&amp;nbsp;\d{5}&amp;nbsp;[^&lt;]*&lt;br/&gt;</street>
+                       <city>^[^,]*,&amp;nbsp;\d{5}&amp;nbsp;([^&lt;]*)&lt;br/&gt;</city>
+                       <zipcode>^[^,]*,&amp;nbsp;(\d{5})&amp;nbsp;[^&lt;]*&lt;br/&gt;</zipcode>
                </entry>
                </website>
                <website name="dastelefonbuch.de" url="http://www.dastelefonbuch.de/?sourceid=Mozilla-search&amp;cmd=search&amp;kw=$NUMBER" prefix="0">
                                <zipcode>&lt;td class=&quot;col3&quot;&gt;(\d{5})</zipcode>
                        </entry>
                </website>
-               <website name="www.klicktel.de" url="http://www.klicktel.de/telefonbuch/backwardssearch.html?newSearch=1&amp;boxtype=backwards&amp;vollstaendig=$NUMBER" prefix="0">
+               <website name="www.klicktel.de" url="http://www.klicktel.de/inverssuche/backwardssearch.html?newSearch=1&amp;boxtype=backwards&amp;vollstaendig=$NUMBER" prefix="0">
                <entry>
                        <name>class=&quot;title&quot;&gt;([^&lt;]+)&lt;/span&gt;</name>
                        <street>class=&quot;location&quot;&gt;([^&lt;]+)&lt;br /&gt;\d{5}\s+[^&lt;]+&lt;/span&gt;</street>