from gi.repository import GdkPixbuf, Notify {%- endif %} import albert as v0 __title__ = "{{ cookiecutter.plugin_short_description }}" __version__ = "{{ cookiecutter.albert_version }}" __triggers__ = "{{ cookiecutter.trigger }} " __authors__ = "{{ cookiecutter.author }}" __homepage__ = "{{ cookiecutter.repo_base_url }}/{{ cookiecutter.plugin_name }}" __exec_deps__ = [] __py_deps__ = [] icon_path = str(Path(__file__).parent / "{{ cookiecutter.plugin_name }}") cache_path = Path(v0.cacheLocation()) / "{{ cookiecutter.plugin_name }}" config_path = Path(v0.configLocation()) / "{{ cookiecutter.plugin_name }}" data_path = Path(v0.dataLocation()) / "{{ cookiecutter.plugin_name }}" dev_mode = True # create plugin locations for p in (cache_path, config_path, data_path): p.mkdir(parents=False, exist_ok=True) {%- if cookiecutter.include_file_backed_var == 'y' %} # FileBackedVar class ------------------------------------------------------------------------- class FileBackedVar: def __init__(self, varname, convert_fn=str, init_val=None): self._fpath = config_path / varname self._convert_fn = convert_fn
from pathlib import Path from fuzzywuzzy import process import albert as v0 __title__ = "Linkedin: Search suggestions for Linkedin" __version__ = "0.4.0" __triggers__ = "li " __authors__ = "Nikos Koukis" __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" __exec_deps__ = [] __py_deps__ = [] icon_path = str(Path(__file__).parent / "search_linkedin") cache_path = Path(v0.cacheLocation()) / "search_linkedin" config_path = Path(v0.configLocation()) / "search_linkedin" data_path = Path(v0.dataLocation()) / "search_linkedin" # set it to the corresponding site for the search at hand # see: https://github.com/jarun/googler/blob/master/auto-completion/googler_at/googler_at googler_at = "linkedin.com" # special way to handle the url? -------------------------------------------------------------- url_handler = "" url_handler_check_cmd = "" if url_handler_check_cmd: p = subprocess.Popen(url_handler_check_cmd, shell=True) p.communicate() if p.returncode != 0:
from fuzzywuzzy import process import albert as v0 import shutil __title__ = "Pass - UNIX Password Manager - fuzzy search" __version__ = "0.4.0" __triggers__ = "pass2 " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/pass_rlded" ) icon_path = os.path.join(os.path.dirname(__file__), "pass_rlded") cache_path = Path(v0.cacheLocation()) / "pass_rlded" config_path = Path(v0.configLocation()) / "pass_rlded" data_path = Path(v0.dataLocation()) / "pass_rlded" pass_dir = Path( os.environ.get("PASSWORD_STORE_DIR", os.path.join(os.path.expanduser("~/.password-store/")))) # https://gist.github.com/bergercookie/d808bade22e62afbb2abe64fb1d20688 # For an updated version feel free to contact me. pass_open_doc = shutil.which("pass_open_doc") pass_open_doc_exts = [ ".jpg", ".jpeg", ".pdf", ".png",
from pathlib import Path from fuzzywuzzy import process import albert as v0 __title__ = "Github: Search suggestions for Github" __version__ = "0.4.0" __triggers__ = "gh " __authors__ = "Nikos Koukis" __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" __exec_deps__ = [] __py_deps__ = [] icon_path = str(Path(__file__).parent / "search_github") cache_path = Path(v0.cacheLocation()) / "search_github" config_path = Path(v0.configLocation()) / "search_github" data_path = Path(v0.dataLocation()) / "search_github" # set it to the corresponding site for the search at hand # see: https://github.com/jarun/googler/blob/master/auto-completion/googler_at/googler_at googler_at = "github.com" # special way to handle the url? -------------------------------------------------------------- url_handler = "" url_handler_check_cmd = "" if url_handler_check_cmd: p = subprocess.Popen(url_handler_check_cmd, shell=True) p.communicate() if p.returncode != 0:
from pathlib import Path from fuzzywuzzy import process import albert as v0 __title__ = "Youtube: Search suggestions for Youtube" __version__ = "0.4.0" __triggers__ = "yt " __authors__ = "Nikos Koukis" __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" __exec_deps__ = [] __py_deps__ = [] icon_path = str(Path(__file__).parent / "search_youtube") cache_path = Path(v0.cacheLocation()) / "search_youtube" config_path = Path(v0.configLocation()) / "search_youtube" data_path = Path(v0.dataLocation()) / "search_youtube" # set it to the corresponding site for the search at hand # see: https://github.com/jarun/googler/blob/master/auto-completion/googler_at/googler_at googler_at = "youtube.com" # special way to handle the url? -------------------------------------------------------------- url_handler = "mpv" url_handler_check_cmd = "which mpv && which youtube-dl" if url_handler_check_cmd: p = subprocess.Popen(url_handler_check_cmd, shell=True) p.communicate() if p.returncode != 0:
import albert as v0 from fuzzywuzzy import process __title__ = "Scratchpad - Dump all your thoughts into a single textfile" __version__ = "0.4.0" __triggers__ = "s " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/scratchpad" ) __exec_deps__ = [] __py_deps__ = ["textwrap"] icon_path = str(Path(__file__).parent / "scratchpad") cache_path = Path(v0.cacheLocation()) / "scratchpad" config_path = Path(v0.configLocation()) / "scratchpad" data_path = Path(v0.dataLocation()) / "scratchpad" dev_mode = True s_store_fname = config_path / "fname" # break long lines at the specified width split_at_textwidth = 80 # plugin main functions ----------------------------------------------------------------------- if s_store_fname.is_file(): with open(s_store_fname, "r") as f: p = Path(f.readline().strip()).expanduser() s_path = p if p.is_file() else Path()
from pathlib import Path import zoopla as z import albert as v0 __title__ = "Zoopla - Search Properties" __version__ = "0.4.0" __triggers__ = "z " __authors__ = "Nikos Koukis" __homepage__ = "https://github.com/bergercookie/zoopla-albert-plugin" iconPath = v0.iconLookup("zoopla") if not iconPath: iconPath = os.path.join(os.path.dirname(__file__), "zoopla") settings_path = Path(v0.cacheLocation()) / "zoopla" api_key = "sn2dtcnvekktbjbv8ays8e33" zoopla = z.Zoopla(api_key=api_key) str_to_key = {"sale": "listing_status", "rent": "listing_status"} str_to_actual_name = {"sale": "sale", "rent": "rent"} def initialize(): # Called when the extension is loaded (ticked in the settings) - blocking # create cache location settings_path.mkdir(parents=False, exist_ok=True)
gi.require_version("Notify", "0.7") # isort:skip gi.require_version("GdkPixbuf", "2.0") # isort:skip from gi.repository import GdkPixbuf, Notify # isort:skip # type: ignore __title__ = "Fetch OTP codes using otp-cli and pass" __version__ = "0.4.0" __triggers__ = "totp" __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/pass_totp_cli" ) icon_path = str(Path(__file__).parent / "pass_totp_cli") cache_path = Path(v0.cacheLocation()) / "pass_totp_cli" config_path = Path(v0.configLocation()) / "pass_totp_cli" data_path = Path(v0.dataLocation()) / "pass_totp_cli" pass_dir = Path( os.environ.get("PASSWORD_STORE_DIR", os.path.join(os.path.expanduser("~/.password-store/")))) pass_2fa_dir = pass_dir / "2fa" # plugin main functions ----------------------------------------------------------------------- def do_notify(msg: str, image=None): app_name = "pass_topt_cli" Notify.init(app_name)
import albert as v0 __title__ = "Words: meaning, synonyms, antonyms, examples" __version__ = "0.4.0" __triggers__ = "word " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/words" ) icon_path = str(Path(__file__).parent / "words") icon_path_g = str(Path(__file__).parent / "words_g") icon_path_r = str(Path(__file__).parent / "words_r") cache_path = Path(v0.cacheLocation()) / "words" config_path = Path(v0.configLocation()) / "words" data_path = Path(v0.dataLocation()) / "words" dev_mode = True pd = PyDictionary() # plugin main functions ----------------------------------------------------------------------- class KeystrokeMonitor: def __init__(self): super(KeystrokeMonitor, self) self.thres = 0.3 # s self.prev_time = time.time() self.curr_time = time.time()
from fuzzywuzzy import process import albert as v0 __title__ = "TL;DR pages from albert." __version__ = "0.4.0" __triggers__ = "tldr " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins//tldr_pages" ) icon_path = str(Path(__file__).parent / "tldr_pages") cache_path = Path(v0.cacheLocation()) / "tldr_pages" config_path = Path(v0.configLocation()) / "tldr_pages" data_path = Path(v0.dataLocation()) / "tldr_pages" tldr_root = cache_path / "tldr" pages_root = tldr_root / "pages" page_paths: Dict[str, Path] = None # Is the plugin run in development mode? in_development = False # plugin main functions ----------------------------------------------------------------------- def initialize():
import albert as v0 __title__ = "Meme Generator - Generate memes with custom quotes - ready to be copied / uploaded / shared at an instant" __version__ = "0.4.0" __triggers__ = "meme " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/meme-generator" ) __exec_deps__ = ["meme", "xclip"] __py_deps__ = ["shutil", "fuzzywuzzy"] icon_path = str(Path(__file__).parent / "meme-generator") cache_path = Path(v0.cacheLocation()) / "meme-generator" config_path = Path(v0.configLocation()) / "meme-generator" data_path = Path(v0.dataLocation()) / "meme-generator" dev_mode = True # plugin main functions ----------------------------------------------------------------------- def initialize(): """Called when the extension is loaded (ticked in the settings) - blocking.""" # create plugin locations for p in (cache_path, config_path, data_path): p.mkdir(parents=False, exist_ok=True)
bing = importlib.util.module_from_spec(spec) spec.loader.exec_module(bing) # type: ignore BingImage = bing.BingImage # type: ignore bing_search = bing.bing_search # type: ignore __title__ = "Image Search and Preview" __version__ = "0.4.0" __triggers__ = "img " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/image_search" ) icon_path = str(Path(__file__).parent / "image_search") cache_path = Path(v0.cacheLocation()) / "image_search" config_path = Path(v0.configLocation()) / "image_search" data_path = Path(v0.dataLocation()) / "image_search" dev_mode = True # clean up cached images on every startup if cache_path.exists(): for img in cache_path.glob("*"): img.unlink() # Keystroke Monitor --------------------------------------------------------------------------- class KeystrokeMonitor: def __init__(self): super(KeystrokeMonitor, self) self.thres = 0.4 # s
from pathlib import Path from typing import Dict, Tuple import albert as v0 __title__ = "Errno lookup operations" __version__ = "0.4.0" __triggers__ = "err " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins//errno_lookup" ) icon_path = str(Path(__file__).parent / "errno_lookup") cache_path = Path(v0.cacheLocation()) / "errno_lookup" config_path = Path(v0.configLocation()) / "errno_lookup" data_path = Path(v0.dataLocation()) / "errno_lookup" lines = [ li.split(maxsplit=2) for li in subprocess.check_output( ["errno", "--list"]).decode("utf-8").splitlines() ] codes_d: Dict[str, Tuple[str, str]] = {li[1]: (li[0], li[2]) for li in lines} dev_mode = False # plugin main functions ----------------------------------------------------------------------- def initialize(): # Called when the extension is loaded (ticked in the settings) - blocking
import albert as v0 __title__ = "Timezones lookup" __version__ = "0.4.0" __triggers__ = "tz " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/timezones" ) __py_deps__ = [ "pycountry", "fuzzywuzzy", "tzlocal", "requests", "traceback", "pytz" ] icon_path = str(Path(__file__).parent / "timezones") cache_path = Path(v0.cacheLocation()) / "timezones" config_path = Path(v0.configLocation()) / "timezones" data_path = Path(v0.dataLocation()) / "timezones" country_logos_path = data_path / "logos" dev_mode = False # country code -> cities code_to_cities = dict({k: v for k, v in pytz.country_timezones.items()}) codes = list(code_to_cities.keys()) city_to_code = {vi: k for k, v in pytz.country_timezones.items() for vi in v} cities = list(city_to_code.keys()) country_to_code = { c.name: c.alpha_2 for c in pycountry.countries if c.alpha_2 in codes } country_to_cities = {
from overrides import overrides __title__ = "Anki Interaction - Create new anki cards fast" __title_short__ = "Anki Interaction" # Custom __version__ = "0.4.0" __triggers__ = "anki " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/anki" ) __exec_deps__ = [] __py_deps__ = [] icon_path = str(Path(__file__).parent / "anki") cache_path = Path(v0.cacheLocation()) / "anki" config_path = Path(v0.configLocation()) / "anki" data_path = Path(v0.dataLocation()) / "anki" dev_mode = True # create plugin locations for p in (cache_path, config_path, data_path): p.mkdir(parents=False, exist_ok=True) AVAIL_NOTE_TYPES = { "basic": "Basic", "basic-reverse": "Basic (and reversed card)", "cloze": "Cloze", }
import netifaces from urllib import request from fuzzywuzzy import process import albert as v0 __title__ = "IPs of the host machine" __version__ = "0.4.0" __triggers__ = "ip " __authors__ = "Nikos Koukis" __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins//ipshow" icon_path = str(Path(__file__).parent / "ipshow") cache_path = Path(v0.cacheLocation()) / "ipshow" config_path = Path(v0.configLocation()) / "ipshow" data_path = Path(v0.dataLocation()) / "ipshow" show_ipv4_only = True families = netifaces.address_families dev_mode = False # plugin main functions ----------------------------------------------------------------------- def initialize(): # Called when the extension is loaded (ticked in the settings) - blocking # create plugin locations for p in (cache_path, config_path, data_path):
from pathlib import Path from fuzzywuzzy import process import albert as v0 __title__ = "Stackoverflow: Search suggestions for Stackoverflow" __version__ = "0.4.0" __triggers__ = "so " __authors__ = "Nikos Koukis" __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" __exec_deps__ = [] __py_deps__ = [] icon_path = str(Path(__file__).parent / "search_stackoverflow") cache_path = Path(v0.cacheLocation()) / "search_stackoverflow" config_path = Path(v0.configLocation()) / "search_stackoverflow" data_path = Path(v0.dataLocation()) / "search_stackoverflow" # set it to the corresponding site for the search at hand # see: https://github.com/jarun/googler/blob/master/auto-completion/googler_at/googler_at googler_at = "stackoverflow.com" # special way to handle the url? -------------------------------------------------------------- url_handler = "" url_handler_check_cmd = "" if url_handler_check_cmd: p = subprocess.Popen(url_handler_check_cmd, shell=True) p.communicate() if p.returncode != 0:
n.show() def sort_random(streams): random.shuffle(streams) def sort_favorite(streams): streams.sort(key=operator.attrgetter("favorite"), reverse=True) icon_path = get_icon("saxophone") stop_icon_path = get_icon("stop_icon") repeat_icon_path = get_icon("repeat_icon") cache_path = Path(v0.cacheLocation()) / "saxophone" pids_path = cache_path / "streams_on" data_path = Path(v0.dataLocation()) / "saxophone" json_config = str(Path(__file__).parent / "config" / "saxophone.json") sort_fn = sort_random # sort_fn = sort_favorite vlc_socket = Path("/tmp/cvlc.unix") socket_timeout = 0.2 dev_mode = False # Classes & supplementary functions -----------------------------------------------------------
Notify, ) # isort:skip __title__ = "Countdown/Stopwatch functionalities" __version__ = "0.4.0" __triggers__ = "clock " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/clock" ) countdown_path = str(Path(__file__).parent / "countdown.png") stopwatch_path = str(Path(__file__).parent / "stopwatch.png") sound_path = Path(__file__).parent.absolute() / "bing.wav" cache_path = Path(v0.cacheLocation()) / "clock" config_path = Path(v0.configLocation()) / "clock" data_path = Path(v0.dataLocation()) / "clock" dev_mode = True # plugin main functions ----------------------------------------------------------------------- def play_sound(num): for x in range(num): t = threading.Timer( 0.5 * x, lambda: subprocess.Popen([ "cvlc", sound_path, ]),
from gi.repository import GdkPixbuf, Notify from psutil import Process import albert as v0 __title__ = "Kill Process v2" __version__ = "0.4.0" __triggers__ = "kill " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/killproc" ) icon_path = str(Path(__file__).parent / "logo.png") cache_path = Path(v0.cacheLocation()) / "killproc" config_path = Path(v0.configLocation()) / "killproc" data_path = Path(v0.dataLocation()) / "killproc" dev_mode = True # plugin main functions ----------------------------------------------------------------------- def initialize(): """Called when the extension is loaded (ticked in the settings) - blocking.""" # create plugin locations for p in (cache_path, config_path, data_path): p.mkdir(parents=False, exist_ok=True)
__homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" __simplename__ = "google_translate" __exec_deps__ = ["xclip"] __py_deps__ = [] dev_mode = True ua = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36" url_template = ( "https://translate.googleapis.com/translate_a/single?client=gtx&sl=%s&tl=%s&dt=t&q=%s" ) icon_path = str(Path(__file__).parent / "google_translate") icon_path_hist = str(Path(__file__).parent / "google_translate_gray") cache_path = Path(v0.cacheLocation()) / "google_translate" data_path = Path(v0.dataLocation()) / "google_translate" # have a history of the previous results ------------------------------------------------------ history_path = cache_path / "history.dat" history_deque: Deque[Dict[str, str]] = deque(maxlen=30) if history_path.exists and not history_path.is_file(): raise RuntimeError(f"History path [{history_path}] must be a file, can't handle its type!") if history_path.is_file(): with open(history_path, "r") as f: lines = f.readlines() history_deque.extend([ast.literal_eval(li) for li in lines]) def flush_history(): v0.info(f"Flushing google_translate history -> {history_path}...")
# initial checks ------------------------------------------------------------------------------ # icon ---------------------------------------------------------------------------------------- icon_path = os.path.join(os.path.dirname(__file__), "taskwarrior.svg") icon_path_b = os.path.join(os.path.dirname(__file__), "taskwarrior_blue.svg") icon_path_r = os.path.join(os.path.dirname(__file__), "taskwarrior_red.svg") icon_path_y = os.path.join(os.path.dirname(__file__), "taskwarrior_yellow.svg") icon_path_c = os.path.join(os.path.dirname(__file__), "taskwarrior_cyan.svg") icon_path_g = os.path.join(os.path.dirname(__file__), "taskwarrior_green.svg") # initial configuration ----------------------------------------------------------------------- # should the plugin show relevant some info without the trigger? show_items_wo_trigger = True failure_annotation = "TASKFAILURE" cache_path = Path(v0.cacheLocation()) / __simplename__ config_path = Path(v0.configLocation()) / __simplename__ data_path = Path(v0.dataLocation()) / __simplename__ reminders_tag_path = config_path / "reminders_tag" class FileBackedVar: def __init__(self, varname, convert_fn=str, init_val=None): self._fpath = config_path / varname self._convert_fn = convert_fn if init_val: with open(self._fpath, "w") as f: f.write(str(init_val)) else:
import colour from colour import Color from fuzzywuzzy import process import albert as v0 __title__ = "Color Codes visualisation" __version__ = "0.4.0" __triggers__ = "col " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/colors" ) icon_path = str(Path(__file__).parent / "colors") cache_path = Path(v0.cacheLocation()) / "colors" config_path = Path(v0.configLocation()) / "colors" data_path = Path(v0.dataLocation()) / "colors" dev_mode = True color_names = colour.COLOR_NAME_TO_RGB.keys() h_values = [Color(c).get_hex() for c in color_names] color_names_and_hex = list(color_names) + h_values h_to_color_name = {h: c for h, c in zip(h_values, color_names)} # plugin main functions ----------------------------------------------------------------------- def initialize(): """Called when the extension is loaded (ticked in the settings) - blocking."""
import albert as v0 __title__ = "GMaps - Launch route planner" __version__ = "0.4.0" __triggers__ = "gmaps " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins//gmaps" ) icon_path = v0.iconLookup("gmaps") if not icon_path: icon_path = os.path.join(os.path.dirname(__file__), "gmaps") cache_path = Path(v0.cacheLocation()) / "gmaps" config_path = Path(v0.configLocation()) / "gmaps" data_path = Path(v0.dataLocation()) / "gmaps" gmaps_exe = Path(__file__).parent / "gmaps-cli" / "gmaps-cli.py" available_means = ["walk", "drive", "bicycle", "fly", "transit"] default_means = "transit" # plugin main functions ----------------------------------------------------------------------- def initialize(): # Called when the extension is loaded (ticked in the settings) - blocking # create plugin locations for p in (cache_path, config_path, data_path):
pulse_lock = Lock() __title__ = "PulseAudio - Set I/O Audio devices and Profile" __version__ = "0.4.0" __triggers__ = "p " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins//pulse_control" ) src_icon_path = str(Path(__file__).parent / "source") sink_icon_path = str(Path(__file__).parent / "sink") config_icon_path = str(Path(__file__).parent / "configuration") cache_path = Path(v0.cacheLocation()) / "pulse_control" config_path = Path(v0.configLocation()) / "pulse_control" data_path = Path(v0.dataLocation()) / "pulse_control" dev_mode = True pulse = Pulse("albert-client") # plugin main functions ----------------------------------------------------------------------- def initialize(): """Called when the extension is loaded (ticked in the settings) - blocking.""" # create plugin locations for p in (cache_path, config_path, data_path):
import subprocess import traceback import webbrowser from pathlib import Path import albert as v0 __title__ = "Harakiri mail temporary email" __version__ = "0.4.0" __triggers__ = "harakiri " __authors__ = "Nikos Koukis" __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/harakiri" icon_path = str(Path(__file__).parent / "harakiri") cache_path = Path(v0.cacheLocation()) / "harakiri" config_path = Path(v0.configLocation()) / "harakiri" data_path = Path(v0.dataLocation()) / "harakiri" dev_mode = False # plugin main functions ----------------------------------------------------------------------- def initialize(): """Called when the extension is loaded (ticked in the settings) - blocking.""" # create plugin locations for p in (cache_path, config_path, data_path): p.mkdir(parents=False, exist_ok=True)
import requests import albert as v0 __title__ = "HTTP URL Lookup operations" __version__ = "0.4.0" __triggers__ = "url " __authors__ = "Nikos Koukis" __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins//url_lookup" ) icon_path = str(Path(__file__).parent / "url_lookup") cache_path = Path(v0.cacheLocation()) / "url_lookup" config_path = Path(v0.configLocation()) / "url_lookup" data_path = Path(v0.dataLocation()) / "url_lookup" codes_d = {str(k): v for k, v in requests.status_codes._codes.items()} # plugin main functions ----------------------------------------------------------------------- def initialize(): # Called when the extension is loaded (ticked in the settings) - blocking # create plugin locations for p in (cache_path, config_path, data_path): p.mkdir(parents=False, exist_ok=True)