Mercurial > hg > MPIWGWeb
comparison MPIWGRoot.py @ 55:12cb73494367
bibliographie funktionen
author | dwinter |
---|---|
date | Tue, 30 Apr 2013 16:46:32 +0200 |
parents | 4600e31a0431 |
children | 84879a3f91a6 |
comparison
equal
deleted
inserted
replaced
54:4600e31a0431 | 55:12cb73494367 |
---|---|
679 linkStr="""<link>http://www.mpiwg-berlin.mpg.de/en/research/projects/%s</link>""" | 679 linkStr="""<link>http://www.mpiwg-berlin.mpg.de/en/research/projects/%s</link>""" |
680 rss+="""<item>""" | 680 rss+="""<item>""" |
681 rss+=linkStr%obj[3].getId() | 681 rss+=linkStr%obj[3].getId() |
682 rss+="""</item>""" | 682 rss+="""</item>""" |
683 if hasattr(obj[3],'publicationList'): | 683 if hasattr(obj[3],'publicationList'): |
684 rss+="""<item>""" | 684 rss+="""<item>""" |
685 rss+=linkStr%(obj[3].getId()+"/publicationList"); | 685 rss+=linkStr%(obj[3].getId()+"/publicationList"); |
686 rss+="""</item>""" | 686 rss+="""</item>""" |
687 rss+="""</channel> | 687 rss+="""</channel> |
688 </rss>""" | 688 </rss>""" |
689 | 689 |
734 return catalogged[0].getObject().getId() | 734 return catalogged[0].getObject().getId() |
735 | 735 |
736 except: | 736 except: |
737 return "" | 737 return "" |
738 | 738 |
739 | 739 def getAllProjectPublications(self): |
740 """get all publications""" | |
741 fw=file("/tmp/allProjectPublications","w") | |
742 projects =self.projects.getProjectsAsList(None,active=0,archived=0) | |
743 | |
744 for project in projects: | |
745 logging.debug(project) | |
746 if hasattr(project,'publicationList'): | |
747 try: | |
748 x =project.publicationList.bibliolist.data | |
749 | |
750 except: | |
751 logging.error("Can't do: %s"%project.absolute_url()) | |
752 continue | |
753 | |
754 id=project.getId() | |
755 for l in x.split("\n"): | |
756 fw.write("%s,%s\n"%(id,l)) | |
757 fw.flush() | |
758 | |
759 fw.close() | |
740 | 760 |
741 | 761 |
742 | 762 |
743 def manage_addMPIWGRootForm(self): | 763 def manage_addMPIWGRootForm(self): |
744 """form for adding the root""" | 764 """form for adding the root""" |