[Rivet-svn] r3656 - trunk/bin

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Apr 3 13:42:31 BST 2012


Author: richardn
Date: Tue Apr  3 13:42:30 2012
New Revision: 3656

Log:
fix to done something with inspireids although should be improved

Modified:
   trunk/bin/rivet-mkhtml

Modified: trunk/bin/rivet-mkhtml
==============================================================================
--- trunk/bin/rivet-mkhtml	Mon Apr  2 14:25:41 2012	(r3655)
+++ trunk/bin/rivet-mkhtml	Tue Apr  3 13:42:30 2012	(r3656)
@@ -240,9 +240,12 @@
     references = []
     summary = analysis
     description = "NONE"
-    if analysis.startswith("S"):
-        spiresid = analysis[analysis.rfind('S')+1:len(analysis)]
+    if analysis.find("_S")>0:
+        spiresid = analysis[analysis.rfind('_S')+2:len(analysis)]
+    elif analysis.find("_I")>0:
+        inspireid = analysis[analysis.rfind('_I')+2:len(analysis)]
     else:
+        inspireid = "NONE"
         spiresid = "NONE"
     ana = rivet.AnalysisLoader.getAnalysis(analysis)
     if ana:
@@ -258,7 +261,9 @@
     else:
         index.write('\n<h3><a href="%s/index.html" style="text-decoration:none;">%s</a></h3>\n' % (analysis, summary))
     reflist = []
-    if spiresid and spiresid != "NONE":
+    if inspireid and inspireid !="NONE":
+        reflist.append('<a href="http://inspirehep.net/record/%s">Spires</a>' % spiresid)
+    elif spiresid and spiresid != "NONE":
         reflist.append('<a href="http://durpdg.dur.ac.uk/cgi-bin/spiface/hep/www?irn+%s">Spires</a>' % spiresid)
     reflist += references
     index.write('<p>%s</p>\n' % " | ".join(reflist))


More information about the Rivet-svn mailing list