-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Move the go code under 'go' - Rename 'pickup-rust' to 'rs' - Move the react frontend under 'go/frontend' - Split the README, extracting the go-specific part - Update Actions config
- Loading branch information
Showing
76 changed files
with
135 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/pickup | ||
/*.json | ||
|
||
/pickup-rust/target/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
|
||
GO_FILES = $(shell find . -iname '*.go') | ||
.PHONY: frontend go rs clean lint | ||
|
||
pickup: react | ||
make pickup-only | ||
go: | ||
cd go && make pickup | ||
|
||
pickup-only: main.go $(GO_FILES) | ||
go build | ||
frontend: | ||
cd go/frontend && yarn build | ||
|
||
react: deps | ||
cd react && yarn build | ||
rs: | ||
cd rs && cargo build | ||
|
||
deps: react/yarn.lock react/package.json | ||
cd react && yarn install | ||
lint: | ||
cd go && make lint | ||
cd rs && cargo clippy | ||
|
||
# go vet requires the files in react/dist | ||
lint: deps $(GO_FILES) | ||
go vet && cd react && yarn lint | ||
|
||
.PHONY: react clean deps pickup | ||
clean: | ||
rm -rf react/dist | ||
go clean | ||
cd go && make clean | ||
cd rs && cargo clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/pickup | ||
/*.json | ||
|
||
/pickup-rust/target/ | ||
.idea/ | ||
.cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"files.exclude": { | ||
"**/frontend/**": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
GO_FILES = $(shell find . -iname '*.go') | ||
|
||
pickup: frontend | ||
make pickup-only | ||
|
||
pickup-only: main.go $(GO_FILES) | ||
go build | ||
|
||
frontend: deps | ||
cd frontend && yarn build | ||
|
||
deps: frontend/yarn.lock frontend/package.json | ||
cd frontend && yarn install | ||
|
||
# go vet requires the files in frontend/dist | ||
lint: deps $(GO_FILES) | ||
go vet && cd frontend && yarn lint | ||
|
||
.PHONY: frontend clean deps pickup | ||
clean: | ||
rm -rf frontend/dist | ||
go clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Pickup | ||
|
||
[![CI](https://github.com/werkshy/pickup/actions/workflows/go-ci.yaml/badge.svg)](https://github.com/werkshy/pickup/actions/workflows/go-ci.yaml) | ||
|
||
This is pickup (in go), a web frontend for [Music Player Daemon](http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki). | ||
|
||
## Status | ||
|
||
It works, more or less. You can add albums and tracks to the playlist, control | ||
volume, skip tracks, start/stop playback. You can view the playlist. It runs on | ||
the Raspberry Pi with room to run mpd as well. Because of the client-side | ||
architecture it is very fast. | ||
|
||
## Getting Started In Ubuntu | ||
|
||
# The React frontend requires the 'yarn' package manager - | ||
# install it like this: | ||
sudo apt install nodejs | ||
|
||
# This next command might require 'sudo' as well. | ||
npm install -g yarn | ||
|
||
# Requires go > v1.16, which is best installed via `snap` on Ubuntu. | ||
sudo snap install --classic go | ||
# Install yarn dependencies, build the frontend, and build the binary: | ||
make build | ||
|
||
# Run the binary | ||
./pickup --help | ||
./pickup | ||
|
||
## Getting Started on macOS / brew | ||
|
||
# Requires go > 1.16 for the embed feature | ||
brew install yarn golang | ||
make | ||
|
||
## Getting Started Cross-Compiling for Raspberry Pi | ||
|
||
Assuming you installed go as a snap, you should be able to cross-compile for | ||
the Pi like this: | ||
|
||
GOOS=linux GOARCH=arm GOARM=5 go build | ||
|
||
Now copy the pickup binary to your pi and run | ||
|
||
./pickup | ||
|
||
## Install As A Service | ||
|
||
Copy init.d/pickup to /etc/init.d | ||
|
||
Edit the script and set these vars to suit your setup. I'm lazy and just run as | ||
my main user, definitely don't do this on the internet! | ||
|
||
SCRIPT=/home/oneill/pickup/pickup | ||
RUNAS=oneill |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.