1.0.0 🎉
This commit is contained in:
parent
d7d3831d7d
commit
18d8a08449
|
@ -0,0 +1,2 @@
|
||||||
|
patreon: sampler
|
||||||
|
custom: ['http://sampler.dev/#pricing']
|
|
@ -9,16 +9,18 @@ Sampler is a tool for shell commands execution, visualization and alerting. Conf
|
||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
```bash
|
```bash
|
||||||
sudo curl -Lo /usr/local/bin/sampler https://github.com/sqshq/sampler/releases/download/v0.9.1-beta/sampler-0.9.1-darwin-amd64
|
sudo curl -Lo /usr/local/bin/sampler https://github.com/sqshq/sampler/releases/download/v1.0.0/sampler-1.0.0-darwin-amd64
|
||||||
sudo chmod +x /usr/local/bin/sampler
|
sudo chmod +x /usr/local/bin/sampler
|
||||||
```
|
```
|
||||||
### Linux
|
### Linux
|
||||||
```bash
|
```bash
|
||||||
sudo wget https://github.com/sqshq/sampler/releases/download/v0.9.1-beta/sampler-0.9.1-linux-amd64 -O /usr/local/bin/sampler
|
sudo wget https://github.com/sqshq/sampler/releases/download/v1.0.0/sampler-1.0.0-linux-amd64 -O /usr/local/bin/sampler
|
||||||
sudo chmod +x /usr/local/bin/sampler
|
sudo chmod +x /usr/local/bin/sampler
|
||||||
```
|
```
|
||||||
### Windows
|
### Windows
|
||||||
[download .exe](https://github.com/sqshq/sampler/releases/download/v0.9.1-beta/sampler-0.9.1-windows)
|
Recommended to use with advanced console emulators, e.g. [Cmder](https://cmder.net/)
|
||||||
|
|
||||||
|
[Download .exe](https://github.com/sqshq/sampler/releases/download/v1.0.0/sampler-1.0.0-windows-amd64.exe)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
You specify shell commands, Sampler executes them with a required rate. The output is used for visualization.
|
You specify shell commands, Sampler executes them with a required rate. The output is used for visualization.
|
||||||
|
|
|
@ -14,7 +14,7 @@ const (
|
||||||
ColumnsCount = 80
|
ColumnsCount = 80
|
||||||
RowsCount = 40
|
RowsCount = 40
|
||||||
AppTitle = "sampler"
|
AppTitle = "sampler"
|
||||||
AppVersion = "0.9.1"
|
AppVersion = "1.0.0"
|
||||||
AppLicenseWarning = "UNLICENSED. FOR NON-COMMERCIAL USE ONLY. VISIT WWW.SAMPLER.DEV"
|
AppLicenseWarning = "UNLICENSED. FOR NON-COMMERCIAL USE ONLY. VISIT WWW.SAMPLER.DEV"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
6
main.go
6
main.go
|
@ -76,9 +76,6 @@ func main() {
|
||||||
statistics := metadata.GetStatistics(cfg)
|
statistics := metadata.GetStatistics(cfg)
|
||||||
license := metadata.GetLicense()
|
license := metadata.GetLicense()
|
||||||
|
|
||||||
defer handleCrash(statistics, opt, bc)
|
|
||||||
defer updateStatistics(cfg, time.Now())
|
|
||||||
|
|
||||||
if opt.LicenseKey != nil {
|
if opt.LicenseKey != nil {
|
||||||
registerLicense(statistics, opt, bc)
|
registerLicense(statistics, opt, bc)
|
||||||
}
|
}
|
||||||
|
@ -89,6 +86,9 @@ func main() {
|
||||||
player := asset.NewAudioPlayer()
|
player := asset.NewAudioPlayer()
|
||||||
defer player.Close()
|
defer player.Close()
|
||||||
|
|
||||||
|
defer handleCrash(statistics, opt, bc)
|
||||||
|
defer updateStatistics(cfg, time.Now())
|
||||||
|
|
||||||
palette := console.GetPalette(*cfg.Theme)
|
palette := console.GetPalette(*cfg.Theme)
|
||||||
lout := layout.NewLayout(component.NewStatusLine(*opt.ConfigFile, palette, license),
|
lout := layout.NewLayout(component.NewStatusLine(*opt.ConfigFile, palette, license),
|
||||||
component.NewMenu(palette), component.NewIntro(palette), component.NewNagWindow(palette))
|
component.NewMenu(palette), component.NewIntro(palette), component.NewNagWindow(palette))
|
||||||
|
|
|
@ -41,6 +41,7 @@ func PersistStatistics(config *config.Config, uptime time.Duration) *Statistics
|
||||||
statistics.ComponentsCount = countComponentsPerType(config)
|
statistics.ComponentsCount = countComponentsPerType(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
statistics.Version = console.AppVersion
|
||||||
statistics.WindowWidth = w
|
statistics.WindowWidth = w
|
||||||
statistics.WindowHeight = h
|
statistics.WindowHeight = h
|
||||||
statistics.LaunchCount += 1
|
statistics.LaunchCount += 1
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
const (
|
const (
|
||||||
macOSDir = "/Library/Application Support/Sampler"
|
macOSDir = "/Library/Application Support/Sampler"
|
||||||
linuxDir = "/.config/Sampler"
|
linuxDir = "/.config/Sampler"
|
||||||
windowsDir = "%LOCALAPPDATA%\\Sampler"
|
windowsDir = "Sampler"
|
||||||
)
|
)
|
||||||
|
|
||||||
func fileExists(filename string) bool {
|
func fileExists(filename string) bool {
|
||||||
|
@ -20,12 +20,13 @@ func fileExists(filename string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func getPlatformStoragePath(filename string) string {
|
func getPlatformStoragePath(filename string) string {
|
||||||
home, _ := os.UserHomeDir()
|
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "darwin":
|
case "darwin":
|
||||||
|
home, _ := os.UserHomeDir()
|
||||||
return filepath.Join(home, macOSDir, filename)
|
return filepath.Join(home, macOSDir, filename)
|
||||||
case "windows":
|
case "windows":
|
||||||
return filepath.Join(home, windowsDir, filename)
|
cache, _ := os.UserCacheDir()
|
||||||
|
return filepath.Join(cache, windowsDir, filename)
|
||||||
default:
|
default:
|
||||||
return filepath.Join(linuxDir, filename)
|
return filepath.Join(linuxDir, filename)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue