File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def printAndSay(text):
1414 speaker .talk (text )
1515
1616class VTextStatus (VideoTextUtils ):
17- """settings and start"""
17+ """videotext reader settings and start"""
1818 welcome = "Hallo, ich bin dein Videotext-Assistent.\n " + \
1919 "Eingabe Seitenzahl (dreistellig)," + \
2020 "Beenden durch die Eingabe 'stop'."
Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ class RbbText:
5151 "x" : 600 , \
5252 "w" : 160 , \
5353 }
54+
55+ ballgamescorepages = { \
56+ 252 , 276
57+ }
5458 #
5559 api = 'https://www.rbbtext.de/'
5660 #
@@ -154,8 +158,16 @@ def extractJumpingPages(self):
154158 def appendContent (self ):
155159 """process and prettify extracted text lines and append these to content"""
156160 for x in self .lines :
157- if len (str (x )) > 1 :
158- self .content += '\n ' + str (x )
161+ xAsText = str (x )
162+ if len (xAsText ) > 1 :
163+ # quick first attempt for issue #26
164+ # I am canceling the first line of the text with a timestamp here
165+ # as a timestamp is not a score.
166+ if self .currentPage in self .ballgamescorepages \
167+ and not xAsText [0 :2 ].isdigit () and not xAsText .strip ().endswith (":" ):
168+ xAsText = xAsText .replace ("-:-" , "noch kein Ergebnis" )
169+ xAsText = xAsText .replace (":" , " zu " )
170+ self .content += '\n ' + xAsText
159171 if len (self .content ) < 3 :
160172 self .content += "Seite ist leer."
161173 self .content = self .content .replace ('-\n ' , '' )
You can’t perform that action at this time.
0 commit comments