gola

command module
v0.0.0-...-1041d76 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 10 Imported by: 0

README

gola

A script launcher written in Go.

GitHub Actions Appveyor Codecov

Installation

$ go install github.com/hattya/gola@latest

Usage

$ gola [PATH] [OPTION]...

Configuration

  • dir
    This is used for if the specified path is a directory or a zip file. It is redirected to a file that exists in the specified path.

    Note: The extension does not change.

  • map
    Described in the Example configuration.

Search order for configuration files
  1. gola.json - same location of the executable binary

  2. settings.json - user's configuration directory

    • UNIX
      $XDG_CONFIG_HOME/gola/settings.json

    • macOS
      ~/Library/Application Support/gola/settings.json

    • Windows
      %APPDATA%\gola\settings.json

Example configuration
{
    "dir": [
        // Python can execute a directory or a zip file that
        // contains a __main__.py.
        "__main__.py"
    ],

    "map": {
        // This matches following cases:
        //   - #!/usr/bin/env python
        //   - #!/usr/bin/python
        //   - #!C:\Python27\python.exe
        //   - #!python.exe
        "python": {
            // This matches ".pyw" extension
            ".pyw": "C:\\Python27\\pythonw.exe",

            // This matches all extensions except mapped extensions
            "":     "C:\\Python27\\python.exe"
        },

        // This matches following cases:
        //   - #!/usr/bin/env python3.9
        //   - #!/usr/bin/env python3
        //   - #!/usr/bin/python3.9
        //   - #!/usr/bin/python3
        //   - #!python3.9.exe
        //   - #!python3.exe
        "python3": {
            ".pyw": "C:\\Python39\\pythonw.exe",
            "":     "C:\\Python39\\python.exe"
        }
    }
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL