def handleQuery(query): with open(os.path.join(configLocation(), "websearch/engines.json")) as f: engines = json.load(f) fallback = None try: fallback = next((e for e in engines if e.get("default", False))) except StopIteration: warning("No fallback search engine specified") if query.isTriggered and query.isValid: q = query.string.split(" ") if len(q) == 0: return [make_item(e) for e in engines] fz = fuzzy_list(q[0], engines) if fallback is not None: # No matching engines if len(fz) == 0: fz.append(fallback) # No shortcut elif q[0] == "" and len(q) > 1: fz = [fallback] # Query trigger if len(fz) > 0 and len(q) > 1 and q[1] != "": return [make_item(e, query=" ".join(q[1:])) for e in fz] # Search engine trigger else: return [make_item(e) for e in fz] return []
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Facebook: Search suggestions for Facebook" __version__ = "0.1.0" __trigger__ = "fb " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_facebook") cache_path = Path(v0.cacheLocation()) / "search_facebook" config_path = Path(v0.configLocation()) / "search_facebook" data_path = Path(v0.dataLocation()) / "search_facebook" # 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 = "facebook.com" # 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)
{%- endif %} import albertv0 as v0 __iid__ = "PythonInterface/{{ cookiecutter.albert_plugin_interface }}" __prettyname__ = "{{ cookiecutter.plugin_short_description }}" __version__ = "{{ cookiecutter.version }}" __trigger__ = "{{ cookiecutter.trigger }} " __author__ = "{{ cookiecutter.author }}" __dependencies__ = [] __homepage__ = "{{ cookiecutter.repo_base_url }}/{{ cookiecutter.plugin_name }}" 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 {%- if cookiecutter.include_keystroke_monitor == 'y' %} # KeystrokeMonitor clss ----------------------------------------------------------------------- class KeystrokeMonitor: def __init__(self): super(KeystrokeMonitor, self) self.thres = 0.01 # s self.prev_time = time.time() self.curr_time = time.time() def report(self): self.prev_time = time.time() self.curr_time = time.time()
__iid__ = "PythonInterface/v0.2" __prettyname__ = "MultiTranslate" __version__ = "1.2" __trigger__ = "mtr " __author__ = "David Britt" __dependencies__ = [] iconPath = iconLookup('config-language') if not iconPath: iconPath = ":python_module" ua = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36" urltmpl = "https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=%s&dt=t&q=%s" urlbrowser = "https://translate.google.com/#auto/%s/%s" configurationFileName = "language_config.json" configuration_directory = os.path.join(configLocation(), __prettyname__) language_configuration_file = os.path.join(configuration_directory, configurationFileName) languages = [] def initialize(): if os.path.exists(language_configuration_file): with open(language_configuration_file) as json_config: languages.extend(json.load(json_config)["languages"]) else: languages.extend([ "en", "zh-CN", "hi", "es", "ru", "pt", "id", "bn", "ar", "ms", "ja", "fr", "de" ]) try:
import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "HTTP URL Lookup operations" __version__ = "0.1.0" __trigger__ = "url " __author__ = "Nikos Koukis" __dependencies__ = [] __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)
__trigger__ = "jira " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/jira-albert-plugin" __simplename__ = "jira" icon_path = os.path.join(os.path.dirname(__file__), "jira_blue") icon_path_br = os.path.join(os.path.dirname(__file__), "jira_bold_red") icon_path_r = os.path.join(os.path.dirname(__file__), "jira_red") icon_path_y = os.path.join(os.path.dirname(__file__), "jira_yellow") icon_path_g = os.path.join(os.path.dirname(__file__), "jira_green") icon_path_lg = os.path.join(os.path.dirname(__file__), "jira_light_green") # plugin locations cache_path = Path(v0.cacheLocation()) / __simplename__ config_path = Path(v0.configLocation()) / __simplename__ data_path = Path(v0.dataLocation()) / __simplename__ pass_path = Path().home() / ".password-store" user_path = config_path / "user" server_path = config_path / "server" api_key_path = pass_path / "jira-albert-plugin" / "api-key.gpg" max_results_to_request = 50 max_results_to_show = 5 fields_to_include = [ "assignee", "issuetype", "priority", "project", "status", "summary" ] prio_to_icon = { "Highest": icon_path_br,
import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "TL;DR pages from albert." __version__ = "0.1.0" __trigger__ = "tldr " __author__ = "Nikos Koukis" __dependencies__ = ["git"] __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(): # Called when the extension is loaded (ticked in the settings) - blocking
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Opensubtitles: Search suggestions for Opensubtitles" __version__ = "0.1.0" __trigger__ = "op " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_opensubtitles") cache_path = Path(v0.cacheLocation()) / "search_opensubtitles" config_path = Path(v0.configLocation()) / "search_opensubtitles" data_path = Path(v0.dataLocation()) / "search_opensubtitles" # 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 = "opensubtitles.org" # 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)
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Amazon: Search suggestions for Amazon" __version__ = "0.1.0" __trigger__ = "ama " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_amazon") cache_path = Path(v0.cacheLocation()) / "search_amazon" config_path = Path(v0.configLocation()) / "search_amazon" data_path = Path(v0.dataLocation()) / "search_amazon" # 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 = "amazon.co.uk" # 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)
__iid__ = "PythonInterface/v0.2" __prettyname__ = "Countdown/Stopwatch functionalities" __version__ = "0.1.0" __trigger__ = "clock " __author__ = "Nikos Koukis" __dependencies__ = [] __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, ]), )
import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Kill Process v2" __version__ = "0.1.0" __trigger__ = "kill " __author__ = "Nikos Koukis" __dependencies__ = [] __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) def finalize():
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Crunchbase: Search suggestions for Crunchbase" __version__ = "0.1.0" __trigger__ = "cb " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_crunchbase") cache_path = Path(v0.cacheLocation()) / "search_crunchbase" config_path = Path(v0.configLocation()) / "search_crunchbase" data_path = Path(v0.dataLocation()) / "search_crunchbase" # 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 = "crunchbase.com" # 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)
__iid__ = "PythonInterface/v0.2" __prettyname__ = "GMaps - Launch route planner" __version__ = "0.1.0" __trigger__ = "gmaps " __author__ = "Nikos Koukis" __dependencies__ = [] __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): p.mkdir(parents=False, exist_ok=True)
__iid__ = "PythonInterface/v0.2" __prettyname__ = "Words: meaning, synonyms, antonyms, examples" __version__ = "0.1.0" __trigger__ = "word " __author__ = "Nikos Koukis" __dependencies__ = [] __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 albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "IPs of the host machine" __version__ = "0.1.0" __trigger__ = "ip " __author__ = "Nikos Koukis" __dependencies__ = [] __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): p.mkdir(parents=False, exist_ok=True)
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Google: Search suggestions for Google" __version__ = "0.1.0" __trigger__ = "gg " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_google") cache_path = Path(v0.cacheLocation()) / "search_google" config_path = Path(v0.configLocation()) / "search_google" data_path = Path(v0.dataLocation()) / "search_google" # 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 = "" # 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)
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Github: Search suggestions for Github" __version__ = "0.1.0" __trigger__ = "gh " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" 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" # 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)
__version__ = "0.1.0" __trigger__ = "jira " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/jira-albert-plugin" icon_path = os.path.join(os.path.dirname(__file__), "jira_blue") icon_path_br = os.path.join(os.path.dirname(__file__), "jira_bold_red") icon_path_r = os.path.join(os.path.dirname(__file__), "jira_red") icon_path_y = os.path.join(os.path.dirname(__file__), "jira_yellow") icon_path_g = os.path.join(os.path.dirname(__file__), "jira_green") icon_path_lg = os.path.join(os.path.dirname(__file__), "jira_light_green") # plugin locations cache_path = Path(v0.cacheLocation()) / "jira" config_path = Path(v0.configLocation()) / "jira" data_path = Path(v0.dataLocation()) / "jira" pass_path = Path().home() / ".password-store" user_path = config_path / "user" server_path = config_path / "server" api_key_path = pass_path / "jira-albert-plugin" / "api-key.gpg" max_results_to_request = 50 max_results_to_show = 5 fields_to_include = ["assignee", "issuetype", "priority", "project", "status", "summary"] prio_to_icon = { "Highest": icon_path_br, "High": icon_path_r, "Medium": icon_path_y,
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Ted: Search suggestions for Ted" __version__ = "0.1.0" __trigger__ = "ted " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_ted") cache_path = Path(v0.cacheLocation()) / "search_ted" config_path = Path(v0.configLocation()) / "search_ted" data_path = Path(v0.dataLocation()) / "search_ted" # 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 = "ted.com" # 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 shutil __iid__ = "PythonInterface/v0.2" __prettyname__ = "Pass - UNIX Password Manager - fuzzy search" __version__ = "0.1.0" __trigger__ = "pass2 " __author__ = "Nikos Koukis" __dependencies__ = [] __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/")))) # passwords cache ----------------------------------------------------------------------------- class PasswordsCacheManager: def __init__(self): self.refresh = True def get_all_gpg_files(self, root: Path) -> Iterable[Path]: """Get a list of all the ggp-encrypted files under the given dir.""" self.refresh = False
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Quora: Search suggestions for Quora" __version__ = "0.1.0" __trigger__ = "q " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_quora") cache_path = Path(v0.cacheLocation()) / "search_quora" config_path = Path(v0.configLocation()) / "search_quora" data_path = Path(v0.dataLocation()) / "search_quora" # 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 = "quora.com" # 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)
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Cppreference: Search suggestions for Cppreference" __version__ = "0.1.0" __trigger__ = "cpp " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_cppreference") cache_path = Path(v0.cacheLocation()) / "search_cppreference" config_path = Path(v0.configLocation()) / "search_cppreference" data_path = Path(v0.dataLocation()) / "search_cppreference" # 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 = "en.cppreference.com" # 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)
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Reddit: Search suggestions for Reddit" __version__ = "0.1.0" __trigger__ = "r " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_reddit") cache_path = Path(v0.cacheLocation()) / "search_reddit" config_path = Path(v0.configLocation()) / "search_reddit" data_path = Path(v0.dataLocation()) / "search_reddit" # 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 = "reddit.com" # 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)
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Askubuntu: Search suggestions for Askubuntu" __version__ = "0.1.0" __trigger__ = "askubuntu " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_askubuntu") cache_path = Path(v0.cacheLocation()) / "search_askubuntu" config_path = Path(v0.configLocation()) / "search_askubuntu" data_path = Path(v0.dataLocation()) / "search_askubuntu" # 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 = "askubuntu.com" # 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)
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Distrowatch: Search suggestions for Distrowatch" __version__ = "0.1.0" __trigger__ = "distrowatch " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_distrowatch") cache_path = Path(v0.cacheLocation()) / "search_distrowatch" config_path = Path(v0.configLocation()) / "search_distrowatch" data_path = Path(v0.dataLocation()) / "search_distrowatch" # 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 = "distrowatch.com" # 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)
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Rottentomatoes: Search suggestions for Rottentomatoes" __version__ = "0.1.0" __trigger__ = "rt " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_rottentomatoes") cache_path = Path(v0.cacheLocation()) / "search_rottentomatoes" config_path = Path(v0.configLocation()) / "search_rottentomatoes" data_path = Path(v0.dataLocation()) / "search_rottentomatoes" # 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 = "rottentomatoes.com" # 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)
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Stackoverflow: Search suggestions for Stackoverflow" __version__ = "0.1.0" __trigger__ = "so " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" 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" # 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)
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Kernel: Search suggestions for Kernel" __version__ = "0.1.0" __trigger__ = "kernel " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_kernel") cache_path = Path(v0.cacheLocation()) / "search_kernel" config_path = Path(v0.configLocation()) / "search_kernel" data_path = Path(v0.dataLocation()) / "search_kernel" # 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 = "kernel.org" # 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 albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "User-defined abbreviations read/written a file" __version__ = "0.1.0" __trigger__ = "ab " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = ( "https://github.com/bergercookie/awesome-albert-plugins/blob/master/plugins/abbr" ) icon_path = str(Path(__file__).parent / "abbr") cache_path = Path(v0.cacheLocation()) / "abbr" config_path = Path(v0.configLocation()) / "abbr" data_path = Path(v0.dataLocation()) / "abbr" dev_mode = True abbr_store_fname = config_path / "fname" abbr_store_sep = config_path / "separator" abbreviations_path = Path() abbr_latest_hash = "" abbr_latest_d: Dict[str, str] = {} abbr_latest_d_bi: Dict[str, str] = {} split_at = ":" # plugin main functions ----------------------------------------------------------------------- if abbr_store_fname.is_file(): with open(abbr_store_fname, "r") as f:
from fuzzywuzzy import process import albertv0 as v0 __iid__ = "PythonInterface/v0.2" __prettyname__ = "Howstuffworks: Search suggestions for Howstuffworks" __version__ = "0.1.0" __trigger__ = "hsw " __author__ = "Nikos Koukis" __dependencies__ = [] __homepage__ = "https://github.com/bergercookie/awesome-albert-plugins" icon_path = str(Path(__file__).parent / "search_howstuffworks") cache_path = Path(v0.cacheLocation()) / "search_howstuffworks" config_path = Path(v0.configLocation()) / "search_howstuffworks" data_path = Path(v0.dataLocation()) / "search_howstuffworks" # 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 = "howstuffworks.com" # 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)