descpage: implement loading gnuplot script

Issue #1 (#1)
This commit is contained in:
2018-10-18 16:40:29 +02:00
parent 5b06d2229e
commit af55fde4db

View File

@@ -52,6 +52,18 @@ class DescPageBot(pywikibot.bot.Bot):
# Update wiki page
self.update_page()
def load_gnuplot_script(self):
"""
Load the gnuplot script for current job
@return Gnuplot script content
@rtype str
"""
with open( os.path.join(
Config.gnuplot_script_dir, self.job.script + ".plt" ), "r") as fd:
return fd.read()
def parse_page(self):
"""
Load current page content and parse with mwparser