Skip to content

Commit

Permalink
Added more icons and pretty factor
Browse files Browse the repository at this point in the history
  • Loading branch information
jeeftor committed Dec 19, 2016
1 parent eb159d5 commit fffaa54
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 6 deletions.
Binary file added images/airnav.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/balloonport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/heliport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added images/large_airport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/medium_airport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/seaplane_base.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/small_airport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sketch/Icons.sketch
Binary file not shown.
14 changes: 9 additions & 5 deletions src/airportDetails.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ def get_airport_details_from_icao(icao):
flag = "\\U000{}\\U000{}\\U0000FE0F".format(l1, l2)

wf.add_item(str(name).decode('utf-8', 'ignore') + " " + flag.decode('unicode_escape'), municipality + ", " + iso_region)
wf.add_item("Identifiers","ICAO: {} IATA: {} Local: {}it GPS: {}".format(icao, iata_code, local_code, gps_code))
wf.add_item("Identifiers","ICAO: {} IATA: {} Local: {}it GPS: {}".format(icao, iata_code, local_code, gps_code), icon="images/icao.png")
wf.add_item("Location", subtitle=lla, icon="images/map.png", valid=True, arg=google_link)

# IF USA we have airnav
if iso_country == "US":
airnav_link = 'http://www.airnav.com/airport/{}'.format(icao)
wf.add_item("Airnav", "Open " + airnav_link, arg=airnav_link, valid=True,
icon='http://thereviewsolution.com/img/rs/airnav.jpg')
icon='images/airnav.png')


fl = wf.add_item("See Flights", "Open flightradar 24", arg=fr24link, valid=True, icon="images/radar.png")
Expand All @@ -64,11 +64,15 @@ def get_airport_details_from_icao(icao):

if wikipedia_link != "":
wf.add_item('Wiki','Open wikipedia link to airport', arg=wikipedia_link, icon="images/wiki.png", valid=True)



if home_link != "":
hl = wf.add_item('Airport Website', 'Open the airports website', arg=home_link, icon="images/web.png", valid=True)
hl.add_modifier("alt",subtitle='Edit the airport database', arg='http://ourairports.com/airports/' + icao.upper() + '/edit.html', valid=True)
hl_arg = home_link
else:
wf.add_item('Update Airport Info','Edit the airport database', icon="images/web.png", arg='http://ourairports.com/airports/' + icao.upper() + '/edit.html', valid=True)
hl_arg = 'http://ourairports.com/airports/' + icao.upper()
hl = wf.add_item('Airport Website', 'Open the airports website', arg=hl_arg, icon="images/web.png", valid=True)
hl.add_modifier("alt",subtitle='Edit the airport database', arg='http://ourairports.com/airports/' + icao.upper() + '/edit.html', valid=True)

get_runways(icao)

Expand Down
9 changes: 8 additions & 1 deletion src/searchAirports.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def main(wf):
# print icao, iata_code, local_code, name, home_link, wikipedia_link
codes = filter(None, set([icao, iata_code, gps_code, local_code]))




# print name, codes
# \\U0001F1F2\\U0001F1FD\\U0000FE0F
flag = ""
Expand All @@ -89,7 +92,11 @@ def main(wf):
arg = icao
valid = 'True'

value_map = {'subtitle':subtitle, 'title':title, 'arg':arg, 'valid':valid}
value_map = {'subtitle':subtitle, 'title':title, 'arg':arg, 'valid':valid, 'icon':"images/{}.png".format(apt_type)}




if any(filter(lambda x: query.upper() in x, codes)):
code_match.append(value_map)
elif query.upper() in name.upper():
Expand Down

0 comments on commit fffaa54

Please sign in to comment.