Diff for /MPIWGWeb/bibliography.py between versions 1.7.2.7 and 1.7.2.8

version 1.7.2.7, 2006/09/07 11:06:41 version 1.7.2.8, 2006/11/06 16:08:30
Line 7  def formatBibliography(self,found): Line 7  def formatBibliography(self,found):
         ret+=formatBiblHelp(self,found,table='bibliography',id=found.id_gen_bib)          ret+=formatBiblHelp(self,found,table='bibliography',id=found.id_gen_bib)
     return ret      return ret
   
 def CRListToSemicolon(self,listStr,showall=False):  def CRListToSemicolon(list):
     if listStr:      if list:
     listStr.replace(";","\n")          return "; ".join(list.split("\n"))
     list=listStr.split("\n")  
     if not showall: #filter eigentuemer der hoempage  
         for x in list:  
   
             if x==self.title: # loesche den Eigentuemer der Hoempage aus der Liste  
                 del(list[list.index(x)])  
   
     if len(list)==0: # kein anderer Autor  
         return None  
     elif showall:  
         return "; ".join(list)  
     else:  
         return "(joint with %s)"%"; ".join(list)  
     else:      else:
         return None          return None
           
Line 32  def getBib(value): Line 19  def getBib(value):
     else:      else:
         return ""          return ""
   
     return ret  
 def cleanPunctuation(teststr):  
     """clean up punktuation"""  
     ret=""  
     signs="!:;.,?"  
     for x in teststr:  
         if x in signs:  
                 if (len(ret)>0) and (ret[-1]==' '):  
                         ret=ret[0:-1]  
         ret+=x  
     return ret  
   
 def formatBiblHelp(self,found,table,id,foundIB=None):  def formatBiblHelp(self,found,table,id,foundIB=None):
     ret=""      ret=""
     if not foundIB:      if not foundIB:
