/usr/lib/python3/dist-packages/khard/actions.py is in khard 0.11.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | # -*- coding: utf-8 -*-
class Actions:
action_map = {
"add-email": [],
"addressbooks": ["abooks"],
"birthdays": ["bdays"],
"copy": ["cp"],
"details": ["show"],
"email": [],
"export": [],
"list": ["ls"],
"merge": [],
"modify": ["edit", "ed"],
"move": ["mv"],
"new": ["add"],
"phone": [],
"remove": ["delete", "del", "rm"],
"source": ["src"]
}
@classmethod
def get_action_for_alias(cls, alias):
for action, alias_list in cls.action_map.items():
if alias in alias_list:
return action
return None
@classmethod
def get_alias_list_for_action(cls, action):
return cls.action_map.get(action)
@classmethod
def get_list_of_all_actions(cls):
return list(cls.action_map.keys())
|