1 Commits
Author SHA1 Message Date
golderweb db6e7fd246 Merge branch 'release-1.0' 2017-11-05 15:36:16 +01:00
6 changed files with 8 additions and 40 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
[submodule "jogobot"] [submodule "jogobot"]
path = jogobot path = jogobot
url = ../jogobot url = git@github.com:golderweb/wiki-jogobot-core.git
branch = test-v1
+1 -9
View File
@@ -11,14 +11,6 @@ On [JogoBots wikipedia user page](https://de.wikipedia.org/wiki/Benutzer:JogoBot
* [jogobot-core module](https://github.com/golderweb/wiki-jogobot-core) used as submodule * [jogobot-core module](https://github.com/golderweb/wiki-jogobot-core) used as submodule
* [Isoweek module](https://pypi.python.org/pypi/isoweek) * [Isoweek module](https://pypi.python.org/pypi/isoweek)
## Versions
* v1.2
- improved repo structure
* v1.1
- Cut Titel and Interpret on first linebreak
* v1.0
- first stable release
## Bugs ## Bugs
[wiki-jogobot-charts on fs.golderweb.de (de)](https://fs.golderweb.de/proj20) [wiki-jogobot-charts on fs.golderweb.de (de)](https://fs.golderweb.de/proj20)
@@ -26,4 +18,4 @@ On [JogoBots wikipedia user page](https://de.wikipedia.org/wiki/Benutzer:JogoBot
GPLv3+ GPLv3+
## Author Information ## Author Information
Copyright 2017 Jonathan Golder <jonathan@golderweb.de> Copyright 2016 Jonathan Golder <jonathan@golderweb.de>
+1 -1
View File
@@ -11,7 +11,7 @@
# #
# modified by: # modified by:
# #
# Copyright 2017 Jonathan Golder <jonathan@golderweb.de> # Copyright 2016 Jonathan Golder <jonathan@golderweb.de>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -26
View File
@@ -3,7 +3,7 @@
# #
# countrylist.py # countrylist.py
# #
# Copyright 2017 Jonathan Golder <jonathan@golderweb.de> # Copyright 2016 Jonathan Golder <jonathan@golderweb.de>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -284,9 +284,6 @@ missing!" )
if self.entry.has( "Titel" ): if self.entry.has( "Titel" ):
self._titel_raw = self.entry.get("Titel").value self._titel_raw = self.entry.get("Titel").value
# Only use part before possible "<br"
self.remove_lines(self._titel_raw)
# Remove possible ref-tags # Remove possible ref-tags
for ref in self._titel_raw.ifilter_tags(matches="ref"): for ref in self._titel_raw.ifilter_tags(matches="ref"):
self._titel_raw.remove( ref ) self._titel_raw.remove( ref )
@@ -359,9 +356,6 @@ missing!" )
if self.entry.has( "Interpret" ): if self.entry.has( "Interpret" ):
self._interpret_raw = self.entry.get("Interpret").value self._interpret_raw = self.entry.get("Interpret").value
# Only use part before possible "<br"
self.remove_lines(self._interpret_raw)
# Remove possible ref-tags # Remove possible ref-tags
for ref in self._interpret_raw.ifilter_tags(matches="ref"): for ref in self._interpret_raw.ifilter_tags(matches="ref"):
self._interpret_raw.remove( ref ) self._interpret_raw.remove( ref )
@@ -464,25 +458,6 @@ missing!" )
else: else:
return str(keywords[0]) return str(keywords[0])
def remove_lines(self, wikicode):
"""
Removes linebreaks (<br>) and everything after them in given wikicode
"""
# Catch wrong typed param
if not isinstance(wikicode, mwparser.wikicode.Wikicode):
raise TypeError(str(type(self)) + "._remove_lines() expects " +
"parameter 'wikicode' of type " +
"'mwparserfromhell.wikicode.Wikicode', " +
str(type(wikicode)) + " was given!")
# Find first linebreak
br = next(wikicode.ifilter_tags(matches="br"), None)
# If there is one, get its position and slice nodes-list
if br:
brpos = wikicode.nodes.index(br)
wikicode.nodes = wikicode.nodes[0:brpos]
def __str__( self ): def __str__( self ):
""" """
Returns str repression for Object Returns str repression for Object
+1 -1
Submodule jogobot updated: d69d873624...9131235b7b
+1 -1
View File
@@ -3,7 +3,7 @@
# #
# summarypage.py # summarypage.py
# #
# Copyright 2017 Jonathan Golder <jonathan@golderweb.de> # Copyright 2016 Jonathan Golder <jonathan@golderweb.de>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by