Created
November 15, 2014 16:55
-
-
Save y0ug/3e00ae98b31853de2619 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
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
# 2014-11-15 17:33 CET | |
# y0ug | |
import sys | |
import argparse | |
if __name__ == "__main__": | |
data = open(sys.argv[1]).read() | |
data = data.split('\n') | |
data = data[1:] | |
tag = "\tGData Anti-Virus " | |
print " expected_results = {" | |
for i in range(0, len(data), 3): | |
if len(data[i]) == 0: continue | |
filename = data[i] | |
sign = data[i+2][len(tag):].strip() | |
if sign == "clean": | |
print " '%s': None," % (filename) | |
else: | |
print " '%s': '%s'," % (filename, sign) | |
print " }" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment