UPDATE README and add config parser
This commit is contained in:
parent
5ad7b90844
commit
699c5ccb9a
29
README.md
29
README.md
@ -9,7 +9,7 @@ https://user-images.githubusercontent.com/51816057/138585868-92aff5bd-dd7e-46af-
|
||||
# Roadmap
|
||||
|
||||
- [ ] Add Functionality to Sort out most played songs
|
||||
- [ ] Add a config parser ( preferably ***YAML*** )
|
||||
- [x] Add a config parser
|
||||
- [x] Image Previews
|
||||
- [ ] Fuzzy Searching
|
||||
- [ ] Visual Mode (like vim) for updating playlists
|
||||
@ -19,35 +19,14 @@ https://user-images.githubusercontent.com/51816057/138585868-92aff5bd-dd7e-46af-
|
||||
|
||||
- Music Player Daemon must be setup
|
||||
- Go Should Be Installed ( for building )
|
||||
- Your mpd.conf file in ``~/.config/mpd/mpd.conf`` is automatically parsed to get ``music_directory``
|
||||
- In [globals.go](https://github.com/aditya-K2/goMP/blob/master/globals.go) set the path for your default Image
|
||||
|
||||
```go
|
||||
var path string = "YOUR DEFAULT IMAGE PATH HERE"
|
||||
```
|
||||
|
||||
- Change the default additional Image padding according to your terminal in [globals.go](https://github.com/aditya-K2/goMP/blob/master/globals.go)
|
||||
|
||||
```go
|
||||
// Change according to your needs
|
||||
|
||||
var ADDITIONAL_PADDING_X int = 16
|
||||
var ADDITIONAL_PADDING_Y int = 24
|
||||
```
|
||||
- Increment/Decrement Image Pixels according to your terminal in [globals.go](https://github.com/aditya-K2/goMP/blob/master/globals.go)
|
||||
|
||||
```go
|
||||
// Change according to your needs
|
||||
|
||||
var IMAGE_WIDTH_EXTRA_X float32 = -1.5 // Decrementing
|
||||
var IMAGE_WIDTH_EXTRA_Y float32 = 3.75 // Incrementing
|
||||
|
||||
```
|
||||
- Make a YAML/TOML file in ``$HOME/.config/goMP`` named config.yml / config.toml
|
||||
- Read the sample_config.yml for config options
|
||||
|
||||
# Installing / Building
|
||||
|
||||
```bash
|
||||
git clone https://github.com/aditya-K2/goMP &&
|
||||
git checkout config &&
|
||||
cd goMP &&
|
||||
go build
|
||||
```
|
||||
|
48
sample_config.yml
Normal file
48
sample_config.yml
Normal file
@ -0,0 +1,48 @@
|
||||
MUSIC_DIRECTORY: "/D/Downloads/AllSongs/"
|
||||
# Your Music Directory (i.e music_directory in mpd.conf)
|
||||
|
||||
ADDITIONAL_PADDING_X : 9
|
||||
ADDITIONAL_PADDING_Y : 17
|
||||
# Extra padding for the placement of the image
|
||||
# |---------------------------------------------------------|
|
||||
# | ADDITIONAL_PADDING_Y |
|
||||
# | | |
|
||||
# | v |
|
||||
# | |---------------| |
|
||||
# |ADDITIONAL_PADDING_X->| | |
|
||||
# | | IMAGE | |
|
||||
# | | | |
|
||||
# | |---------------| |
|
||||
# | |
|
||||
# | |
|
||||
# |---------------------------------------------------------|
|
||||
# ^
|
||||
# |
|
||||
# Image Preview Box
|
||||
# Note: Padding can be negative or positive
|
||||
# PADDING_X on decrementing will move the image to right and PADDING_Y on incrementing will move the image to left
|
||||
# similarly PADDING_Y on decrementing will move the image UP and on incrementing will move the image DOWN
|
||||
|
||||
IMAGE_WIDTH_EXTRA_X : -1.1
|
||||
IMAGE_WIDTH_EXTRA_Y : -3.75
|
||||
# Add extra IMAGE_WIDTH to the image so that it fits perfectly in the image preview box
|
||||
#
|
||||
# |-----------------------------------------------------------|
|
||||
# | - IMAGE_WIDTH_EXTRA_Y |
|
||||
# | - | |
|
||||
# | - v |
|
||||
# |-----------------------------------------------------------|
|
||||
# | - |
|
||||
# | - |
|
||||
# | IMAGE_WIDTH_EXTRA_X - |
|
||||
# | -> - |
|
||||
# | - IMAGE |
|
||||
# | - |
|
||||
# | - |
|
||||
# | - |
|
||||
# | - |
|
||||
# |-----------------------------------------------------------|
|
||||
# Note: IMAGE_WIDTH_EXTRA_X and IMAGE_WIDTH_EXTRA_Y can be positive or negative
|
||||
|
||||
MPD_PORT : "6600"
|
||||
# Port on which music player daemon is running
|
Loading…
Reference in New Issue
Block a user