Klipper/How to search in phone books using Klipper: Difference between revisions

From KDE Wiki Sandbox
(Markup edit)
m (does not work for me.)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Template:I18n/Language Navigation Bar|Tutorials/How to search in phone books using Klipper}}
<languages />
<languages />
<translate>
<translate>
{{KDE3}}
<!--T:1-->
'''Klipper''' can do a search for a highlighted phone no. in telephone books.
'''Klipper''' can search for a highlighted phone no. in telephone books in the world-wide-web, to look up the name of a given number in a convenient workflow, e.g:
You can also highlight a phone number in a arbitrary application, e.g. on a web site.


+49 30-2023 7305-0
step 1 : mark above phone number and copy it to the Klipper clipboard of KDE.
step 2 : in Klipper, click the action we prepare below to see who owns that phone number.
step 3 : realize that it the result is sort of disappointing. need bugfix.
You can also highlight (mark with the mouse) any phone number in any application, e.g. on a web site.
<!--T:2-->
[[Image:klipper-tut-2.png|center|thumb|400px|Select search action]]
[[Image:klipper-tut-2.png|center|thumb|400px|Select search action]]


== How is it done?==
== How is it done?== <!--T:3-->


<!--T:4-->
'''Klipper''' offers "actions" for it.
'''Klipper''' offers "actions" for it.


<!--T:5-->
As precondition '''Klipper''' needs to be active and must be visible as a tray icon in the panel.
As precondition '''Klipper''' needs to be active and must be visible as a tray icon in the panel.


<!--T:6-->
Call up the <menuchoice>Settings</menuchoice> dialog and add action:
Call up the <menuchoice>Settings</menuchoice> dialog and add action:


<!--T:7-->
Regular expression for action:
Regular expression for action:
{{Input|1=^[\s]*[0+][\d]{2,2}[-/\d\s]{4,16}[\s]*}}
{{Input|1=^[\s]*[0+][\d]{2,2}[-/\d\s]{4,16}[\s]*}}


<!--T:8-->
Now you need to add two commands for added action:
Now you need to add two commands for added action:


<!--T:9-->
Command 1 (all on one line):
Command 1 (all on one line):
{{Input|1=kfmclient openURL "http://www.dastelefonbuch.de/?pid=OpenSearch&cmd=search&kw=%s&le=de"}}
{{Input|1=<nowiki>kfmclient openURL "http://www.dastelefonbuch.de/?pid=OpenSearch&cmd=search&kw=%s&le=de"</nowiki>}}


<!--T:10-->
Description for command 1: {{Input|1=Phonebook search, Konqueror}}
Description for command 1: {{Input|1=Phonebook search, Konqueror}}


<!--T:11-->
Command 2 (all on one line):
Command 2 (all on one line):
{{Input|1=ps x|grep -q '[f]irefox' && firefox -remote openURL\("http://www.dastelefonbuch.de/?pid=OpenSearch&cmd=search&kw=%s&le=de", new-window\) || firefox "http://www.dastelefonbuch.de/?pid=OpenSearch&cmd=search&kw=%s&le=de"}}
{{Input|1=<nowiki>ps x|grep -q '[f]irefox' && firefox -remote openURL\("http://www.dastelefonbuch.de/?pid=OpenSearch&cmd=search&kw=%s&le=de", new-window\) || firefox "http://www.dastelefonbuch.de/?pid=OpenSearch&cmd=search&kw=%s&le=de"</nowiki>}}


<!--T:12-->
Description for command 2: {{Input|1=Phonebook search, Firefox}}
Description for command 2: {{Input|1=Phonebook search, Firefox}}


<!--T:13-->
After that it should look like this:
After that it should look like this:


<!--T:14-->
[[Image:klipper-tut-1.png|center|thumb|400px|Klipper actions]]
[[Image:klipper-tut-1.png|center|thumb|400px|Klipper actions]]


After highlighting a phone number on a web site a small window appears und you will be prompted to select an action. See screenshot at beginning of page.
<!--T:15-->
After highlighting a phone number on a web site a small window appears and you will be prompted to select an action. See screenshot at beginning of page.


<!--T:16-->
[[Category:Tutorials]]
[[Category:Tutorials]]
[[Category:Utilities]]
[[Category:Utilities]]

Latest revision as of 16:57, 14 June 2021

Klipper can search for a highlighted phone no. in telephone books in the world-wide-web, to look up the name of a given number in a convenient workflow, e.g:

+49 30-2023 7305-0

step 1 : mark above phone number and copy it to the Klipper clipboard of KDE.

step 2 : in Klipper, click the action we prepare below to see who owns that phone number.

step 3 : realize that it the result is sort of disappointing. need bugfix.


You can also highlight (mark with the mouse) any phone number in any application, e.g. on a web site.

Select search action

How is it done?

Klipper offers "actions" for it.

As precondition Klipper needs to be active and must be visible as a tray icon in the panel.

Call up the Settings dialog and add action:

Regular expression for action:

^[\s]*[0+][\d]{2,2}[-/\d\s]{4,16}[\s]*

Now you need to add two commands for added action:

Command 1 (all on one line):

kfmclient openURL "http://www.dastelefonbuch.de/?pid=OpenSearch&cmd=search&kw=%s&le=de"

Description for command 1:

Phonebook search, Konqueror

Command 2 (all on one line):

ps x|grep -q '[f]irefox' && firefox -remote openURL\("http://www.dastelefonbuch.de/?pid=OpenSearch&cmd=search&kw=%s&le=de", new-window\) || firefox "http://www.dastelefonbuch.de/?pid=OpenSearch&cmd=search&kw=%s&le=de"

Description for command 2:

Phonebook search, Firefox

After that it should look like this:

Klipper actions

After highlighting a phone number on a web site a small window appears and you will be prompted to select an action. See screenshot at beginning of page.