Skip to content
/ open.py Public

A simple Python terminal file opener and replacement for xdg-open that does not use the global MIME database. Similar to "open" on macOS, you just type "open something" to open a file in an appropriate file viewer. Uses mostly GNOME apps by default. A text editor and hex editor are fallbacks if no other application is a match.

Notifications You must be signed in to change notification settings

slad99/open.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jan 7, 2018
c90a881 · Jan 7, 2018

History

17 Commits
Oct 21, 2017
Jan 7, 2018

Repository files navigation

open.py

Open a file from the command line with an appropriate viewer.

Examples:

open.py image.png

Opens an image in the image viewer.

open.py www.yahoo.com

Opens an URL in the web browser.

open.py

Opens the current folder in the file manager.

open.py /Path to/My File.pdf

Path and file names can have spaces in them, no backslashes or quotes needed. This simplifies pasting a file name e.g. as printed by the Linux locate command.

About

A simple Python terminal file opener and replacement for xdg-open that does not use the global MIME database. Similar to "open" on macOS, you just type "open something" to open a file in an appropriate file viewer. Uses mostly GNOME apps by default. A text editor and hex editor are fallbacks if no other application is a match.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages