Permalink
Switch branches/tags
Nothing to show
Find file Copy path
5f48f27 Oct 26, 2017
1 contributor

Users who have contributed to this file

executable file 19 lines (15 sloc) 411 Bytes
#!/usr/bin/env python
def gen_lircrc(lircd_conf):
for line in open(lircd_conf):
line = line.strip()
if not line.startswith("KEY_"):
continue
words = line.split()
print(''' begin
prog = beep
button = %s
config = %s, %s
end''' % (words[0], words[0], words[1]))
if __name__ == '__main__':
import sys
gen_lircrc(sys.argv[1])