From 606e07e169aa037e0ea192d9c01fae3f5ae4bd80 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 22 Jan 2025 22:21:04 +0100 Subject: add lrc2labels script --- .local/share/bin/lrc2labels | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 .local/share/bin/lrc2labels (limited to '.local/share') diff --git a/.local/share/bin/lrc2labels b/.local/share/bin/lrc2labels new file mode 100755 index 0000000..31aa4be --- /dev/null +++ b/.local/share/bin/lrc2labels @@ -0,0 +1,11 @@ +#!/bin/sh +cat "$@" |\ + gawk ' +match($0, /^\[([0-9]{2}):([0-9]{2}\.[0-9]{2})\](.*)/, group) { + time = group[1] * 60 + group[2] + lyric = group[3] + + printf("%.2f\t%.2f\t%s\n", time, time, lyric) +} +' + -- cgit v1.2.3