Index: trunk/UTIL/PYTHON/bibweb/ads.py
===================================================================
--- trunk/UTIL/PYTHON/bibweb/ads.py	(revision 967)
+++ trunk/UTIL/PYTHON/bibweb/ads.py	(revision 968)
@@ -17,4 +17,5 @@
              title = None,
              retrieve = True,
+             addpdf = None,
              addlink = None):
 
@@ -60,5 +61,4 @@
           htmlcontent += "<a href='#"+str(year)+"'>"+str(year)+"</a>.  "
         if addlink is not None: htmlcontent += "<br>"+addlink
-        if embedded: htmlcontent += "<br><br /><hr><br>"
     
     ### YEAR LOOP
@@ -85,5 +85,25 @@
         cmd = "bib2bib --quiet %s -c '$type=%s' -oc %s -ob %s %s" % (arg)
         os.system(cmd)
-    
+
+        # modify the bib file to insert pdf links
+        # the trick is to use the line adsurl and expect pdf to have the same name as ADS reference       
+        #        ... then besides this, it is necessary to link pdfs or rename those
+        #        ... the online repository is indicated by addpdf
+        if retrieve:
+         if addpdf is not None:
+            bibcontent = ''
+            for line in open(linkads+'.bib'):
+                bibcontent += line
+                if 'adsurl' in line:
+                    line = line.replace('adsurl','localpdf')
+                    line = line.replace('http://cdsads.u-strasbg.fr/abs/',addpdf)
+                    line = line.replace('},','.pdf},')
+                    line = line.replace('%','_')
+                    bibcontent += line
+            bibfile2 = open('temp','w')
+            print >> bibfile2,bibcontent
+            bibfile2.close()
+            os.system('mv temp '+linkads+'.bib')
+
         # 2. make the html page from the author.bib file
         if customcond is None or len(listyear) > 1:
@@ -104,4 +124,5 @@
               %s \
               -nf adsurl 'ADS link' \
+              -nf localpdf 'PDF version' \
               -r -d --revkeys \
               -nofooter --nodoc \
@@ -109,5 +130,5 @@
               %s" % (arg)
         os.system(cmd)
-    
+
         # 3. load page content and delete intermediate HTML file
         htmlfile = open(author+'.html','r')
@@ -127,6 +148,7 @@
     find = re.compile(r'DOI')
     htmlcontent = find.sub('Journal website',htmlcontent)
-    find = re.compile(r'.pdf')
-    htmlcontent = find.sub('PDF version',htmlcontent)
+
+    #find = re.compile(r'.pdf')
+    #htmlcontent = find.sub('PDF version',htmlcontent)
     
     find = re.compile(r'<table>')
@@ -134,5 +156,5 @@
     find = re.compile(r'<td align="right">')
     htmlcontent = find.sub('<td align="center" width=17% style="font-size: 75%;">',htmlcontent)
