Esempio n. 1
0
 def _find_uppdaterad_tom(self, sfsnr, filename=None, reader=None):
     if not reader:
         reader = TextReader(filename, encoding=self.source_encoding)
     try:
         reader.cue("&Auml;ndring inf&ouml;rd:<b> t.o.m. SFS")
         l = reader.readline()
         m = re.search('(\d+:\s?\d+)', l)
         if m:
             return m.group(1)
         else:
             # if m is None, the SFS id is using a non-standard
             # formatting (eg 1996/613-first-version) -- interpret
             # it as if it didn't exist
             return sfsnr
     except IOError:
         return sfsnr  # the base SFS nr
Esempio n. 2
0
 def _find_uppdaterad_tom(self, sfsnr, filename=None, reader=None):
     if not reader:
         reader = TextReader(filename, encoding=self.source_encoding)
     try:
         reader.cue("&Auml;ndring inf&ouml;rd:<b> t.o.m. SFS")
         l = reader.readline()
         m = re.search('(\d+:\s?\d+)', l)
         if m:
             return m.group(1)
         else:
             # if m is None, the SFS id is using a non-standard
             # formatting (eg 1996/613-first-version) -- interpret
             # it as if it didn't exist
             return sfsnr
     except IOError:
         return sfsnr  # the base SFS nr