aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-06 21:03:49 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-06 21:03:49 +0200
commit3bb5f72a369cb2825a2d68e536103470b7426d58 (patch)
tree21866de4b4392f1398be9f4960db4462ee1de100
parent1564f695ab4f58774f79983fe41b46454f07a295 (diff)
add labels2lrc script
-rwxr-xr-x.local/share/bin/labels2lrc13
1 files changed, 13 insertions, 0 deletions
diff --git a/.local/share/bin/labels2lrc b/.local/share/bin/labels2lrc
new file mode 100755
index 0000000..1491dae
--- /dev/null
+++ b/.local/share/bin/labels2lrc
@@ -0,0 +1,13 @@
+#!/bin/sh
+cat "$@" |\
+ awk '
+BEGIN { FS = "\t" }
+{
+ seconds = $1
+ minutes = int(seconds / 60)
+ seconds = seconds % 60
+ millis = (seconds * 100) % 100
+ printf("[%02d:%02d.%02d]%s\n", minutes, seconds, millis, $3)
+}
+'
+