No description
Find a file
2025-03-28 18:24:24 +04:00
.github Create FUNDING.yml 2025-03-28 18:24:24 +04:00
src update to 2.0.4, - add support for www. web links, remove external deps 2022-12-29 01:21:28 +04:00
tests Update to 2.0.3 to fix tag and test issue 2022-07-07 19:39:01 +04:00
LICENSE Initial commit 2022-06-19 22:25:51 +04:00
LICENSE.txt update to 2.0.4, - add support for www. web links, remove external deps 2022-12-29 01:21:28 +04:00
openurl.nimble update to 2.0.4, - add support for www. web links, remove external deps 2022-12-29 01:21:28 +04:00
README.md update to 2.0.4, - add support for www. web links, remove external deps 2022-12-29 01:21:28 +04:00

openurl

  _                   _
 / \ ._   _  ._  | | |_) |
 \_/ |_) (/_ | | |_| | \ |_
     |            @FOXOMAN

Open Any Url/File in the default App / WebBrowser Sultan Al Isaee ~ foxoman @2022

See MIT LICENSE.txt for details of the license.

Support for MacOS, Windows, Haiku, android/termux, Unix/Linux.

Install

nimble install openurl

API

openurl(PATH) PATH can be a file/folder url or a website or even empty to open blank page in a browser.

  • use raw string for file/folder path ie: openurl(r"c:\dev\folder")
  • url for a website should start with http or https
  • compile with -d:droid to have support for android activity,in termux no need to do that as unix open is supported.

Example

import openurl

when isMainModule:
 echo """
 _                   _
/ \ ._   _  ._  | | |_) |
\_/ |_) (/_ | | |_| | \ |_
    |            @FOXOMAN
"""

 if paramCount() > 0:
   echo "[✔] Open: $1" % [prepare paramStr(1)]
   openUrl(paramStr(1))
 else:
   echo "[✖] No URL input, a blank page will open."
   openUrl()