Merge branch 'chaz' of git://github.com/ChazDazzle/fpdb-chaz

This commit is contained in:
Worros 2010-10-14 12:37:10 +08:00
commit 2d52b8d815
3 changed files with 5 additions and 8 deletions

8
pyfpdb/Anonymise.py Executable file → Normal file
View File

@ -39,17 +39,17 @@ obj = getattr(mod, filter_name, None)
hhc = obj(config, autostart=False) hhc = obj(config, autostart=False)
if os.path.exists(options.infile): if os.path.exists(options.filename):
in_fh = codecs.open(options.infile, 'r', "utf8") in_fh = codecs.open(options.filename, 'r', "utf8")
filecontents = in_fh.read() filecontents = in_fh.read()
in_fh.close() in_fh.close()
else: else:
print _("Could not find file %s") % options.infile print _("Could not find file %s") % options.filename
exit(1) exit(1)
m = hhc.re_PlayerInfo.finditer(filecontents) m = hhc.re_PlayerInfo.finditer(filecontents)
outfile = options.infile+".anon" outfile = options.filename+".anon"
print _("Output being written to"), outfile print _("Output being written to"), outfile
savestdout = sys.stdout savestdout = sys.stdout

2
pyfpdb/ImapFetcher.py Executable file → Normal file
View File

@ -131,7 +131,7 @@ def readFile(filename, options):
return whole_file return whole_file
def runFake(db, config, options): def runFake(db, config, options):
summaryText = readFile(options.infile, options) summaryText = readFile(options.filename, options)
importSummaries(db, config,[summaryText], options=options) importSummaries(db, config,[summaryText], options=options)
def importSummaries(db, config, summaries, options = None): def importSummaries(db, config, summaries, options = None):

View File

@ -38,9 +38,6 @@ def fpdb_options():
parser.add_option("-r", "--rerunPython", parser.add_option("-r", "--rerunPython",
action="store_true", action="store_true",
help=_("Indicates program was restarted with a different path (only allowed once).")) help=_("Indicates program was restarted with a different path (only allowed once)."))
parser.add_option("-i", "--infile",
dest="infile", default="Slartibartfast",
help=_("Input file"))
parser.add_option("-k", "--konverter", parser.add_option("-k", "--konverter",
dest="hhc", default="PokerStarsToFpdb", dest="hhc", default="PokerStarsToFpdb",
help=_("Module name for Hand History Converter")) help=_("Module name for Hand History Converter"))