Coder Social home page Coder Social logo

grump's Introduction

grump

Great but
Really
Ugly
Media
Player

A very minimal CLI audio player.

Features

  • cross-platform
  • ID3 tag scanning
  • Supports
    • FLAC
    • MP3
    • OGG/Vorbis
    • WAV
  • Tag Editor
  • Quick Ratings
  • Playback Effects (speed up/down)

Install

Linux

sudo apt install libasound2-dev build-essential
go get github.com/dhulihan/grump

Mac OSX

brew tap dhulihan/grump
brew install grump

Alternatively, you can install the latest (possibly unreleased) version:

go get github.com/dhulihan/grump
  • You can also download pre-build binaries on the releases page.

Usage

grump path/to/some/audio/files

Keyboard Shortcuts

┌───────┬───────────────────────────────────────────────────┐
│space  │pause/unpause                                      │
├───────┼───────────────────────────────────────────────────┤
│escape │stop track                                         │
├───────┼───────────────────────────────────────────────────┤
│d      │describe currently playing track                   │
├───────┼───────────────────────────────────────────────────┤
│e      │edit currently playing track                       │
├───────┼───────────────────────────────────────────────────┤
│delete │delete currently playing track (with prompt)       │
├───────┼───────────────────────────────────────────────────┤
│l      │view logs page                                     │
├───────┼───────────────────────────────────────────────────┤
│left   │seek forward (does not work on flac)               │
├───────┼───────────────────────────────────────────────────┤
│right  │seek backward  (does not work on flac)             │
├───────┼───────────────────────────────────────────────────┤
│]      │play next track                                    │
├───────┼───────────────────────────────────────────────────┤
│[      │play previous track                                │
├───────┼───────────────────────────────────────────────────┤
│=      │volume up                                          │
├───────┼───────────────────────────────────────────────────┤
│-      │volume down                                        │
├───────┼───────────────────────────────────────────────────┤
│+      │speed up                                           │
├───────┼───────────────────────────────────────────────────┤
│_      │speed down                                         │
├───────┼───────────────────────────────────────────────────┤
│q      │quit                                               │
├───────┼───────────────────────────────────────────────────┤
│0      │set rating of currently playing track to 🌑        │
├───────┼───────────────────────────────────────────────────┤
│1      │set rating of currently playing track to 🌕        │
├───────┼───────────────────────────────────────────────────┤
│2      │set rating of currently playing track to 🌕🌕      │
├───────┼───────────────────────────────────────────────────┤
│3      │set rating of currently playing track to 🌕🌕🌕    │
├───────┼───────────────────────────────────────────────────┤
│4      │set rating of currently playing track to 🌕🌕🌕🌕  │
├───────┼───────────────────────────────────────────────────┤
│5      │set rating of currently playing track to 🌕🌕🌕🌕🌕│
├───────┼───────────────────────────────────────────────────┤

Configuration

grump will load a ~/.grump.yaml file if present.

# log level. options: trace, debug, info, warn, error
log_level: info

# if true, write application logs to a file
log_to_file: false

# write logs to this file, if enabled
log_file: grump.log

Development

Building

# build for linux (linux host)
./scripts/build-linux.sh

# build for linux (non-linux host)
docker-compose run build-linux

# build for darwin (darwin host)
./scripts/build-darwin.sh

Releasing

VERSION=0.0.0
git tag $VERSION
git push origin $VERSION
goreleaser release --rm-dist

grump's People

Contributors

dhulihan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grump's Issues

fatal error when playing free bitrate format mp3

Currently grump crashes when attempting to play a free bitrate mp3

time="2022-03-26T00:43:15-06:00" level=fatal msg="could not play file" error="mp3: mp3: free bitrate format is not supported. Header word is 0xfffe003b at position 8084177"

search

/ to search.

Ideas

  • Radio Button to select Artist/Track/Title (currently preferred)
  • Fuzzy match artist/track/title

go get failure

Hi,

I just tried to Go get grump, but ran into the following error. Just to let you know.

$ go get -v github.com/dhulihan/grump
go: downloading github.com/dhulihan/grump v0.0.0-20201015025354-2413accc6e5c
get "golang.org/x/sys": found meta tag vcs.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at //golang.org/x/sys?go-get=1
go get: github.com/dhulihan/grump@none updating to
	github.com/dhulihan/[email protected] requires
	github.com/dhulihan/[email protected]: invalid version: unknown revision 58c0f4d7150f

Cheers,
Robin

Edit: oh, and just as a note, seek support for FLAC is soon to be added in Beep. faiface/beep#111

license?

Hi. Cool project. I do not see any mention of the license associated with this project :(

windows support

oto has support for windows. Let's see if we can get grump running in a windows environment.

go install error "OpenAL is deprecated"

Hello, @dhulihan

Thank you for your awesome work.

I come across problem when trying to go get it.

OS:
Mac OS X 10.15.5

go version go1.14.3 darwin/amd64

command:
$ go get github.com/dhulihan/grump

output:

go: downloading github.com/dhulihan/grump v0.0.0-20200522233023-30f56ab8718c
go: github.com/dhulihan/grump upgrade => v0.0.0-20200522233023-30f56ab8718c
go: downloading github.com/sirupsen/logrus v1.5.0
go: downloading github.com/gdamore/tcell v1.3.0
go: downloading github.com/rivo/tview v0.0.0-20200404204604-ca37f83cb2e7
go: downloading github.com/dhowden/tag v0.0.0-20191122115059-7e5c04feccd8
go: downloading github.com/faiface/beep v1.0.2
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: downloading github.com/lucasb-eyer/go-colorful v1.0.3
go: downloading github.com/gdamore/encoding v1.0.0
go: downloading golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4
go: downloading github.com/rivo/uniseg v0.1.0
go: downloading github.com/mattn/go-runewidth v0.0.8
go: downloading github.com/hajimehoshi/go-mp3 v0.1.1
go: downloading github.com/mewkiz/flac v1.0.5
go: downloading github.com/hajimehoshi/oto v0.3.1
go: downloading github.com/jfreymuth/oggvorbis v1.0.0
go: downloading github.com/gopherjs/gopherwasm v1.0.0
go: downloading golang.org/x/mobile v0.0.0-20180806140643-507816974b79
go: downloading github.com/jfreymuth/vorbis v1.0.0
go: downloading github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c
go: downloading golang.org/x/exp v0.0.0-20180710024300-14dda7b62fcd
go: downloading golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81
# github.com/hajimehoshi/oto
../go/pkg/mod/github.com/hajimehoshi/[email protected]/driver_openal.go:35:22: warning: 'alcOpenDevice' is deprecated: first deprecated in macOS 10.15 - OpenAL is de
precated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:209:38: note: 'alcOpenDevice' has been explicitly
 marked deprecated here
../go/pkg/mod/github.com/hajimehoshi/[email protected]/driver_openal.go:39:11: warning: 'alcCloseDevice' is deprecated: first deprecated in macOS 10.15 - OpenAL is d
eprecated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:211:38: note: 'alcCloseDevice' has been explicitl
y marked deprecated here
../go/pkg/mod/github.com/hajimehoshi/[email protected]/driver_openal.go:43:22: warning: 'alcCreateContext' is deprecated: first deprecated in macOS 10.15 - OpenAL is
 deprecated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:191:38: note: 'alcCreateContext' has been explici
tly marked deprecated here
../go/pkg/mod/github.com/hajimehoshi/[email protected]/driver_openal.go:47:11: warning: 'alcGetError' is deprecated: first deprecated in macOS 10.15 - OpenAL is depr
ecated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:218:38: note: 'alcGetError' has been explicitly m
arked deprecated here
../go/pkg/mod/github.com/hajimehoshi/[email protected]/driver_openal.go:51:4: warning: 'alcMakeContextCurrent' is deprecated: first deprecated in macOS 10.15 - OpenA
L is deprecated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:193:38: note: 'alcMakeContextCurrent' has been ex
plicitly marked deprecated here
../go/pkg/mod/github.com/hajimehoshi/[email protected]/driver_openal.go:55:4: warning: 'alcDestroyContext' is deprecated: first deprecated in macOS 10.15 - OpenAL is
 deprecated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:199:38: note: 'alcDestroyContext' has been explic
itly marked deprecated here
cgo-gcc-prolog:152:2: warning: 'alBufferData' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Wdeprecated-de
clarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:601:25: note: 'alBufferData' has been explicitly m
arked deprecated here
cgo-gcc-prolog:166:2: warning: 'alDeleteBuffers' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Wdeprecated
-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:595:25: note: 'alDeleteBuffers' has been explicitl
y marked deprecated here
cgo-gcc-prolog:180:2: warning: 'alDeleteSources' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Wdeprecated
-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:501:25: note: 'alDeleteSources' has been explicitl
y marked deprecated here
cgo-gcc-prolog:194:2: warning: 'alGenBuffers' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Wdeprecated-de
clarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:592:25: note: 'alGenBuffers' has been explicitly m
arked deprecated here
cgo-gcc-prolog:208:2: warning: 'alGenSources' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Wdeprecated-de
clarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:498:25: note: 'alGenSources' has been explicitly m
arked deprecated here
cgo-gcc-prolog:222:2: warning: 'alGetSourcei' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:530:25: note: 'alGetSourcei' has been explicitly marked deprecated here
cgo-gcc-prolog:238:35: warning: 'alGetString' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:382:34: note: 'alGetString' has been explicitly marked deprecated here
cgo-gcc-prolog:254:2: warning: 'alSourcePlay' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:558:25: note: 'alSourcePlay' has been explicitly marked deprecated here
cgo-gcc-prolog:268:2: warning: 'alSourceQueueBuffers' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:572:25: note: 'alSourceQueueBuffers' has been explicitly marked deprecated here
cgo-gcc-prolog:281:2: warning: 'alSourceRewind' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:564:25: note: 'alSourceRewind' has been explicitly marked deprecated here
cgo-gcc-prolog:294:2: warning: 'alSourceStop' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:561:25: note: 'alSourceStop' has been explicitly marked deprecated here
cgo-gcc-prolog:308:2: warning: 'alSourceUnqueueBuffers' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:574:25: note: 'alSourceUnqueueBuffers' has been explicitly marked deprecated here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.