Skip to content

Commit

Permalink
Improve clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
NastuzziSamy committed Feb 26, 2021
1 parent 1a52cd5 commit 0b470d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def on_event(self, event, extension):

return RenderResultListAction([
ExtensionResultItem(icon='images/me.png',
name="My local/private IP Information",
name="My local/private IP Information:",
description="Select for public information",
on_enter=SetUserQueryAction(extension.preferences['iplik'] + ' '))
] + get_local_items())
Expand All @@ -76,7 +76,7 @@ def on_event(self, event, extension):

if query == 'hosts':
return RenderResultListAction(show_hosts_items())

host_ip = get_host_ip(query)
items = []

Expand All @@ -95,7 +95,7 @@ def on_event(self, event, extension):
liste = [i if extension.preferences[i] == "Yes" else "" for i in extension.preferences.keys()]
liste_str = ",".join(liste)
json_data = get("https://ip-api.com/json/{}?fields={}".format(query, liste_str)).json()

if 'message' in json_data.keys():
if host_ip is not None:
return RenderResultListAction(items + [
Expand Down Expand Up @@ -125,10 +125,10 @@ def on_event(self, event, extension):
on_enter=CopyToClipboardAction(str(json_data[i])))
for i in liste_sirali
]

if not query:
o = ExtensionResultItem(icon='images/me.png',
name="My Public IP Information",
name="My Public IP Information:",
description="Select for local/private information",
on_enter=SetUserQueryAction(extension.preferences['iplik'] + ' local'))
items = [o] + items
Expand Down
Empty file added src/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion src/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

def generate_local_item(name, ip, description):
return ExtensionResultItem(icon='images/icon.png',
name='{}: {}'.format(name, ip),
name='{} - {}'.format(name, ip),
description=description,
on_enter=CopyToClipboardAction(ip)
)
Expand Down

0 comments on commit 0b470d7

Please sign in to comment.