-
-
Save whoeverest/5273331 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 Вести | |
Македонски | |
479.25 | |
C22 | |
Alsat M | |
Регионален | |
751.25 | |
C56 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{24 Вести} 479.25 0 {0} 0 | |
{Alsat M} 751.25 0 {0} 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
lines = open('kanali.txt').readlines() | |
out = open('out.txt', 'w') | |
while True: | |
chunk, lines = lines[:4], lines[4:] | |
if not chunk: | |
break | |
name, _, freq, _ = chunk | |
out.write('{%s} %s 0 {0} 0\n' % (name.strip(), freq.strip())) | |
out.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment