aboutsummaryrefslogtreecommitdiff
path: root/.local/share/bin/labels2lrc
blob: 1491dae57f32ff024dbad323a3497fc6d3e89a65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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)
}
'