-
Notifications
You must be signed in to change notification settings - Fork 0
/
psono_search.py
47 lines (33 loc) · 1.11 KB
/
psono_search.py
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
__kupfer_name__ = _("Psono Search")
__kupfer_actions__ = ("PsonoSearch", "Site")
__description__ = _("Search the psono password manager")
__version__ = "2022-1"
__author__ = "thorko"
import http.client
import urllib.parse
from kupfer.objects import Action, TextLeaf
from kupfer import utils, plugin_support, config
class PsonoSearch (Action):
def __init__(self):
Action.__init__(self, _("Psono Search"))
def activate(self, leaf):
query_url = "https://pw.thorko.de/#!/datastore/search/" + leaf.object
utils.show_url(query_url)
def item_types(self):
yield TextLeaf
def get_description(self):
return _("Search your passwords")
def get_icon_name(self):
return "edit-find"
class Site(Action):
def __init__(self):
Action.__init__(self, _("Open Site"))
def activate(self, leaf):
query_url = "http://" + leaf.object
utils.show_url(query_url)
def item_types(self):
yield TextLeaf
def get_description(self):
return _("open the url in browser")
def get_icon_name(self):
return "applications-internet"