https://github.com/hattya/gola
A script launcher written in Go
https://github.com/hattya/gola
Last synced: 3 months ago
JSON representation
A script launcher written in Go
- Host: GitHub
- URL: https://github.com/hattya/gola
- Owner: hattya
- License: mit
- Created: 2011-07-09T08:26:11.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2025-05-21T12:43:33.000Z (about 1 year ago)
- Last Synced: 2025-05-21T13:55:12.359Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 48.8 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# gola
A script launcher written in [Go](https://go.dev/).
[](https://github.com/hattya/gola/actions/workflows/ci.yml)
[](https://ci.appveyor.com/project/hattya/gola)
[](https://codecov.io/gh/hattya/gola)
## Installation
```console
$ go install github.com/hattya/gola@latest
```
## Usage
```console
$ 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](#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
```javascript
{
"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"
}
}
}
```