Skip to content

Commit

Permalink
Merge pull request #2 from alastairhm/all_engines
Browse files Browse the repository at this point in the history
Adding search in all engines option
  • Loading branch information
alastairhm authored Oct 20, 2022
2 parents 3a2dca2 + 2e6a17e commit 4f6fd48
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion search.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@ def __init__(self, engine="default"):
self.search_url = self.settings.get(self.engine, self.default_url)

def search(self, term=pyperclip.paste()):
"""Search"""
"""Search passed term or clipboard value"""
webbrowser.open(self.search_url + term)

def engines(self):
"""Output Engines"""
for name in self.settings:
print(name)

def all(self, term=pyperclip.paste()):
"""Search using all defined search engines"""
for key, values in self.settings.items():
if key != "default":
webbrowser.open(values + term)


if __name__ == "__main__":

Expand Down

0 comments on commit 4f6fd48

Please sign in to comment.