Browse Source

Fix typo in Euroexchange

develop
Jonathan Golder 6 years ago
parent
commit
b3a0857ddd
  1. 7
      README.md
  2. 0
      euroexchange/__init__.py
  3. 20
      euroexchange/euroexchange.py

7
README.md

@ -1,4 +1,4 @@
# wiki-jogobot-euroexange
# wiki-jogobot-euroexchange
This is a [Pywikibot](https://www.mediawiki.org/wiki/Manual:Pywikibot) based [Wikipedia Bot](https://de.wikipedia.org/wiki/Wikipedia:Bots)
of [User:JogoBot](https://de.wikipedia.org/wiki/Benutzer:JogoBot) on the
[German Wikipedia](https://de.wikipedia.org/wiki/Wikipedia:Hauptseite).
@ -12,14 +12,13 @@ of [User:JogoBot](https://de.wikipedia.org/wiki/Benutzer:JogoBot) on the
## Usage
```
python euroexange.py
```
python euroexchange.py
## Versions
*
## Bugs
[jogobot-euroexange Issues](https://git.golderweb.de/wiki/jogobot-euroexange/issues)
[jogobot-euroexchange Issues](https://git.golderweb.de/wiki/jogobot-euroexchange/issues)
## License
GPLv3+

0
euroexange/__init__.py → euroexchange/__init__.py

20
euroexange/euroexange.py → euroexchange/euroexchange.py

@ -34,9 +34,9 @@ import pywikibot.specialbots
import jogobot
class EuroExangeBotJob():
class EuroExchangeBotJob():
"""
Used for EuroExangeBot job queue
Used for EuroExchangeBot job queue
"""
def __init__( self, **kwargs ):
@ -51,7 +51,7 @@ class EuroExangeBotJob():
self.image = "TEST_{}".format(self.image)
class EuroExangeBot( pywikibot.bot.BaseBot ):
class EuroExchangeBot( pywikibot.bot.BaseBot ):
base_dir = os.path.dirname(os.path.realpath(__file__)) + "/.."
working_dir = os.path.dirname(os.path.realpath(__file__)) + "/../wdir"
@ -61,7 +61,7 @@ class EuroExangeBot( pywikibot.bot.BaseBot ):
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/Euroexange|euroexange]]) update chart"
upload_comment = "Bot: ([[User:JogoBot/Euroexchange|euroexchange]]) update chart"
def __init__( self, genFactory, **kwargs ):
@ -207,7 +207,7 @@ class EuroExangeBot( pywikibot.bot.BaseBot ):
"""
Load jobs from json file
@returns Generator of EuroExangeBotJob objects
@returns Generator of EuroExchangeBotJob objects
@rtype generator
"""
@ -217,7 +217,7 @@ class EuroExangeBot( pywikibot.bot.BaseBot ):
# yield each job
for job_args in jobs_js:
yield EuroExangeBotJob( **job_args )
yield EuroExchangeBotJob( **job_args )
def treat_job( self, job ):
@ -225,7 +225,7 @@ class EuroExangeBot( pywikibot.bot.BaseBot ):
Handles working on specific jobs
@param job: Job to work on
@type job: EuroExangeBotJob
@type job: EuroExchangeBotJob
"""
# Store reference to current job in Bot obj
@ -289,7 +289,7 @@ class EuroExangeBot( pywikibot.bot.BaseBot ):
"""
@param job: Job to work on
@type job: EuroExangeBotJob
@type job: EuroExchangeBotJob
"""
cmd = shlex.split ( type(self).gnuplot + " " + os.path.realpath(
@ -326,7 +326,7 @@ class EuroExangeBot( pywikibot.bot.BaseBot ):
"""
@param job: Job to work on
@type job: EuroExangeBotJob
@type job: EuroExchangeBotJob
"""
comment = type(self).upload_comment
@ -384,7 +384,7 @@ def main(*args):
local_args, None )
# Init Bot
bot = jogobot.bot.init_bot( task_slug, None, EuroExangeBot, genFactory, **subtask_args)
bot = jogobot.bot.init_bot( task_slug, None, EuroExchangeBot, genFactory, **subtask_args)
# Run bot
jogobot.bot.run_bot( task_slug, None, bot )
Loading…
Cancel
Save