--- cdli/cdli_files.py 2006/07/18 13:42:52 1.39 +++ cdli/cdli_files.py 2006/07/25 07:51:49 1.40 @@ -1229,6 +1229,20 @@ class CDLIFileObject(CatalogAware,versio pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','viewCDLIFile.zpt')).__of__(self) return pt() + security.declarePublic('getPNumber') + def getPNumber(self): + """get the pnumber""" + try: + txt=re.match("&[Pp](\d*)\s*=([^\r\n]*)",self.data[0:]) + except: + txt=self.data[0:] + + return "ERROR" + try: + return "P"+txt.group(1) + except: + return "ERROR" + security.declarePublic('getDesignation') def getDesignation(self): """get the designation out of the file"""