otherguy Posted July 31, 2017 Share Posted July 31, 2017 (edited) Alfred Airports Workflow https://github.com/otherguy/alfred-airports-workflow Get information about any airport in the world. Search by IATA code, country, city, etc. When hitting ⏎ Return on a selected item, the workflow tries to be helpful by opening either the airports website or its Wikipedia page if it has one. If it has neither a website nor an entry in Wikipedia, it opens the Apple Maps.app with the location of the airport. When holding down a modifier key, the action can be specified: Modifier Action ⌥ Open the website of the selected airport. ctrl Open the Wikipedia page of the selected airport. ⌘ Show the airports location in Maps.app Edited January 8, 2019 by otherguy Changed URL Link to comment
chrisparker Posted August 23, 2017 Share Posted August 23, 2017 Great workflow. Very useful - thanks! Link to comment
JonathanB Posted August 29, 2017 Share Posted August 29, 2017 Would it be possible to search by ICAO code too? e.g. EGLL - London Heathrow, LFPG - Paris Charles de Gaulle etc. Link to comment
otherguy Posted August 30, 2017 Author Share Posted August 30, 2017 18 hours ago, JonathanB said: Would it be possible to search by ICAO code too? e.g. EGLL - London Heathrow, LFPG - Paris Charles de Gaulle etc. Yes Version 0.1.4 supports ICAO codes as well! Link to comment
otherguy Posted September 11, 2017 Author Share Posted September 11, 2017 0.1.5 fixes an issue with the auto update. You will have to update manually to 0.1.5. Link to comment
Guy Stan Posted September 22, 2017 Share Posted September 22, 2017 I have tried versions 0.1.4 and 0.1.5 and both don't work.Version 0.1.3 works. When I input anything after the keyword "airport", I get an error message. I can't figure out why this is. Can you help? Here is the log: Starting debug for 'Airports' [2017-09-22 12:48:41][ERROR: input.scriptfilter] Code 1: 12:48:41 workflow.py:2249 DEBUG workflow version: 0.1.5 12:48:41 workflow.py:1657 DEBUG reading settings from /Users/[HIDDEN]/Library/Application Support/Alfred 3/Workflow Data/tirol.basecamp.alfredworkflow.airport-codes/settings.json 12:48:41 workflow.py:2532 DEBUG Update check not due 12:48:41 workflow.py:1884 DEBUG loading cached data: /Users/[HIDDEN]/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/tirol.basecamp.alfredworkflow.airport-codes/__workflow_update_status.cpickle 12:48:41 workflow.py:2462 DEBUG update_data: {u'available': False} 12:48:41 workflow.py:1884 DEBUG loading cached data: /Users/[HIDDEN]/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/tirol.basecamp.alfredworkflow.airport-codes/airports.cpickle ./lib/unidecode/__init__.py:46: RuntimeWarning: Argument <class 'dotmap.DotMap'> is not an unicode object. Passing an encoded string will likely have unexpected results. _warn_if_not_unicode(string)12:48:41 workflow.py:2267 ERROR 'DotMap' object is not callable Traceback (most recent call last): File "/Users/[HIDDEN]/Desktop/Dropbox/Alfred3_Sync_Folder/Alfred.alfredpreferences/workflows/user.workflow.684F4439-C6FA-49F8-8470-A4EF92900BD1/workflow/workflow.py", line 2260, in run func(self) File "airports.py", line 100, in main filtered_airports = wf.filter(airportquery, all_airports, key_for_airports, min_score=70, match_on=MATCH_ATOM | MATCH_SUBSTRING, include_score=True) File "/Users/[HIDDEN]/Desktop/Dropbox/Alfred3_Sync_Folder/Alfred.alfredpreferences/workflows/user.workflow.684F4439-C6FA-49F8-8470-A4EF92900BD1/workflow/workflow.py", line 2076, in filter value = key(item).strip() File "airports.py", line 71, in key_for_airports searchkey = '{},{},{},{},{}'.format(unidecode(airport.iata_code), unidecode(airport.name), unidecode(airport.icao_code), unidecode(airport.country), unidecode(airport.city)) File "./lib/unidecode/__init__.py", line 48, in unidecode_expect_ascii bytestring = string.encode('ASCII')TypeError: 'DotMap' object is not callable 12:48:41 workflow.py:2290 DEBUG workflow finished in 0.687 seconds[2017-09-22 12:48:42][ERROR: input.scriptfilter] Code 1: 12:48:42 workflow.py:2249 DEBUG workflow version: 0.1.5 12:48:42 workflow.py:1657 DEBUG reading settings from /Users/[HIDDEN]/Library/Application Support/Alfred 3/Workflow Data/tirol.basecamp.alfredworkflow.airport-codes/settings.json 12:48:42 workflow.py:2532 DEBUG Update check not due 12:48:42 workflow.py:1884 DEBUG loading cached data: /Users/[HIDDEN]/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/tirol.basecamp.alfredworkflow.airport-codes/__workflow_update_status.cpickle 12:48:42 workflow.py:2462 DEBUG update_data: {u'available': False} 12:48:42 workflow.py:1884 DEBUG loading cached data: /Users/[HIDDEN]/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/tirol.basecamp.alfredworkflow.airport-codes/airports.cpickle ./lib/unidecode/__init__.py:46: RuntimeWarning: Argument <class 'dotmap.DotMap'> is not an unicode object. Passing an encoded string will likely have unexpected results. _warn_if_not_unicode(string)12:48:42 workflow.py:2267 ERROR 'DotMap' object is not callable Traceback (most recent call last): File "/Users/[HIDDEN]/Desktop/Dropbox/Alfred3_Sync_Folder/Alfred.alfredpreferences/workflows/user.workflow.684F4439-C6FA-49F8-8470-A4EF92900BD1/workflow/workflow.py", line 2260, in run func(self) File "airports.py", line 100, in main filtered_airports = wf.filter(airportquery, all_airports, key_for_airports, min_score=70, match_on=MATCH_ATOM | MATCH_SUBSTRING, include_score=True) File "/Users/[HIDDEN]/Desktop/Dropbox/Alfred3_Sync_Folder/Alfred.alfredpreferences/workflows/user.workflow.684F4439-C6FA-49F8-8470-A4EF92900BD1/workflow/workflow.py", line 2076, in filter value = key(item).strip() File "airports.py", line 71, in key_for_airports searchkey = '{},{},{},{},{}'.format(unidecode(airport.iata_code), unidecode(airport.name), unidecode(airport.icao_code), unidecode(airport.country), unidecode(airport.city)) File "./lib/unidecode/__init__.py", line 48, in unidecode_expect_ascii bytestring = string.encode('ASCII')TypeError: 'DotMap' object is not callable 12:48:42 workflow.py:2290 DEBUG workflow finished in 0.646 seconds Link to comment
jeffsui Posted September 23, 2017 Share Posted September 23, 2017 (edited) This seems VERY similar to my workflow: https://github.com/jeeftor/alfredAirports Feel free to check it out - may or may not have more features - such as runway configurations and frequencies. Edited September 23, 2017 by jeffsui Link to comment
deanishe Posted September 23, 2017 Share Posted September 23, 2017 On 22/09/2017 at 1:50 PM, Guy Stan said: searchkey = '{},{},{},{},{}'.format(unidecode(airport.iata_code), unidecode(airport.name), unidecode(airport.icao_code), unidecode(airport.country), unidecode(airport.city)) @darkwinternight Why are you using unidecode? All your input is coming in via Alfred-Workflow, so it's guaranteed to be Unicode. unidecode is a massive library, and appears to be unnecessary. Link to comment
Guy Stan Posted September 24, 2017 Share Posted September 24, 2017 On 23/09/2017 at 2:46 AM, jeffsui said: This seems VERY similar to my workflow: https://github.com/jeeftor/alfredAirports Feel free to check it out - may or may not have more features - such as runway configurations and frequencies. Thank Jeff! Yep, I am now using your workflow. Works very well. Thank you! Link to comment
WalterBeiter Posted September 26, 2017 Share Posted September 26, 2017 On 23.9.2017 at 3:46 AM, jeffsui said: This seems VERY similar to my workflow: https://github.com/jeeftor/alfredAirports Feel free to check it out - may or may not have more features - such as runway configurations and frequencies. Hey there, downloaded your workflow, but when I extract the zip i cannot find any workflow, just folders and documents... Link to comment
deanishe Posted September 27, 2017 Share Posted September 27, 2017 @WalterBeiter, @jeffsui and @Guy Stan: Perhaps you should take the discussion of @jeffsui workflow to the appropriate thread. Link to comment
otherguy Posted January 8, 2019 Author Share Posted January 8, 2019 It's been a while but I just released version 0.1.6, hopefully fixing most bugs. Thanks for the hint with unidecode @deanishe, I removed that dependency! Unfortunately, since the GitHub username changed, this is a manual update: https://github.com/otherguy/alfred-airports-workflow/releases/tag/0.1.6 cands 1 Link to comment
chih98 Posted February 21, 2019 Share Posted February 21, 2019 On 9/22/2017 at 6:46 PM, jeffsui said: This seems VERY similar to my workflow: https://github.com/jeeftor/alfredAirports Feel free to check it out - may or may not have more features - such as runway configurations and frequencies. Love this tool, be on the lookout for a pull request soon! I don't know if you're a pilot or not, but as a pilot, I have some small lexical changes I'm going to make so the information is more uniform with other sources of information pilots are used to. I wouldn't be making edits if I didn't already love the project. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now