Skip to content

Instantly share code, notes, and snippets.

@jonasbits
Created September 27, 2013 17:24
Show Gist options
  • Save jonasbits/6731986 to your computer and use it in GitHub Desktop.
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)
#!/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