-    
+
     htmlcontent += '''<hr><p>Generated with 
     <a href='https://www.lri.fr/~filliatr/bibtex2html/doc/manual.html'>BibTeX2HTML</a> 
Index: trunk/UTIL/PYTHON/bibweb/header.html
===================================================================
--- trunk/UTIL/PYTHON/bibweb/header.html	(revision 967)
+++ trunk/UTIL/PYTHON/bibweb/header.html	(revision 968)
@@ -44,12 +44,12 @@
 <div id="navigation"> 
 <ul> 
-<li><a href="index.html">Home</a></li> 
-<li class="selected"><a href="publications.html">Publications</a></li>
-<li><a href="work.html">Work</a></li> 
-<li><a href="abstracts.html">Abstracts</a></li>
-<li><a href="reports.html">Reports</a></li>
-<li><a href="model.html">Model</a></li>
-<li><a href="links.html">Links</a></li>
-<li><a href="teaching.html">Teaching</a></li>
+<li><a href="../index.html">Home</a></li> 
+<li class="selected"><a href="../pub/pub.html">Publications</a></li>
+<li><a href="../work.html">Work</a></li> 
+<li><a href="../abstracts.html">Abstracts</a></li>
+<li><a href="../reports.html">Reports</a></li>
+<li><a href="../model.html">Model</a></li>
+<li><a href="../links.html">Links</a></li>
+<li><a href="../teaching.html">Teaching</a></li>
 <li><a href="http://www-mars.lmd.jussieu.fr/mars/access.html">MCD</a></li>
 </ul> 
Index: trunk/UTIL/PYTHON/bibweb/inpress.html
===================================================================
--- trunk/UTIL/PYTHON/bibweb/inpress.html	(revision 968)
+++ trunk/UTIL/PYTHON/bibweb/inpress.html	(revision 968)
@@ -0,0 +1,10 @@
+<h3>In press or just published</h3>
+<p>
+<a href="http://arxiv.org/pdf/1208.5030">Rocket dust storms and detached dust layers in the Martian atmosphere</a><br>
+<u>Spiga A.</u>, J. Faure, J.B. Madeleine, A. M&auml;&auml;tt&auml;nen, F. Forget (2013)<br>
+<i>Journal of Geophysical Research</i>, 118, 746-767
+<a style="font-size: 75%;" href="http://dx.doi.org/10.1002/jgre.20046">[online]</a>
+<a style="font-size: 75%;" href="http://arxiv.org/abs/1208.5030">[arxiv link]</a>
+<a style="font-size: 75%;" href="http://onlinelibrary.wiley.com/store/10.1002/jgre.20046/asset/supinfo/movie2.avi?v=1&s=6488e07484abfbf4d65e00c1494497e49361b1ee">[movie]</a><br>
+</p>
+<hr><br>
Index: trunk/UTIL/PYTHON/bibweb/mywebsite.py
===================================================================
--- trunk/UTIL/PYTHON/bibweb/mywebsite.py	(revision 967)
+++ trunk/UTIL/PYTHON/bibweb/mywebsite.py	(revision 968)
@@ -7,4 +7,5 @@
              customcond = ''' -c 'abstract:"devil"' ''',\
              linkads = "link.spiga",\
+             addpdf = "http://dl.dropbox.com/u/11078310/my_papers/ref/",\
              title = "<h2>Publications about dust devils</h2>")
 
@@ -14,4 +15,5 @@
              customcond = ''' -c 'abstract:"gravity wave"' ''',\
              linkads = "link.spiga",\
+             addpdf = "http://dl.dropbox.com/u/11078310/my_papers/ref/",\
              title = "<h2>Publications about gravity waves</h2>")
 
@@ -21,4 +23,5 @@
              customcond = ''' -c 'abstract:"mesoscale"' ''',\
              linkads = "link.spiga",\
+             addpdf = "http://dl.dropbox.com/u/11078310/my_papers/ref/",\
              title = "<h2>Publications about mesoscale meteorology</h2>")
 
@@ -28,4 +31,5 @@
              customcond = ''' -c 'title:"cloud"' ''',\
              linkads = "link.spiga",\
+             addpdf = "http://dl.dropbox.com/u/11078310/my_papers/ref/",\
              title = "<h2>Publications about clouds</h2>")
 
@@ -35,4 +39,5 @@
              customcond = ''' -c 'title:"Earth" or title:"terrestrial" or title:"Andes"' ''',\
              linkads = "link.spiga",\
+             addpdf = "http://dl.dropbox.com/u/11078310/my_papers/ref/",\
              title = "<h2>Publications about the Earth</h2>")
 
@@ -42,4 +47,5 @@
              customcond = ''' -c 'title:"Mars" or title:"martian"' ''',\
              linkads = "link.spiga",\
+             addpdf = "http://dl.dropbox.com/u/11078310/my_papers/ref/",\
              title = "<h2>Publications about Mars</h2>")
 
@@ -49,4 +55,5 @@
              customcond = ''' -c 'title:"boundary layer" or title:"microscale" or title:"large-eddy simulations"' ''',\
              linkads = "link.spiga",\
+             addpdf = "http://dl.dropbox.com/u/11078310/my_papers/ref/",\
              title = "<h2>Publications about planetary boundary layer</h2>")
 
@@ -56,4 +63,5 @@
              customcond = ''' -c 'title:"spectrometer"' ''',\
              linkads = "link.spiga",\
+             addpdf = "http://dl.dropbox.com/u/11078310/my_papers/ref/",\
              title = "<h2>Publications about remote sensing</h2>")
 
@@ -63,4 +71,5 @@
              listyear = [2013,2012,2011,2010,2009,2008,2007],\
              linkads = "link.spiga",\
+             addpdf = "http://dl.dropbox.com/u/11078310/my_papers/ref/",\
              title = "",\
 addlink = '''
@@ -75,3 +84,3 @@
 <a href="pubdd.html">Dust devils</a> /
 <a href="pubgw.html">Gravity waves</a>
-''')
+'''+"<br><br /><hr><br>"+open('inpress.html').read())
