pokemon/setup.py
Klaus-Uwe Mitterer 4766b891ff Move Facebook credentials to config file
Create setup.py
Allow Two Factor Authentication
Lots of smaller changes
2016-02-05 11:39:34 +01:00

22 lines
531 B
Python
Executable file

#!/usr/bin/env python3
import configparser, os.path
if os.path.isfile("config.cfg"):
raise IOError("config.cfg already exists. Please remove it before running this script.")
config = configparser.RawConfigParser()
config.add_section('facebook')
user = input("Facebook username (email address): ")
pwd = input("Facebook password: ")
config.set('facebook', 'user', user)
config.set('facebook', 'pass', pwd)
with open('config.cfg', 'wt') as cfg:
config.write(cfg)
print("We're all done. You can now use Pokemon. Have fun!")