-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
98 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
2021-12-30 Michael Herstine <[email protected]> | ||
2023-07-15 Michael Herstine <[email protected]> | ||
|
||
Update the Continuous Integration job & upgrade Clap to v4. | ||
I suppose I conflated two changes in one commit. This patch: | ||
|
||
- updated the CI job & got it working again | ||
- upgraded to Clap v4 | ||
- updates README & NEWS accordingly | ||
|
||
Getting Clap v4. to *compile* was one thing-- the upgrade also | ||
required a broad revision of the use of the Clap API (substituting | ||
`get_flag()` for `contains_id()`, for instance. | ||
|
||
2023-07-15 Michael Herstine <[email protected]> | ||
|
||
Upgraded to tokio 1.0. | ||
|
||
2021-12-18 Michael Herstine <[email protected]> | ||
2023-07-15 Michael Herstine <[email protected]> | ||
|
||
Remove Snafu. | ||
After some thought & some research, I decided I want to hand-craft | ||
|
@@ -14,8 +27,16 @@ | |
- `cargo test` passes | ||
- `cargo doc` builds cleanly | ||
|
||
2022-01-24 Michael Herstine <[email protected]> | ||
|
||
Commented out testing code in the release GHA | ||
|
||
Updated the pinned rust toolchain version to 1.56.1 because that's the first release to support the 2021 edition and cargo-deb now requires that | ||
|
||
2021-10-11 Michael Herstine <[email protected]> | ||
|
||
working on release workflow | ||
|
||
Address issue #5. | ||
`mppopmd` can now communicate with the mpd server over a local | ||
(Unix) socket. | ||
|
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 |
---|---|---|
|
@@ -2,11 +2,11 @@ | |
#+AUTHOR: Michael Herstine | ||
#+DESCRIPTION: mpdpopm | ||
#+EMAIL: [email protected] | ||
#+DATE: <2023-07-15 Sat 17:12> | ||
#+DATE: <2023-07-20 Thu 07:49> | ||
#+AUTODATE: t | ||
|
||
* Introduction | ||
1 | ||
|
||
[[https://github.com/sp1ff/mpdpopm][mpdpopm]] provides a companion daemon to [[https://www.musicpd.org/][MPD]] for maintaining play counts, ratings and last-played timestamps, along with an associated CLI for talking to the companion daemon. Similar to [[https://github.com/vincent-petithory/mpdfav][mpdfav]], but written in Rust (which I prefer to Go), it will maintain this information in your sticker database. Along the lines of [[https://alip.github.io/mpdcron][mpdcron]], it will also allow you to keep that information up-to-date in your tags by invoking external (user-provided & -configured) commands. | ||
|
||
This README focuses on obtaining & installing [[https://github.com/sp1ff/mpdpopm][mpdpopm]]; the user manual is distributed with the package in [[https://www.gnu.org/software/texinfo/][Texinfo]] format. The HTML version of the user manual is hosted on my personal [[https://www.unwoundstack.com/doc/mpdpopm/curr][site]]. | ||
|
@@ -29,6 +29,10 @@ mppopm findadd "(lastplayed <= \"2022-07-15\")" | |
|
||
to add all songs that haven't been played in the last year. | ||
|
||
* Licsense | ||
|
||
[[https://github.com/sp1ff/mpdpopm][mpdpopm]] is GPL v3 software. | ||
|
||
* Prerequisites | ||
|
||
[[https://www.musicpd.org/][Music Player Daemon]]: "Music Player Daemon (MPD) is a flexible, powerful, server-side application for playing music. Through plugins and libraries it can play a variety of sound files while being controlled by its network protocol." If you're reading this, I assume you're already running MPD, so this document won't have much to say on installing & configuring it other than that you *do* need to setup the sticker database by setting =sticker_file= in your configuration. | ||
|
@@ -56,10 +60,10 @@ Thanks to a suggestion by [[https://github.com/m040601][m040601]], you can down | |
|
||
#+BEGIN_SRC bash | ||
cd /tmp | ||
curl -L --output mpdpopm-0.3.2.tar.gz https://github.com/sp1ff/mpdpopm/releases/download/0.3.2/mpdpopm-0.3.2-x86_64-unknown-linux.tar.gz | ||
tar xf mpdpopm-0.3.2.tar.gz | ||
tree mpdpopm-0.3.2-x86_64-unknown-linux/ | ||
mpdpopm-0.3.2-x86_64-unknown-linux/ | ||
curl -L --output mpdpopm-0.3.1.tar.gz https://github.com/sp1ff/mpdpopm/releases/download/0.3.1/mpdpopm-0.3.1-x86_64-unknown-linux.tar.gz | ||
tar xf mpdpopm-0.3.1.tar.gz | ||
tree mpdpopm-0.3.1-x86_64-unknown-linux/ | ||
mpdpopm-0.3.1-x86_64-unknown-linux/ | ||
├── bin | ||
│ ├── mppopm | ||
│ └── mppopmd | ||
|
@@ -89,8 +93,8 @@ If you're running on a Debian-based Linux distribution, and you're on an x86_64 | |
|
||
#+BEGIN_SRC bash | ||
cd /tmp | ||
curl -L -O https://github.com/sp1ff/mpdpopm/releases/download/0.3.2/mpdpopm_0.3.2_amd64.deb | ||
sudo dpkg -i mpdpopm_0.3.2_amd64.deb | ||
curl -L -O https://github.com/sp1ff/mpdpopm/releases/download/0.3.1/mpdpopm_0.3.1_amd64.deb | ||
sudo dpkg -i mpdpopm_0.3.1_amd64.deb | ||
#+END_SRC | ||
|
||
The binaries will be placed in =/usr/local/bin=, and you can proceed to [[#getting_started][Getting Started]], below. | ||
|
@@ -101,8 +105,8 @@ If you're running on an Arch-based Linux distribution, and you're on an x86_64 p | |
|
||
#+BEGIN_SRC bash | ||
cd /tmp | ||
curl -L -O https://github.com/sp1ff/mpdpopm/releases/download/0.3.2/mpdpopm_0.3.2-1-x86_64.pkg.tar.zst | ||
sudo pacman -U mpdpopm_0.3.2-1-x86_64.pkg.tar.zst | ||
curl -L -O https://github.com/sp1ff/mpdpopm/releases/download/0.3.1/mpdpopm_0.3.1-1-x86_64.pkg.tar.zst | ||
sudo pacman -U mpdpopm_0.3.1-1-x86_64.pkg.tar.zst | ||
#+END_SRC | ||
|
||
The binaries will be placed in =/usr/local/bin=, and you can proceed to [[#getting_started][Getting Started]], below. | ||
|
@@ -113,9 +117,9 @@ If you've got the Rust toolchain as well as Autotools installed, you can build f | |
|
||
#+BEGIN_SRC bash | ||
cd /tmp | ||
curl -L -O https://github.com/sp1ff/mpdpopm/releases/download/0.3.2/mpdpopm-0.3.2.tar.xz | ||
tar xf mpdpopm-0.3.2.tar.xz | ||
cd mpdpopm-0.3.2 | ||
curl -L -O https://github.com/sp1ff/mpdpopm/releases/download/0.3.1/mpdpopm-0.3.1.tar.xz | ||
tar xf mpdpopm-0.3.1.tar.xz | ||
cd mpdpopm-0.3.1 | ||
./configure | ||
make | ||
make check | ||
|
@@ -188,7 +192,7 @@ At this point, [[https://github.com/sp1ff/mpdpopm][mpdpopm]] will happily monito | |
mppopm set-rating '*****' | ||
#+END_SRC | ||
|
||
to set the current track's rating to five "stars" (say =mppopm --help= for an explanation of the rating system; in brief-- it's Winamp's). NB. the set rating command by default produces no output; if you want confirmation that somethings happening, use the =-v= flag. | ||
to set the current track's rating to five "stars" (say =mppopm --help= for an explanation of the rating system; in brief-- it's Winamp's). NB. the set rating command by default produces no output; if you want confirmation that something's happening, use the =-v= flag. | ||
|
||
The CLI offers "get" & "set" commands for play counts, last played timestamps & the rating. It also provides commands for searching your songs on the basis of play count, rating & last played times in addition to the usual artist, title &c. Say =mppopm --help= for a full list of options, including how to tell it where the mpd server can be found on your network. | ||
|
||
|
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,44 +1,54 @@ | ||
# Docker image for building, debugging & packaging -*- mode: dockerfile -*- | ||
# There _is_ a "rust" Docker image, but the purpose of these tests | ||
# is to start with a bare-bones *Debian* system & see what I need to | ||
# do to get mpdpopm installed. | ||
FROM debian:stable-slim AS base | ||
|
||
ARG DEBIAN_FRONTEND | ||
ENV DEBIAN_FRONTEND=${DEBIAN_FRONTEND:-noninteractive} | ||
|
||
RUN set -ex && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
# Wow... \ | ||
ca-certificates \ | ||
# mpdpopm pre-requisistes \ | ||
rustc cargo locales texinfo \ | ||
# for my sanity \ | ||
less procps gdb sudo info vim && \ | ||
# tidy-up \ | ||
apt-get clean && \ | ||
rm -rf /tmp/* /var/tmp/* && \ | ||
# set the timezone to civilization (i.e. the Pacific) \ | ||
ln -fs /usr/share/zoneinfo/US/Pacific /etc/localtime && dpkg-reconfigure -f noninteractive tzdata && \ | ||
# Setup the en_US.UTF-8 locale \ | ||
cp -v /etc/locale.gen /etc/locale.gen.orig && \ | ||
sed 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen >> /tmp/locale.gen.$$ && \ | ||
mv -v /tmp/locale.gen.$$ /etc/locale.gen && \ | ||
locale-gen en_US.UTF-8 && \ | ||
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ | ||
# re-include the doc directories \ | ||
(test -d /usr/share/man/man1 || mkdir /usr/share/man/man1) && \ | ||
echo "path-include /usr/share/doc/scribbu" >> /etc/dpkg/dpkg.cfg.d/docker && \ | ||
echo "path-include /usr/share/man/man1/scribbu*" >> /etc/dpkg/dpkg.cfg.d/docker && \ | ||
echo "path-include /usr/share/info/scribbu.info" >> /etc/dpkg/dpkg.cfg.d/docker && \ | ||
useradd -ms /bin/bash -G users,sudo mgh && \ | ||
echo 'mgh:mgh' | chpasswd && \ | ||
cp -v /etc/sudoers /etc/sudoers.orig && \ | ||
echo 'mgh ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | ||
echo "Installing pre-requisites..." && \ | ||
apt-get update && \ | ||
apt-get upgrade && \ | ||
apt-get install -y --no-install-recommends \ | ||
# Wow... \ | ||
ca-certificates \ | ||
# mpdpopm pre-requisistes (we'll install rust separately, below) \ | ||
gcc gcc-multilib locales texinfo \ | ||
# not needed; just for my sanity while debugging \ | ||
less procps gdb sudo info vim curl && \ | ||
# tidy-up \ | ||
apt-get clean && \ | ||
rm -rf /tmp/* /var/tmp/* && \ | ||
# set the timezone to civilization (i.e. the Pacific) \ | ||
ln -fs /usr/share/zoneinfo/US/Pacific /etc/localtime && \ | ||
dpkg-reconfigure -f noninteractive tzdata && \ | ||
# Setup the en_US.UTF-8 locale \ | ||
cp -v /etc/locale.gen /etc/locale.gen.orig && \ | ||
sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
locale-gen en_US.UTF-8 && \ | ||
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ | ||
# re-include the doc directories \ | ||
(test -d /usr/share/man/man1 || mkdir /usr/share/man/man1) && \ | ||
echo "path-include /usr/share/doc/scribbu" >> /etc/dpkg/dpkg.cfg.d/docker && \ | ||
echo "path-include /usr/share/man/man1/scribbu*" >> /etc/dpkg/dpkg.cfg.d/docker && \ | ||
echo "path-include /usr/share/info/scribbu.info" >> /etc/dpkg/dpkg.cfg.d/docker && \ | ||
echo "Installing pre-requisites... done." && \ | ||
# Finally, setup a non-privileged user \ | ||
useradd -ms /bin/bash -G users,sudo mgh && \ | ||
echo 'mgh:mgh' | chpasswd && \ | ||
cp -v /etc/sudoers /etc/sudoers.orig && \ | ||
echo 'mgh ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | ||
|
||
# The test suite won't work if this isn't set: | ||
ENV LANG="en_US.UTF-8" | ||
|
||
USER mgh | ||
|
||
RUN cargo install cargo-deb | ||
|
||
ENV PATH="/home/mgh/.cargo/bin:${PATH}" | ||
RUN set -ex && \ | ||
# install the Rust toolchain \ | ||
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -o /tmp/rustup.sh && \ | ||
chmod a+x /tmp/rustup.sh && /tmp/rustup.sh -y && \ | ||
. /home/mgh/.cargo/env && \ | ||
cargo install cargo-deb |
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,6 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
source $HOME/.cargo/env | ||
base="$(basename $1 .tar.gz)" | ||
version="${base:8}" | ||
cp -v /"$1" /tmp | ||
|
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,4 @@ | ||
AC_INIT([mpdpopm], [0.3.2], [[email protected]], [mpdpopm], [https://github.com/sp1ff/mpdpopm]) | ||
AC_INIT([mpdpopm], [0.3.1], [[email protected]], [mpdpopm], [https://github.com/sp1ff/mpdpopm]) | ||
AC_CONFIG_AUX_DIR([build-aux]) | ||
AC_CONFIG_SRCDIR([mpdpopm/Cargo.toml.in]) | ||
AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability -Wno-override gnits std-options dist-xz dist-zstd]) | ||
|
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,4 @@ | ||
@set UPDATED 29 March 2021 | ||
@set UPDATED-MONTH March 2021 | ||
@set EDITION 0.3.2 | ||
@set VERSION 0.3.2 | ||
@set EDITION 0.3.1 | ||
@set VERSION 0.3.1 |
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,4 @@ | ||
// Copyright (C) 2020-2021 Michael Herstine <[email protected]> | ||
// Copyright (C) 2020-2023 Michael Herstine <[email protected]> | ||
// | ||
// This file is part of mpdpopm. | ||
// | ||
|
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,4 @@ | ||
// Copyright (C) 2020-2021 Michael Herstine <[email protected]> | ||
// Copyright (C) 2020-2023 Michael Herstine <[email protected]> | ||
// | ||
// This file is part of mpdpopm. | ||
// | ||
|
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,4 @@ | ||
// Copyright (C) 2021 Michael Herstine <[email protected]> | ||
// Copyright (C) 2021-2023 Michael Herstine <[email protected]> | ||
// | ||
// This file is part of mpdpopm. | ||
// | ||
|
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,4 @@ | ||
// Copyright (C) 2020-2021 Michael Herstine <[email protected]> -*- mode: rust; rust-format-on-save: nil -*- | ||
// Copyright (C) 2020-2023 Michael Herstine <[email protected]> -*- mode: rust; rust-format-on-save: nil -*- | ||
// | ||
// This file is part of mpdpopm. | ||
// | ||
|
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,4 @@ | ||
// Copyright (C) 2020-2021 Michael Herstine <[email protected]> | ||
// Copyright (C) 2020-2023 Michael Herstine <[email protected]> | ||
// | ||
// This file is part of mpdpopm. | ||
// | ||
|
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,4 @@ | ||
// Copyright (C) 2020-2021 Michael Herstine <[email protected]> | ||
// Copyright (C) 2020-2023 Michael Herstine <[email protected]> | ||
// | ||
// This file is part of mpdpopm. | ||
// | ||
|
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,4 @@ | ||
// Copyright (C) 2020-2021 Michael Herstine <[email protected]> | ||
// Copyright (C) 2020-2023 Michael Herstine <[email protected]> | ||
// | ||
// This file is part of mpdpopm. | ||
// | ||
|
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,4 @@ | ||
// Copyright (C) 2020-2021 Michael Herstine <[email protected]> | ||
// Copyright (C) 2020-2023 Michael Herstine <[email protected]> | ||
// | ||
// This file is part of mpdpopm. | ||
// | ||
|