Browse Source

Move configuration vars to jogobot config

develop
Jonathan Golder 6 years ago
parent
commit
3cd639eef9
  1. 17
      euroexchange/euroexchange.py

17
euroexchange/euroexchange.py

@ -53,15 +53,14 @@ class EuroExchangeBotJob():
class EuroExchangeBot( pywikibot.bot.BaseBot ):
base_dir = os.path.dirname(os.path.realpath(__file__)) + "/.."
working_dir = os.path.dirname(os.path.realpath(__file__)) + "/../wdir"
gnuplot_script_dir = os.path.dirname(os.path.realpath(__file__)) + \
"/../gnuplot_scripts"
gnuplot = "/usr/bin/gnuplot"
data_source = "http://www.ecb.int/stats/eurofxref/eurofxref-hist.zip"
zip_file = "eurofxref-hist.zip"
csv_file = "eurofxref-hist.csv"
upload_comment = "Bot: ([[User:JogoBot/Euroexchange|euroexchange]]) update chart"
base_dir = os.path.expanduser(jogobot.config["euroexchange"]["base_dir"])
working_dir = os.path.join( base_dir, "working_dir" )
gnuplot_script_dir = os.path.join(base_dir, "gnuplot_scripts")
gnuplot = jogobot.config["euroexchange"]["gnuplot_bin"]
data_source = jogobot.config["euroexchange"]["data_source"]
zip_file = jogobot.config["euroexchange"]["data_zip_filename"]
csv_file = jogobot.config["euroexchange"]["data_csv_filename"]
upload_comment = jogobot.config["euroexchange"]["upload_comment"]
def __init__( self, genFactory, **kwargs ):

Loading…
Cancel
Save