2021-10-08 08:52:09 -06:00
|
|
|
# goMP
|
2021-10-18 01:51:09 -06:00
|
|
|
|
2021-10-24 02:13:06 -06:00
|
|
|
![](https://img.shields.io/badge/status-alpha-red)
|
2021-10-18 01:51:09 -06:00
|
|
|
|
2021-10-08 08:52:09 -06:00
|
|
|
MPD client inspired by ncmpcpp written in GO
|
2021-10-11 02:42:51 -06:00
|
|
|
|
2021-11-20 09:43:51 -07:00
|
|
|
https://user-images.githubusercontent.com/51816057/142734222-c211eae5-e497-4f1a-8f3f-9288f5375a8e.mp4
|
2021-11-16 12:09:14 -07:00
|
|
|
|
2021-11-16 12:15:15 -07:00
|
|
|
# Table Of Contents
|
|
|
|
|
2021-11-16 12:09:14 -07:00
|
|
|
- [goMP](#gomp)
|
|
|
|
- [Roadmap](#roadmap)
|
|
|
|
- [Setting Up](#setting-up)
|
|
|
|
- [Installing / Building](#installing--building)
|
|
|
|
- [Configuration](#configuration)
|
|
|
|
- [Image Rendering :](#image-rendering-)
|
|
|
|
- [Key Mappings](#key-mappings)
|
|
|
|
- [Getting Album Art from LastFm API](#getting-album-art-from-lastfm-api)
|
|
|
|
- [Tested on following terminals:](#tested-on-following-terminals)
|
|
|
|
|
2021-10-18 01:58:53 -06:00
|
|
|
# Roadmap
|
|
|
|
|
2021-11-16 12:09:14 -07:00
|
|
|
|
2021-10-18 01:59:23 -06:00
|
|
|
- [ ] Add Functionality to Sort out most played songs
|
2021-11-06 06:49:45 -06:00
|
|
|
- [x] Add a config parser
|
2021-10-24 02:13:06 -06:00
|
|
|
- [x] Image Previews
|
2021-11-12 12:07:37 -07:00
|
|
|
- [x] User Key Mappings
|
2021-11-13 09:32:45 -07:00
|
|
|
- [x] Querying LastFM API for getting Album Art
|
2021-11-20 09:43:51 -07:00
|
|
|
- [x] Fuzzy Searching
|
2021-10-19 07:28:11 -06:00
|
|
|
- [ ] Visual Mode (like vim) for updating playlists
|
2021-10-18 01:58:53 -06:00
|
|
|
|
2021-11-12 02:28:05 -07:00
|
|
|
# Setting Up
|
2021-10-18 01:58:53 -06:00
|
|
|
|
|
|
|
- Music Player Daemon must be setup
|
|
|
|
- Go Should Be Installed ( for building )
|
2021-11-05 02:28:25 -06:00
|
|
|
- Make a YAML/TOML file in ``$HOME/.config/goMP`` named config.yml / config.toml
|
|
|
|
- Read the sample_config.yml for config options
|
2021-10-28 03:02:58 -06:00
|
|
|
|
2021-10-18 01:58:53 -06:00
|
|
|
# Installing / Building
|
|
|
|
|
|
|
|
```bash
|
2021-10-28 03:02:58 -06:00
|
|
|
git clone https://github.com/aditya-K2/goMP &&
|
|
|
|
cd goMP &&
|
|
|
|
go build
|
2021-10-18 01:58:53 -06:00
|
|
|
```
|
2021-10-28 22:54:29 -06:00
|
|
|
|
2021-11-12 02:28:05 -07:00
|
|
|
# Configuration
|
|
|
|
|
2021-11-16 12:09:14 -07:00
|
|
|
## Image Rendering :
|
|
|
|
|
|
|
|
The Default Position of the Image without any configuration assumes that you have no padding or margin so Image will
|
|
|
|
be rendered at different places in different terminals, Also the TUI calculates positions with the help of rows and columns
|
|
|
|
and the image is rendered at pixel positions so the exact position can't be defined [ the app tries its best by calculating
|
|
|
|
the font width and then predicting the position but it is best that you define extra padding and own image width ratio
|
|
|
|
in config.yml. Please Read more about it in the [sample_config](https://github.com/aditya-K2/goMP/blob/master/sample_config.yml)
|
|
|
|
|
2021-11-12 02:28:05 -07:00
|
|
|
## Key Mappings
|
|
|
|
|
|
|
|
Following Keys can be used for Mappings
|
|
|
|
|
|
|
|
| Keys | Using them in Config |
|
|
|
|
|-----------------|-----------------------|
|
|
|
|
| a-z | a-z |
|
|
|
|
| A-Z | A-z |
|
|
|
|
| {,},(,),[,],<,> | {,},(,),[,],<,> |
|
|
|
|
| Enter(Return) | ENTER/RETURN |
|
|
|
|
| Tab | TAB |
|
|
|
|
| Space | SPACE |
|
|
|
|
|
|
|
|
See config/kMap.go for more information
|
|
|
|
|
|
|
|
For mapping a key to some function use the following format:
|
|
|
|
|
|
|
|
|
|
|
|
```yml
|
|
|
|
Function: [ firstMapping, secondMapping, thirdMapping]
|
|
|
|
```
|
|
|
|
for.eg
|
|
|
|
|
|
|
|
|
|
|
|
```yml
|
2021-11-12 12:06:09 -07:00
|
|
|
togglePlayBack : [ "p", "TAB", "[" ] # using the quotes is neccessary.
|
2021-11-12 02:28:05 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
Following functions are provided :
|
|
|
|
|
|
|
|
| Functions |
|
|
|
|
|------------------------------------|
|
2021-11-12 12:06:09 -07:00
|
|
|
| showChildrenContent |
|
|
|
|
| togglePlayBack |
|
|
|
|
| showParentContent |
|
|
|
|
| nextSong |
|
|
|
|
| clearPlaylist |
|
|
|
|
| previousSong |
|
|
|
|
| addToPlaylist |
|
|
|
|
| toggleRandom |
|
|
|
|
| toggleRepeat |
|
|
|
|
| decreaseVolume |
|
|
|
|
| increaseVolume |
|
|
|
|
| navigateToFiles |
|
|
|
|
| navigateToPlaylist |
|
|
|
|
| navigateToMostPlayed |
|
2021-11-16 12:09:14 -07:00
|
|
|
| navigateToSearch |
|
2021-11-12 12:06:09 -07:00
|
|
|
| quit |
|
|
|
|
| stop |
|
|
|
|
| updateDB |
|
|
|
|
| deleteSongFromPlaylist |
|
2021-11-16 12:09:14 -07:00
|
|
|
| FocusSearch |
|
2021-11-12 02:28:05 -07:00
|
|
|
|
2021-11-13 09:32:45 -07:00
|
|
|
## Getting Album Art from [LastFm API](https://www.last.fm/api)
|
|
|
|
|
|
|
|
1. Generate API Key [here](https://www.last.fm/login?next=%2Fapi%2Faccount%2Fcreate%3F_pjax%3D%2523content)
|
2021-11-16 12:09:14 -07:00
|
|
|
|
2021-11-13 09:32:45 -07:00
|
|
|
![Screenshot from 2021-11-13 21-54-54](https://user-images.githubusercontent.com/51816057/141651276-f76a5c7f-65fe-4a1a-b130-18cdf67dd471.png)
|
2021-11-16 12:09:14 -07:00
|
|
|
|
|
|
|
2. Add the api key and api secret to config.yml
|
2021-11-13 09:32:45 -07:00
|
|
|
|
|
|
|
```yml
|
|
|
|
|
|
|
|
GET_COVER_ART_FROM_LAST_FM : "TRUE" # Turn On Getting Album art from lastfm api
|
|
|
|
LASTFM_API_KEY: "YOUR API KEY HERE"
|
|
|
|
LASTFM_API_SECRET: "YOUR API SECRET HERE"
|
|
|
|
```
|
|
|
|
3. Auto correct
|
|
|
|
|
|
|
|
![Screenshot from 2021-11-13 21-59-46](https://user-images.githubusercontent.com/51816057/141651414-1586577a-cab2-48e2-a24b-1053f8634fbe.png)
|
2021-11-16 12:09:14 -07:00
|
|
|
:
|
2021-11-13 09:32:45 -07:00
|
|
|
|
|
|
|
```yml
|
|
|
|
|
|
|
|
LASTFM_AUTO_CORRECT: 1 # 0 means it is turned off
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2021-10-28 22:54:29 -06:00
|
|
|
### Tested on following terminals:
|
|
|
|
|
|
|
|
- Alacritty
|
|
|
|
- ST
|
2021-11-16 12:09:14 -07:00
|
|
|
- URXVT ( URXVT sometimes crashes when downloading coverart from lastfm )
|