From 292678dc5037817c67e2c953012b4a84cf297475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 23 Nov 2020 23:11:33 +0100 Subject: Add dz (Deezer) and lf (Last.fm) tools --- lf/lfp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 lf/lfp (limited to 'lf/lfp') diff --git a/lf/lfp b/lf/lfp new file mode 100755 index 0000000..cd21b04 --- /dev/null +++ b/lf/lfp @@ -0,0 +1,10 @@ +#!/bin/sh + +# Parse Last.fm URL, print title - artist + +while read url +do + printf '%b\n' "$(printf '%s\n' "$url" | sed 's/+/ /g; s/%/\\\\x/g')" | + cut -d/ -f5,7 | + sed 's,^\(.*\)/\(.*\),\2 - \1,' +done -- cgit v1.2.3