How to register python scripts as a web browser using mac OSX
I
have a python script that accepts URLs and displays them, and I want to register it in the operating system (mac OS El Captain/Sierra) so that the script appears in the list of possible default web browsers (in the General panel of System Preferences.
I assume I have to turn the script into an application (e.g. via Platypus) and then modify the Info.plist
file of the application package or another configuration file. But what key do I have to set? How does this register n with the system?
Note: I don’t want to register a script for the new URI protocol, just add the script to a possible default browser that handles HTTP etc….
Solution
The platypus itself can do that! In the main settings window
Select Accept dropped elements. Then press the newly appeared Settings button and in the Drop Settings dialog box
Check Register as a URI scheme handler and add the desired URI scheme. Run the generated application at least once, and then it should appear in the list of possible default web browsers.