Line 54  def formatBiblHelp(self,found,table,id,f Line 29  def formatBiblHelp(self,found,table,id,f
             return ret              return ret
           
     if foundIB.reference_type.lower()=='journal article':      if foundIB.reference_type.lower()=='journal article':
     if CRListToSemicolon(foundIB.author):          ret+=getBib(CRListToSemicolon(foundIB.author))+". &quot;"+getBib(foundIB.title)+". &quot; "+"<i>%s</i>"%getBib(foundIB.secondary_title)+" "+getBib(foundIB.volume)+" ("
             ret+=getBib(CRListToSemicolon(foundIB.author))+". &quot;"  
     ret+=getBib(foundIB.title)+". &quot; "+"<i>%s</i>"%getBib(foundIB.secondary_title)+" "+getBib(foundIB.volume)+" ("  
         if not self.ZSQLisEmpty(foundIB.number):          if not self.ZSQLisEmpty(foundIB.number):
             ret+=foundIB.number+"&nbsp;"              ret+=foundIB.number+"&nbsp;"
   
Line 67  def formatBiblHelp(self,found,table,id,f Line 40  def formatBiblHelp(self,found,table,id,f
             ret+=": "+foundIB.pages+"."              ret+=": "+foundIB.pages+"."
   
     elif foundIB.reference_type.lower()=='edited book':      elif foundIB.reference_type.lower()=='edited book':
         if CRListToSemicolon(self,foundIB.author):          if foundIB.author:
             ret+=CRListToSemicolon(self,foundIB.author)+" (Editor/s). &quot;"               ret+=CRListToSemicolon(foundIB.author)+" (Editor/s). " 
         if foundIB.title and (not foundIB.title==""):          if foundIB.title and (not foundIB.title==""):
             ret+="<i>"+foundIB.title+"</i>."              ret+="<i>"+foundIB.title+"</i>."
         if foundIB.place_published and (not foundIB.place_published==''):          if foundIB.place_published and (not foundIB.place_published==''):
Line 78  def formatBiblHelp(self,found,table,id,f Line 51  def formatBiblHelp(self,found,table,id,f
         ret+=getBib(foundIB.year)+"."          ret+=getBib(foundIB.year)+"."
   
     elif foundIB.reference_type.lower()=='book section' or foundIB.reference_type.lower()=='in book':      elif foundIB.reference_type.lower()=='book section' or foundIB.reference_type.lower()=='in book':
     if CRListToSemicolon(self,foundIB.author):          ret+=getBib(CRListToSemicolon(foundIB.author))+". &quot;"+getBib(foundIB.title)+".&quot; In: <i>"+getBib(foundIB.secondary_title)+"</i>"
             ret+=getBib(CRListToSemicolon(self,foundIB.author))+". &quot;"          if (CRListToSemicolon(foundIB.secondary_author)) and (not CRListToSemicolon(foundIB.secondary_author)==''):
     ret+=getBib(foundIB.title)+".&quot; In: <i>"+getBib(foundIB.secondary_title)+"</i>"              ret+=", eds.: "+CRListToSemicolon(foundIB.secondary_author)
         if (CRListToSemicolon(self,foundIB.secondary_author,showall=True)) and (not CRListToSemicolon(self,foundIB.secondary_author,showall=True)==''):  
             ret+=", eds.: "+CRListToSemicolon(self,foundIB.secondary_author,showall=True)  
         ret+=". "          ret+=". "
         if foundIB.pages and (not foundIB.pages)=='':          if foundIB.pages and (not foundIB.pages)=='':
             ret+=foundIB.pages+". "              ret+=foundIB.pages+". "
Line 94  def formatBiblHelp(self,found,table,id,f Line 65  def formatBiblHelp(self,found,table,id,f
   
         
     elif foundIB.reference_type.lower()=='book':      elif foundIB.reference_type.lower()=='book':
         if CRListToSemicolon(self,foundIB.author):          ret+=getBib(CRListToSemicolon(foundIB.author))+". <i>"+getBib(foundIB.title)+"</i>. "
             ret+=getBib(CRListToSemicolon(self,foundIB.author))+". "  #       if foundIB.pages and (not foundIB.pages==''):
     ret+="<i>"+getBib(foundIB.title)+"</i>. "  #%            ret+=foundIB.pages+". "
         if foundIB.pages and (not foundIB.pages==''):  
             ret+=foundIB.pages+". "  
         if foundIB.place_published and (not foundIB.place_published==''):          if foundIB.place_published and (not foundIB.place_published==''):
             ret+=foundIB.place_published+": "              ret+=foundIB.place_published+": "
         if foundIB.publisher and (not foundIB.publisher==''):          if foundIB.publisher and (not foundIB.publisher==''):
Line 106  def formatBiblHelp(self,found,table,id,f Line 75  def formatBiblHelp(self,found,table,id,f
         ret+=getBib(foundIB.year)+"."          ret+=getBib(foundIB.year)+"."
   
     elif foundIB.reference_type.lower()=='newspaper article':      elif foundIB.reference_type.lower()=='newspaper article':
         if CRListToSemicolon(self,foundIB.author):          ret+=CRListToSemicolon(foundIB.author)+". &quot;"+foundIB.title+".&quot; <i>"+foundIB.secondary_title+"</i>, "
             ret+=CRListToSemicolon(self,foundIB.author)+". &quot;"  
     ret+=foundIB.title+".&quot; <i>"+foundIB.secondary_title+"</i>, "  
         ret+=foundIB.date+"."+foundIB.year+","          ret+=foundIB.date+"."+foundIB.year+","
         if foundIB.pages and (not foundIB.pages==''):          if foundIB.pages and (not foundIB.pages==''):
             ret+=foundIB.pages+". "              ret+=foundIB.pages+". "
Line 116  def formatBiblHelp(self,found,table,id,f Line 83  def formatBiblHelp(self,found,table,id,f
   
                           
                           
     return cleanPunctuation(ret)      return ret

Removed from v.1.7.2.7  
changed lines
  Added in v.1.7.2.8


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>