Created
September 27, 2013 17:24
-
-
Save jonasbits/6731986 to your computer and use it in GitHub Desktop.
url-gcs - url grand central station - to always open link in the active browser of choice, not the "default" browser. And also be able to open all 3 url files over the 3 major systems. (linux, mac, windwos)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import webbrowser | |
parser = argparse.ArgumentParser(description='Forward URL to current browser') | |
parser.add_argument('--url', help="url help line") | |
args = parser.parse_args() | |
print args.url | |
ff = webbrowser.get("firefox") | |
ch = webbrowser.get("chromium-browser") | |
ch.open(args.url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment