-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infrared: Remove duplicates from Projectors universal remote #167
Conversation
Add Amazon Basics Oscillate to universal `fans.ir`
Fix formatting error
Only duplicates removed, nothing missing Comparing files with python script:
Script used: def parse_ir_file(path):
with open(path, "r") as file:
data = file.readlines()
new = list(data)
for line in data:
if "name: " in line:
break
else:
new.remove(line)
return new
def process(ir):
data = parse_ir_file(ir)
codes = []
temp = ()
for line in data:
if "#" in line:
codes.append(temp)
temp = ()
else:
temp += (line,)
return list(set(codes))
old = process("original projectors.ir")
new = process("new projectors.ir")
print(f"Original: {len(old)}")
print(f"New: {len(new)}")
for i in old:
if i not in new:
if i:
print("#### MISSING ####")
for l in i:
print(l, end='')
else:
print("Only empty line missing") |
Add IR codes from projector universal remote
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crazy that there were so many duplicates, but it checks out. You missed one at the added section at the top, fixed it.
Thanks!
Co-authored-by: Tom H <[email protected]>
Ah that makes a lot of sense and explains why there where so many |
What's new
Removed more duplicates from the
Projectors.ir
universal remoteFor the reviewer