From 5406e0069fd9662f84788983940930c33b933882 Mon Sep 17 00:00:00 2001 From: Onur ULUSOY Date: Wed, 29 May 2024 16:29:38 +0300 Subject: [PATCH] Added new modules --- README.md | 7 +++++++ tiger/tools/app/close.py | 19 +++++++++++++++++++ tiger/tools/app/open.py | 19 +++++++++++++++++++ tiger/tools/browser/open_url.py | 20 ++++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 tiger/tools/app/close.py create mode 100644 tiger/tools/app/open.py create mode 100644 tiger/tools/browser/open_url.py diff --git a/README.md b/README.md index e76390b..4e5b1e7 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,13 @@ pip3 install upsonic We are working on Upsonic and the tools that inside the `tools` folder is sending to public tiger in each release. We are aiming to create tools without any api key and just like normal human events like searching on google with mouse, keyboard and browser. +- App + - open + - close + +- browser + - open_url + - Interpreter - python diff --git a/tiger/tools/app/close.py b/tiger/tools/app/close.py new file mode 100644 index 0000000..58cb424 --- /dev/null +++ b/tiger/tools/app/close.py @@ -0,0 +1,19 @@ + +def close(app_name) -> bool: + """ + + :param app_name: str: + + """ + try: + from AppOpener import close + close(app_name, throw_error=True) + return True + except: + return False + + + +tool_name = "app.close" +tool_obj = close +tool_requirements = ["AppOpener==1.7"] diff --git a/tiger/tools/app/open.py b/tiger/tools/app/open.py new file mode 100644 index 0000000..f59c9a8 --- /dev/null +++ b/tiger/tools/app/open.py @@ -0,0 +1,19 @@ + +def open(app_name) -> bool: + """ + + :param app_name: str: + + """ + try: + from AppOpener import open + open(app_name, throw_error=True) + return True + except: + return False + + + +tool_name = "app.open" +tool_obj = open +tool_requirements = ["AppOpener==1.7"] diff --git a/tiger/tools/browser/open_url.py b/tiger/tools/browser/open_url.py new file mode 100644 index 0000000..5cd2d3e --- /dev/null +++ b/tiger/tools/browser/open_url.py @@ -0,0 +1,20 @@ +import webbrowser + + +def open_url(url) -> bool: + """ + + :param url: str: + + """ + try: + webbrowser.open(url) + return True + except: + return False + + + +tool_name = "browser.open_url" +tool_obj = open_url +tool_requirements = []