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