Changeset 1333 for trunk/UTIL
- Timestamp:
- Aug 26, 2014, 5:19:56 PM (10 years ago)
- Location:
- trunk/UTIL/PYTHON/bibweb
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/bibweb/ads.py
r1191 r1333 14 14 else: char = "%.0f publications" % (num) 15 15 return char 16 17 def addhtmlref(st,st2,nom,prenom,initiales): 18 nnom = len(nom.split()) 19 nprenom = len(prenom.split()) 20 for iii in range(nnom): 21 for jjj in range(nprenom): 22 st = st + nom.split()[iii].replace('é',"%C3%A9")+"++%2C++"\ 23 + prenom.split()[jjj].replace('é',"%C3%A9")+"++%3B++"\ 24 + nom.split()[iii].replace('é',"%C3%A9")+"++%2C++"\ 25 + initiales.split()[0].replace('é',"%C3%A9")\ 26 +"++%3B++" 27 st2 = st2 + nom.split()[iii] + " , " + prenom.split()[jjj] + " ; " + nom.split()[iii] + " , " + initiales.split()[0] + " ; " 28 return st,st2 29 30 def makelink(n="Feynman",fn="Richard",ini="R.",oneyear=None,journals=None,name="link"): 31 # list of journals or not 32 if journals is not None: strjou="jou_pick=YES" 33 else: strjou="jou_pick=NO" 34 # 0. check inputs 35 if isinstance(n,str): ntot=0 36 else: ntot=n.size 37 # 1. generic parts 38 adslink1="http://adsabs.harvard.edu/cgi-bin/nph-abs_connect?db_key=AST&db_key=PHY&db_key=PRE&qform=PHY&arxiv_sel=astro-ph&arxiv_sel=cond-mat&arxiv_sel=cs&arxiv_sel=gr-qc&arxiv_sel=hep-ex&arxiv_sel=hep-lat&arxiv_sel=hep-ph&arxiv_sel=hep-th&arxiv_sel=math&arxiv_sel=math-ph&arxiv_sel=nlin&arxiv_sel=nucl-ex&arxiv_sel=nucl-th&arxiv_sel=physics&arxiv_sel=quant-ph&arxiv_sel=q-bio&aut_xct=YES&aut_logic=OR&author=" 39 adslink2="+&ned_query=YES&sim_query=YES&start_mon=&start_year=&end_mon=&end_year=&ttl_logic=OR&title=&txt_logic=OR&text=&nr_to_return=1999&start_nr=1&"+strjou+"&ref_stems=" 40 if oneyear is not None: 41 adslink2="+&ned_query=YES&sim_query=YES&start_mon=&start_year="+str(oneyear)+"&end_mon=&end_year="+str(oneyear)+"&ttl_logic=OR&title=&txt_logic=OR&text=&nr_to_return=1999&start_nr=1&jou_pick=NO&ref_stems=" 42 adslink3="&data_and=ALL&group_and=ALL&start_entry_day=&start_entry_mon=&start_entry_year=&end_entry_day=&end_entry_mon=&end_entry_year=&min_score=&sort=SCORE&data_type=BIBTEXPLUS&aut_syn=YES&ttl_syn=YES&txt_syn=YES&aut_wt=1.0&ttl_wt=0.3&txt_wt=3.0&aut_wgt=YES&obj_wgt=YES&ttl_wgt=YES&txt_wgt=YES&ttl_sco=YES&txt_sco=YES&version=1" 43 # 2. author list 44 st=adslink1 ; st2 = "" 45 tf = open("ads.testauthor", 'w') # this is just for testing ADS outside the script 46 if ntot > 1: 47 for iii in range(ntot): 48 st,st2 = addhtmlref(st,st2,n[iii],fn[iii],ini[iii]) 49 else: 50 st,st2 = addhtmlref(st,st2,n,fn,ini) 51 st=st+adslink2 52 tf.write(st2) 53 tf.close() 54 # 3. journal list 55 jn = "" 56 if journals is not None: 57 f = open("listjournals.txt", 'r') 58 for line in f: 59 jj = line.strip().replace("&","%26") 60 jn = jn + jj + "+" 61 f.close() 62 st=st+jn+adslink3 63 # 4. write final result 64 os.system('rm -rf '+name) 65 daf = open(name, 'w') 66 daf.write(st) 67 daf.close() 68 69 ############################################################### 16 70 17 71 def makepage(authorref, … … 28 82 verbose = True, 29 83 includemonth = False, 84 includebook = False, 30 85 target = None): 31 86 … … 63 118 find = re.compile(r"{\\`e}") 64 119 html = find.sub('è',html) 120 find = re.compile(r'{\\"e}') 121 html = find.sub('ë',html) 122 if includebook: 123 find = re.compile(r'INBOOK') 124 html = find.sub('ARTICLE',html) 125 find = re.compile(r'booktitle') 126 html = find.sub('journal',html) 65 127 ## 66 128 bibfile = open(linkads+'.bib','w') … … 141 203 else: 142 204 header = '' 143 if printnum: header += "("+printpubli(numpubli)+")"205 #if printnum: header += "("+printpubli(numpubli)+")" 144 206 145 207 header = '"'+header+'"' … … 183 245 find = re.compile(r'è') 184 246 htmlcontent = find.sub('è',htmlcontent) 247 find = re.compile(r'ë') 248 htmlcontent = find.sub('ë',htmlcontent) 185 249 186 250 #find = re.compile(r'.pdf') … … 192 256 htmlcontent = find.sub('<td align="center" width=17% style="font-size: 75%;">',htmlcontent) 193 257 194 htmlcontent += '''<hr><p>Generated with 195 <a href='https://www.lri.fr/~filliatr/bibtex2html/doc/manual.html'>BibTeX2HTML</a> 196 and <a href='http://adsabs.harvard.edu/'>NASA ADS</a> 197 and a bit of <a href='http://www.python.org/'>Python</a></p>''' 258 htmlcontent += '''<hr><p>Retrieved from <a href='http://adsabs.harvard.edu/'>NASA ADS</a> using python + <a href='https://www.lri.fr/~filliatr/bibtex2html/doc/manual.html'>bibTeX2HTML</a></p>''' 198 259 if embedded: 199 260 htmlfile = open('footer.html','r') … … 203 264 ### TREAT HEADER PART DEPENDENT ON PREVIOUS LOOP 204 265 ### -- total publications + list of years 205 if customcond is None or len(listyear) > 1: 206 if len(nonzeroyears) == 0: 207 htmlcontent2 += "No publications found." 208 else: 209 htmlcontent2 += "Year: " 210 for year in nonzeroyears: 211 htmlcontent2 += "<a href='#"+str(year)+"'>"+str(year)+"</a>. " 212 if addlink is not None: htmlcontent2 += "<br>"+addlink 213 if printnum: htmlcontent2 += "<p>(Total: "+printpubli(numpublitot)+")</p>" 266 #if customcond is None: # or len(listyear) > 1: 267 if len(listyear) == 1: 268 if listyear[0] != 0: 269 htmlcontent2 += "Year: " 270 htmlcontent2 += str(year) 271 else: 272 htmlcontent2 += "Years: " 273 for year in nonzeroyears: 274 htmlcontent2 += "<a href='#"+str(year)+"'>"+str(year)+"</a>. " 275 if addlink is not None: htmlcontent2 += "<br>"+addlink 276 if printnum: htmlcontent2 += "<p>(Total: "+printpubli(numpublitot)+")</p>" 214 277 215 278 ### PUT EVERYTHING TOGETHER AND CREATE A PAGE … … 230 293 "*.css",\ 231 294 target 232 os.system( "mkdir -p %s ; mv %s %s ; rm -rf %s %s ; mv %s ./ 2> /dev/null ; cp %s %s 2> /dev/null" % (arg) ) 295 296 step = "rm -rf %s %s" 297 #step = "touch %s %s" 298 txt = "mkdir -p %s ; mv %s %s ; "+step+" ; mv %s ./ 2> /dev/null ; cp %s %s 2> /dev/null" 299 os.system( txt % (arg) ) -
trunk/UTIL/PYTHON/bibweb/biglmdwebsite/listjournals.txt
r1206 r1333 8 8 ApOpt 9 9 ApJ 10 ARMS 10 11 AtmEn 11 12 AtmRe … … 23 24 CRGeo 24 25 CNSNS 26 DSR 27 DSRA 28 DSROA 29 DSRB 30 DSRI 31 DSRII 25 32 DyAtO 26 33 E&ES … … 52 59 JFM 53 60 JGR 61 JGRC 54 62 JGRD 55 63 JGRE … … 74 82 OcMod 75 83 OptEn 84 OptL 76 85 P&SS 77 86 PCEB … … 89 98 RvGeo 90 99 Sci 100 SoEn 91 101 TCry 92 102 Tell -
trunk/UTIL/PYTHON/bibweb/biglmdwebsite/listpeople.txt
r1179 r1333 1 -----------http://lite3.framapad.org/p/YTTXcVSXCL---------------------------- -----------------------2 NOM ; PRENOM ; INITIALES ; EQUIPE ; ANNEE DEBUT ; ANNEE FIN (0000 si présent) ; NOM 2 ('-' si aucun)3 ----------------------------------------------------------------------------- -----------------------4 Armante ; Raymond ; R. ; ABCT ; 1995 ; 0000 ; -5 Arsouze ; Thomas ; T. ; INTRO ; 2013 ; 0000 ; -6 Basdevant ; Claude ; C. ; DPAO ; 1971 ; 0000 ; -7 Bonazzola ; Marine ; M. ; EMC3 ; 1999 ; 0000 ; -8 Bony ; Sandrine ; S. ; EMC3 ; 1990 ; 0000 ; -9 Boucher ; Olivier ; O. ; EMC3 ; 1995 ; 0000 ; -10 Capelle ; Virginie ; V. ; ABCT ; 2008 ; 0000 ; -11 Chedin ; Alain ; A. ; ABCT ; 1971 ; 0000 ; Chédin12 Chepfer ; Helene ; H. ; INTRO ; 1998 ; 0000 ; -13 Cheruy ; Frédérique ; F. ; EMC3 ; 1988 ; 0000 ; -14 Claud ; Chantal ; C. ; DPAO ; 1992 ; 0000 ; -15 Codron ; Francis ; F. ; EMC3 ; 2000 ; 0000 ; -16 Drobinski ; Philippe ; P. ; INTRO ; 2003 ; 0000 ; -17 Dubos ; Thomas ; T. ; INTRO ; 2007 ; 0000 ; -18 Dufresne ; Jean-Louis ; J.-L. ; EMC3 ; 1985 ; 0000 ; -19 Duvel ; Jean-Philippe ; J.-P. ; DPAO ; 1990 ; 0000 ; -20 Crevoisier ; Cyril ; C. ; ABCT ; 2002 ; 0000 ; -21 Edouard ; Dimitri ; D. ; ABCT ; 2002 ; 0000 ; -22 Farge ; Marie ; F. ; DPAO ; 1990 ; 0000 ; -23 Flamant ; Pierre ; P. ; ABCT ; 1964 ; 0000 ; -24 Forget ; François ; F. ; PLANETO ; 1993 ; 0000 ; -25 Gay-Balmaz ; François ; F. ; DPAO ; 2011 ; 0000 ; -26 Gibert ; Fabien ; F. ; ABCT ; 2003 ; 0000 ; -27 Goulas ; Yves ; Y. ; ABCT ; 1990 ; 0000 ; -28 Grandpeix ; Jean-Yves ; J.-Y. ; EMC3 ; 1990 ; 0000 ; -29 Hertzog ; Albert ; A. ; DPAO ; 1999 ; 0000 ; -30 Hourdin ; Frédéric ; F. ; EMC3 ; 1992 ; 0000 ; -31 Jacquinet-Husson ; Nicole ; N. ; ABCT ; 1971 ; 0000 ; -32 Lapeyre ; Guillaume ; G. ; DPAO ; 2004 ; 0000 ; -33 Laval ; Katia ; K. ; EMC3 ; 1970 ; 0000 ; -34 Lebonnois ; Sébastien ; S. ; PLANETO ; 1999 ; 0000 ; -35 Legras ; Bernard ; B. ; DPAO ; 1984 ; 0000 ; -36 Le Mounier ; Florian ; F. ; ABCT ; 2011 ; 0000 ; -37 Li ; Zhao-Xin ; Z.-X. ; EMC3 ; 1988 ; 0000 ; -38 Lott ; François ; F. ; DPAO ; 1995 ; 0000 ; -39 Madeleine ; Jean-Baptiste ; J.-B. ; EMC3 ; 2009 ; 0000 ; -40 Mailler ; Sylvain ; S. ; INTRO ; 2009 ; 0000 ; -41 Menut ; Laurent ; L. ; INTRO ; 1999 ; 0000 ; -42 Moya ; Ismael ; I. ; ABCT ; 1973 ; 0000 ; -43 Ounis ; Abderrahmane ; A. ; ABCT ; 2001 ; 0000 ; -44 Noel ; Vincent ; V. ; INTRO ; 1999 ; 0000 ; -45 Picon ; Laurence ; L. ; EMC3 ; 1985 ; 0000 ; -46 Plougonven ; Riwal ; R. ; DPAO ; 2005 ; 0000 ; -47 Polcher ; Jan ; J. ; INTRO ; 2013 ; 0000 ; -48 Rio ; Catherine ; C. ; EMC3 ; 2000 ; 0000 ; -49 Risi ; Camille ; C. ; EMC3 ; 2006 ; 0000 ; -1 -----------http://lite3.framapad.org/p/YTTXcVSXCL---------------------------- 2 NOM ; PRENOM ; INITIALES ; EQUIPE ; ANNEE DEBUT ; ANNEE FIN (0000 si présent) 3 ----------------------------------------------------------------------------- 4 Armante ; Raymond ; R. ; ABCT ; 1995 ; 0000 5 Arsouze ; Thomas ; T. ; INTRO ; 2013 ; 0000 6 Basdevant ; Claude ; C. ; DPAO ; 1971 ; 0000 7 Bonazzola ; Marine ; M. ; EMC3 ; 1999 ; 0000 8 Bony ; Sandrine ; S. ; EMC3 ; 1990 ; 0000 9 Boucher ; Olivier ; O. ; EMC3 ; 1995 ; 0000 10 Capelle ; Virginie ; V. ; ABCT ; 2008 ; 0000 11 Chedin Chédin ; Alain ; A. ; ABCT ; 1971 ; 0000 12 Chepfer ; Helene ; H. ; INTRO ; 1998 ; 0000 13 Cheruy ; Frédérique ; F. ; EMC3 ; 1988 ; 0000 14 Claud ; Chantal ; C. ; DPAO ; 1992 ; 0000 15 Codron ; Francis ; F. ; EMC3 ; 2000 ; 0000 16 Drobinski ; Philippe ; P. ; INTRO ; 2003 ; 0000 17 Dubos ; Thomas ; T. ; INTRO ; 2007 ; 0000 18 Dufresne ; Jean-Louis ; J.-L. ; EMC3 ; 1985 ; 0000 19 Duvel ; Jean-Philippe ; J.-P. ; DPAO ; 1990 ; 0000 20 Crevoisier ; Cyril ; C. ; ABCT ; 2002 ; 0000 21 Edouard ; Dimitri ; D. ; ABCT ; 2002 ; 0000 22 Farge ; Marie ; F. ; DPAO ; 1990 ; 0000 23 Flamant ; Pierre ; P. ; ABCT ; 1964 ; 0000 24 Forget ; François François ; F. ; PLANETO ; 1993 ; 0000 25 Gay-Balmaz ; François ; F. ; DPAO ; 2011 ; 0000 26 Gibert ; Fabien ; F. ; ABCT ; 2003 ; 0000 27 Goulas ; Yves ; Y. ; ABCT ; 1990 ; 0000 28 Grandpeix ; Jean-Yves ; J.-Y. ; EMC3 ; 1990 ; 0000 29 Hertzog ; Albert ; A. ; DPAO ; 1999 ; 0000 30 Hourdin ; Frédéric ; F. ; EMC3 ; 1992 ; 0000 31 Jacquinet-Husson ; Nicole ; N. ; ABCT ; 1971 ; 0000 32 Lapeyre ; Guillaume ; G. ; DPAO ; 2004 ; 0000 33 Laval ; Katia ; K. ; EMC3 ; 1970 ; 0000 34 Lebonnois ; Sébastien ; S. ; PLANETO ; 1999 ; 0000 35 Legras ; Bernard ; B. ; DPAO ; 1984 ; 0000 36 Le Mounier ; Florian ; F. ; ABCT ; 2011 ; 0000 37 Li ; Zhao-Xin Laurent ; Z.-X. ; EMC3 ; 1988 ; 0000 38 Lott ; François Francois ; F. ; DPAO ; 1995 ; 0000 39 Madeleine ; Jean-Baptiste ; J.-B. ; EMC3 ; 2009 ; 0000 40 Mailler ; Sylvain ; S. ; INTRO ; 2009 ; 0000 41 Menut ; Laurent ; L. ; INTRO ; 1999 ; 0000 42 Moya ; Ismael ; I. ; ABCT ; 1973 ; 0000 43 Ounis ; Abderrahmane ; A. ; ABCT ; 2001 ; 0000 44 Noel ; Vincent ; V. ; INTRO ; 1999 ; 0000 45 Picon ; Laurence ; L. ; EMC3 ; 1985 ; 0000 46 Plougonven ; Riwal ; R. ; DPAO ; 2005 ; 0000 47 Polcher ; Jan ; J. ; INTRO ; 2013 ; 0000 48 Rio ; Catherine ; C. ; EMC3 ; 2000 ; 0000 49 Risi ; Camille ; C. ; EMC3 ; 2006 ; 0000 50 50 Riviere ; Gwendal ; G. ; DPAO ; 2014 ; 0000 ; Rivière 51 Sadourny ; Robert ; R. ; LEGACY ; 1968 ; 2002 ; -52 Scott ; Noëlle ; N.A. ; ABCT ; 1971 ; 0000 ; -53 Seze ; Geneviève ; G. ; EMC3 ; 1987 ; 0000 ; Sèze54 Speich ; Sabrina ; S. ; DPAO ; 2014 ; 0000 ; -55 Spiga ; Aymeric ; A. ; PLANETO ; 2007 ; 0000 ; -56 Stegner ; Alexandre ; A. ; DPAO ; 2001 ; 0000 ; -57 Stubenrauch ; Claudia ; C.J. ; ABCT ; 1996 ; 0000 ; -58 Talagrand ; Olivier ; O. ; DPAO ; 1970 ; 0000 ; -59 Teitelbaum ; Hector ; H. ; DPAO ; 1970 ; 0000 ; -60 Turquety ; Solene ; S. ; INTRO ; 2008 ; 0000 ; -61 Valari ; Myrto ; M. ; INTRO ; 2008 ; 0000 ; -62 Vial ; François ; F. ; DPAO ; 1987 ; 0000 ; -63 Zeitlin ; Vladimir ; V. ; DPAO ; 1991 ; 0000 ; Tseitlin51 Sadourny ; Robert ; R. ; LEGACY ; 1968 ; 2002 52 Scott ; Noëlle ; N.A. ; ABCT ; 1971 ; 0000 53 Seze Sèze ; Geneviève ; G. ; EMC3 ; 1987 ; 0000 54 Speich ; Sabrina ; S. ; DPAO ; 2014 ; 0000 55 Spiga ; Aymeric ; A. ; PLANETO ; 2007 ; 0000 56 Stegner ; Alexandre Alexander ; A. ; DPAO ; 2001 ; 0000 57 Stubenrauch ; Claudia ; C.J. ; ABCT ; 1996 ; 0000 58 Talagrand ; Olivier ; O. ; DPAO ; 1970 ; 0000 59 Teitelbaum ; Hector ; H. ; DPAO ; 1970 ; 0000 60 Turquety ; Solene ; S. ; INTRO ; 2008 ; 0000 61 Valari ; Myrto ; M. ; INTRO ; 2008 ; 0000 62 Vial ; François Francois ; F. ; DPAO ; 1987 ; 0000 63 Zeitlin Tseitline ; Vladimir ; V. ; DPAO ; 1991 ; 0000 -
trunk/UTIL/PYTHON/bibweb/biglmdwebsite/lmdall.py
r1206 r1333 20 20 usercond = ''' -c 'not journal:"Discussions"' ''' # fixes the EGU Discussions journals problem 21 21 usercond = usercond + ''' -c 'not journal:"Polymer Science"' ''' # strange inclusions 22 perso = True 22 23 #### 23 24 24 25 ### FOLDER 25 26 folder = "/home/marshttp/www-mars/publmdall" 27 #folder = "/home/marshttp/www-mars/publmdallexp" # for tests 28 #folder = "/home/marshttp/www-mars/publmd/INTRO" 26 29 if oneyear is not None: folder = folder + str(oneyear) 30 31 ### USEFUL FUNCTION 32 def addhtmlref(st,st2,nom,prenom,initiales): 33 nnom = len(nom.split()) 34 nprenom = len(prenom.split()) 35 for iii in range(nnom): 36 for jjj in range(nprenom): 37 st = st + nom.split()[iii].replace('é',"%C3%A9")+"++%2C++"\ 38 + prenom.split()[jjj].replace('é',"%C3%A9")+"++%3B++"\ 39 + nom.split()[iii].replace('é',"%C3%A9")+"++%2C++"\ 40 + initiales.split()[0].replace('é',"%C3%A9")\ 41 +"++%3B++" 42 st2 = st2 + nom.split()[iii] + " , " + prenom.split()[jjj] + " ; " + nom.split()[iii] + " , " + initiales.split()[0] + " ; " 43 return st,st2 27 44 28 45 ### CLEAN … … 30 47 31 48 ### GET TEAM LIST and SIZE 32 tnom,tprenom,tinitiales,tequipe,tanneedeb,tanneefin ,taltnom= np.loadtxt("listpeople.txt",delimiter=";",dtype='string',unpack=True,skiprows=3,comments="#")49 tnom,tprenom,tinitiales,tequipe,tanneedeb,tanneefin = np.loadtxt("listpeople.txt",delimiter=";",dtype='string',unpack=True,skiprows=3,comments="#") 33 50 34 51 ### LOOP on EACH TEAM (and add a combined list for all TEAMS) 35 52 ll = list(set(tequipe)) ; ll.append('all') ; ll = ll[::-1] 53 #ll = list(set(tequipe)) ; ll = ll[::-1] 36 54 for eqeq in ll: 37 55 … … 40 58 w = np.where(tequipe==eqeq) 41 59 nom = tnom[w] ; prenom = tprenom[w] ; initiales = tinitiales[w] ; equipe = tequipe[w] 42 anneedeb = tanneedeb[w] ; anneefin = tanneefin[w] ; altnom = taltnom[w]60 anneedeb = tanneedeb[w] ; anneefin = tanneefin[w] 43 61 else: 44 62 nom = tnom ; prenom = tprenom ; initiales = tinitiales ; equipe = tequipe 45 anneedeb = tanneedeb ; anneefin = tanneefin ; altnom = taltnom63 anneedeb = tanneedeb ; anneefin = tanneefin 46 64 ntot = nom.size 47 65 48 66 ### PREPARE ADS LINK 49 67 # 1. generic parts 50 68 adslink1="http://adsabs.harvard.edu/cgi-bin/nph-abs_connect?db_key=AST&db_key=PHY&db_key=PRE&qform=PHY&arxiv_sel=astro-ph&arxiv_sel=cond-mat&arxiv_sel=cs&arxiv_sel=gr-qc&arxiv_sel=hep-ex&arxiv_sel=hep-lat&arxiv_sel=hep-ph&arxiv_sel=hep-th&arxiv_sel=math&arxiv_sel=math-ph&arxiv_sel=nlin&arxiv_sel=nucl-ex&arxiv_sel=nucl-th&arxiv_sel=physics&arxiv_sel=quant-ph&arxiv_sel=q-bio&aut_xct=YES&aut_logic=OR&author=" 51 adslink2="+&ned_query=YES&sim_query=YES&start_mon=&start_year=&end_mon=&end_year=&ttl_logic=OR&title=&txt_logic=OR&text=&nr_to_return=1999&start_nr=1&jou_pick= NO&ref_stems="69 adslink2="+&ned_query=YES&sim_query=YES&start_mon=&start_year=&end_mon=&end_year=&ttl_logic=OR&title=&txt_logic=OR&text=&nr_to_return=1999&start_nr=1&jou_pick=YES&ref_stems=" 52 70 if oneyear is not None: 53 adslink2="+&ned_query=YES&sim_query=YES&start_mon=&start_year="+str(oneyear)+"&end_mon=&end_year="+str(oneyear)+"&ttl_logic=OR&title=&txt_logic=OR&text=&nr_to_return=1999&start_nr=1&jou_pick=NO&ref_stems="71 adslink2="+&ned_query=YES&sim_query=YES&start_mon=&start_year="+str(oneyear)+"&end_mon=&end_year="+str(oneyear)+"&ttl_logic=OR&title=&txt_logic=OR&text=&nr_to_return=1999&start_nr=1&jou_pick=NO&ref_stems=" 54 72 adslink3="&data_and=ALL&group_and=ALL&start_entry_day=&start_entry_mon=&start_entry_year=&end_entry_day=&end_entry_mon=&end_entry_year=&min_score=&sort=SCORE&data_type=BIBTEXPLUS&aut_syn=YES&ttl_syn=YES&txt_syn=YES&aut_wt=1.0&ttl_wt=0.3&txt_wt=3.0&aut_wgt=YES&obj_wgt=YES&ttl_wgt=YES&txt_wgt=YES&ttl_sco=YES&txt_sco=YES&version=1" 55 73 # 2. author list … … 57 75 tf = open("ads.testauthor", 'w') # this is just for testing ADS outside the script 58 76 for iii in range(ntot): 59 st = st + nom[iii].split()[0].replace('é',"%C3%A9")\ 60 +"++%2C++"\ 61 + prenom[iii].split()[0].replace('é',"%C3%A9")\ 62 +"++%3B++"\ 63 + nom[iii].split()[0].replace('é',"%C3%A9")\ 64 +"++%2C++"\ 65 + initiales[iii].split()[0].replace('é',"%C3%A9")\ 66 +"++%3B++" 67 st2 = st2 + nom[iii] + " , " + prenom[iii] + " ; " + nom[iii] + " , " + initiales[iii] + " ; " 68 if altnom[iii].split()[0] != "-": 69 st = st + altnom[iii].split()[0].replace('é',"%C3%A9")\ 70 +"++%2C++"\ 71 + prenom[iii].split()[0].replace('é',"%C3%A9")\ 72 +"++%3B++"\ 73 + altnom[iii].split()[0].replace('é',"%C3%A9")\ 74 +"++%2C++"\ 75 + initiales[iii].split()[0].replace('é',"%C3%A9")\ 76 +"++%3B++" 77 st2 = st2 + altnom[iii] + " , " + prenom[iii] + " ; " + altnom[iii] + " , " + initiales[iii] + " ; " 77 st,st2 = addhtmlref(st,st2,nom[iii],prenom[iii],initiales[iii]) 78 78 st=st+adslink2 79 79 tf.write(st2) … … 92 92 daf.write(st) 93 93 daf.close() 94 94 95 95 ### RETRIEVE COMPLETE BIBTEX FILE (NB: does not seem to work without month) 96 96 ads.makepage('lmd_dummy',retrieve=True,linkads=dalink,customcond=usercond,verbose=False,includemonth=True) 97 97 98 98 ### LOOP ON NAMES 99 99 miny = 9999 ; maxy = -9999 ; lk = "<br>Author:" 100 100 for iii in range(ntot): 101 101 # 1. get and prepare various components 102 danom = nom[iii].strip() ; daprenom = prenom[iii].strip()102 danom = nom[iii].strip().split()[0] ; daprenom = prenom[iii].strip().split()[0] 103 103 dayears = int(anneedeb[iii]) ; dayeare = int(anneefin[iii]) 104 104 daini = initiales[iii].split()[0] 105 105 if usercond is None: cc = ''' -c ' ''' 106 106 else: cc = usercond + ''' -c ' ''' 107 cc = cc + ''' author:"'''+danom+'''" ''' 108 if altnom[iii].split()[0] != "-": 109 danomalt = altnom[iii].split()[0] 110 cc = cc + ''' or author:"'''+danomalt+'''" ''' 107 nomarr = nom[iii].split() 108 cc = cc + ''' author:"'''+nomarr[0]+'''" ''' 109 if len(nomarr) > 1: 110 for zenom in nomarr[1:]: 111 cc = cc + ''' or author:"'''+zenom+'''" ''' 111 112 cc = cc+''' ' ''' 112 113 # -- if year start 0000 and year end 0000 do not do anything … … 119 120 if oneyear is None: ly = range(dayeare,dayears-1,-1) 120 121 else: ly = [oneyear] 121 ads.makepage('lmd_'+danom.replace(" ", ""),\ 122 if (perso and (eqeq != 'all')): 123 ads.makepage('lmd_'+danom.replace(" ", ""),\ 122 124 retrieve = False,\ 123 125 customcond = cc,\ … … 135 137 # 5. get authors link list 136 138 lk = lk + ''' <a href="lmd_'''+danom.replace(" ", "")+'''.html">'''+daini+" "+danom.replace('é',"é")+"</a> /" 137 139 138 140 ### MAKE FINAL PAGE 139 141 if oneyear is None: ly = range(maxy,miny-1,-1) … … 148 150 printnum = True,\ 149 151 includemonth=True,\ 152 verbose=False,\ 150 153 target = folder) 151 154 152 155 ### CLEAN 153 156 os.system('rm -rf *dummy*') 154 os.system('rm -rf '+folder+'*.link*')157 #os.system('rm -rf '+folder+'*.link*') 155 158 -
trunk/UTIL/PYTHON/bibweb/demo.py
r1142 r1333 1 1 #! /usr/bin/env python 2 2 import ads 3 4 lk="demo.link" 5 6 #marche pas 7 #ads.makelink(n="Feynman",fn="Richard",ini="R.",name=lk) 3 8 4 9 ads.makepage('feynman',\ 5 10 retrieve = True,\ 6 11 listyear = range(1990,1938,-1),\ 7 linkads = "demo.link",\12 linkads = lk,\ 8 13 title = "<CENTER><H2><EM><font color='#B8860B;'>Richard Feynman's publications</font></EM></H2></CENTER>", 9 14 target = 'demo') -
trunk/UTIL/PYTHON/bibweb/mywebsite/spiga.link
r1143 r1333 1 http:// cdsads.u-strasbg.fr/cgi-bin/nph-abs_connect?db_key=AST&db_key=PHY&qform=AST&arxiv_sel=astro-ph&arxiv_sel=cond-mat&arxiv_sel=cs&arxiv_sel=gr-qc&arxiv_sel=hep-ex&arxiv_sel=hep-lat&arxiv_sel=hep-ph&arxiv_sel=hep-th&arxiv_sel=math&arxiv_sel=math-ph&arxiv_sel=nlin&arxiv_sel=nucl-ex&arxiv_sel=nucl-th&arxiv_sel=physics&arxiv_sel=quant-ph&arxiv_sel=q-bio&aut_logic=OR&obj_logic=OR&author=Spiga%2C+A%0D%0ASpiga%2C+Aymeric&object=&start_mon=&start_year=&end_mon=&end_year=&ttl_logic=OR&title=&txt_logic=OR&text=&nr_to_return=200&start_nr=1&jou_pick=NO&ref_stems=-GID&data_and=NO&abstract=YES&article=YES&preprint_link=YES&aut_note=YES&group_and=ALL&start_entry_day=&start_entry_mon=&start_entry_year=&end_entry_day=&end_entry_mon=&end_entry_year=&min_score=&sort=NDATE&data_type=BIBTEXPLUS&aut_syn=YES&ttl_syn=YES&txt_syn=YES&aut_wt=1.0&obj_wt=1.0&ttl_wt=0.3&txt_wt=3.0&aut_wgt=YES&obj_wgt=YES&ttl_wgt=YES&txt_wgt=YES&ttl_sco=YES&txt_sco=YES&version=11 http://adsabs.harvard.edu/cgi-bin/nph-abs_connect?db_key=AST&db_key=PHY&db_key=PRE&qform=PHY&arxiv_sel=astro-ph&arxiv_sel=cond-mat&arxiv_sel=cs&arxiv_sel=gr-qc&arxiv_sel=hep-ex&arxiv_sel=hep-lat&arxiv_sel=hep-ph&arxiv_sel=hep-th&arxiv_sel=math&arxiv_sel=math-ph&arxiv_sel=nlin&arxiv_sel=nucl-ex&arxiv_sel=nucl-th&arxiv_sel=physics&arxiv_sel=quant-ph&arxiv_sel=q-bio&aut_xct=YES&aut_logic=OR&author=Spiga++%2C++Aymeric++%3B++Spiga++%2C++A.++%3B+++&ned_query=YES&sim_query=YES&start_mon=&start_year=&end_mon=&end_year=&ttl_logic=OR&title=&txt_logic=OR&text=&nr_to_return=1999&start_nr=1&jou_pick=NO&ref_stems=&data_and=ALL&group_and=ALL&start_entry_day=&start_entry_mon=&start_entry_year=&end_entry_day=&end_entry_mon=&end_entry_year=&min_score=&sort=SCORE&data_type=BIBTEXPLUS&aut_syn=YES&ttl_syn=YES&txt_syn=YES&aut_wt=1.0&ttl_wt=0.3&txt_wt=3.0&aut_wgt=YES&obj_wgt=YES&ttl_wgt=YES&txt_wgt=YES&ttl_sco=YES&txt_sco=YES&version=1 -
trunk/UTIL/PYTHON/bibweb/mywebsite/spiga.py
r1319 r1333 3 3 4 4 ###### 5 # fixes the EGU Discussions journals problem + do not include corrigendae 6 cond = ''' -c 'not journal:"Discussions"' -c 'not title:"Correction to"' ''' 7 ###### 8 5 9 lk="spiga.link" 6 ###### 10 ads.makelink(n="Spiga", 11 fn="Aymeric", 12 ini="A.", 13 name=lk) 14 15 #for tests 16 #lk="spiga.link.save" 7 17 8 18 ads.makepage('pubdd',\ 9 19 embedded = True,\ 10 20 retrieve = True,\ 11 customcond = ''' -c 'title:"dust storm" or title:"dust devil"' ''',\21 customcond = cond + ''' -c 'title:"dust storm" or title:"dust devil"' ''',\ 12 22 linkads = lk,\ 13 23 addpdf = "REF/",\ … … 17 27 embedded = True,\ 18 28 retrieve = False,\ 19 customcond = ''' -c 'abstract:"geological" or title:"surface" or abstract:"deposit"' ''',\29 customcond = cond + ''' -c 'abstract:"geological" or title:"surface" or abstract:"deposit"' ''',\ 20 30 linkads = lk,\ 21 31 addpdf = "REF/",\ … … 25 35 embedded = True,\ 26 36 retrieve = False,\ 27 customcond = ''' -c 'title:"cloud"' ''',\37 customcond = cond + ''' -c 'title:"cloud"' ''',\ 28 38 linkads = lk,\ 29 39 addpdf = "REF/",\ … … 33 43 embedded = True,\ 34 44 retrieve = False,\ 35 customcond = ''' -c 'abstract:"gravity wave"' ''',\45 customcond = cond + ''' -c 'abstract:"gravity wave"' ''',\ 36 46 linkads = lk,\ 37 47 addpdf = "REF/",\ … … 41 51 embedded = True,\ 42 52 retrieve = False,\ 43 customcond = ''' -c 'abstract:"turbulent" or abstract:"large-eddy"' ''',\53 customcond = cond + ''' -c 'abstract:"turbulent" or abstract:"large-eddy"' ''',\ 44 54 linkads = lk,\ 45 55 addpdf = "REF/",\ … … 49 59 embedded = True,\ 50 60 retrieve = False,\ 51 customcond = ''' -c 'abstract:"katabatic"' ''',\61 customcond = cond + ''' -c 'abstract:"katabatic"' ''',\ 52 62 linkads = lk,\ 53 63 addpdf = "REF/",\ … … 57 67 embedded = True,\ 58 68 retrieve = False,\ 59 customcond = ''' -c 'title:"Earth" or title:"terrestrial" or title:"Andes"' ''',\69 customcond = cond + ''' -c 'title:"Earth" or title:"terrestrial" or title:"Andes"' ''',\ 60 70 linkads = lk,\ 61 71 addpdf = "REF/",\ … … 65 75 embedded = True,\ 66 76 retrieve = False,\ 67 customcond = ''' -c 'title:"Mars" or title:"martian"' ''',\77 customcond = cond + ''' -c 'title:"Mars" or title:"martian"' ''',\ 68 78 linkads = lk,\ 69 79 addpdf = "REF/",\ … … 73 83 embedded = True,\ 74 84 retrieve = False,\ 75 customcond = ''' -c 'title:"Saturn"' ''',\85 customcond = cond + ''' -c 'title:"Saturn"' ''',\ 76 86 linkads = lk,\ 77 87 addpdf = "REF/",\ … … 81 91 embedded = True,\ 82 92 retrieve = False,\ 83 customcond = ''' -c 'title:"spectrometer"' ''',\93 customcond = cond + ''' -c 'title:"spectrometer"' ''',\ 84 94 linkads = lk,\ 85 95 addpdf = "REF/",\ … … 89 99 embedded = True,\ 90 100 retrieve = False,\ 91 customcond = ''' -c 'abstract:"global climate model" or abstract:"GCM"' ''',\101 customcond = cond + ''' -c 'abstract:"global climate model" or abstract:"GCM"' ''',\ 92 102 linkads = lk,\ 93 103 addpdf = "REF/",\ … … 97 107 embedded = True,\ 98 108 retrieve = False,\ 109 customcond = cond,\ 99 110 listyear = [2014,2013,2012,2011,2010,2009,2008,2007],\ 100 111 linkads = lk,\ -
trunk/UTIL/PYTHON/bibweb/planetowebsite/lmdplaneto.link
r1179 r1333 1 http://adsabs.harvard.edu/cgi-bin/nph-abs_connect?db_key=AST&db_key=PHY&qform=AST&arxiv_sel=astro-ph&arxiv_sel=cond-mat&arxiv_sel=cs&arxiv_sel=gr-qc&arxiv_sel=hep-ex&arxiv_sel=hep-lat&arxiv_sel=hep-ph&arxiv_sel=hep-th&arxiv_sel=math&arxiv_sel=math-ph&arxiv_sel=nlin&arxiv_sel=nucl-ex&arxiv_sel=nucl-th&arxiv_sel=physics&arxiv_sel=quant-ph&arxiv_sel=q-bio&aut_logic=OR&obj_logic=OR&author=Spiga%2C+A%0D%0AForget%2C+F%0D%0ALebonnois%2C+S%0D%0AMillour%2C+E &object=&start_mon=&start_year=1990&end_mon=&end_year=&ttl_logic=OR&title=&txt_logic=OR&text=&nr_to_return=999&start_nr=1&jou_pick=NO&ref_stems=&data_and=ALL&group_and=ALL&start_entry_day=&start_entry_mon=&start_entry_year=&end_entry_day=&end_entry_mon=&end_entry_year=&min_score=&sort=NDATE&data_type=BIBTEXPLUS&aut_syn=YES&ttl_syn=YES&txt_syn=YES&aut_wt=1.0&obj_wt=1.0&ttl_wt=0.3&txt_wt=3.0&aut_wgt=YES&obj_wgt=YES&ttl_wgt=YES&txt_wgt=YES&ttl_sco=YES&txt_sco=YES&version=11 http://adsabs.harvard.edu/cgi-bin/nph-abs_connect?db_key=AST&db_key=PHY&qform=AST&arxiv_sel=astro-ph&arxiv_sel=cond-mat&arxiv_sel=cs&arxiv_sel=gr-qc&arxiv_sel=hep-ex&arxiv_sel=hep-lat&arxiv_sel=hep-ph&arxiv_sel=hep-th&arxiv_sel=math&arxiv_sel=math-ph&arxiv_sel=nlin&arxiv_sel=nucl-ex&arxiv_sel=nucl-th&arxiv_sel=physics&arxiv_sel=quant-ph&arxiv_sel=q-bio&aut_logic=OR&obj_logic=OR&author=Spiga%2C+A%0D%0AForget%2C+F%0D%0ALebonnois%2C+S%0D%0AMillour%2C+E%0D%0AGuerlet%2C+S%0D%0AMadeleine%2C+J-B&object=&start_mon=&start_year=1990&end_mon=&end_year=&ttl_logic=OR&title=&txt_logic=OR&text=&nr_to_return=999&start_nr=1&jou_pick=NO&ref_stems=&data_and=ALL&group_and=ALL&start_entry_day=&start_entry_mon=&start_entry_year=&end_entry_day=&end_entry_mon=&end_entry_year=&min_score=&sort=NDATE&data_type=BIBTEXPLUS&aut_syn=YES&ttl_syn=YES&txt_syn=YES&aut_wt=1.0&obj_wt=1.0&ttl_wt=0.3&txt_wt=3.0&aut_wgt=YES&obj_wgt=YES&ttl_wgt=YES&txt_wgt=YES&ttl_sco=YES&txt_sco=YES&version=1 -
trunk/UTIL/PYTHON/bibweb/planetowebsite/lmdplaneto.py
r1205 r1333 16 16 linkads = lk,\ 17 17 printnum = True,\ 18 includebook = True,\ 18 19 title = "<CENTER><H2><EM><font color='#B8860B;'>Mars peer-reviewed publications of the LMD 'Planetary Atmospheres' team</font></EM></H2></CENTER>") 19 20 … … 38 39 printnum = True,\ 39 40 title = "<CENTER><H2><EM><font color='#B8860B;'>Exoplanets peer-reviewed publications of the LMD 'Planetary Atmospheres' team</font></EM></H2></CENTER>") 41 42 ads.makepage('pubsaturn',\ 43 retrieve = False,\ 44 customcond = gencond + ''' -c 'title:"Saturn"' ''',\ 45 linkads = lk,\ 46 printnum = True,\ 47 title = "<CENTER><H2><EM><font color='#B8860B;'>Saturn peer-reviewed publications of the LMD 'Planetary Atmospheres' team</font></EM></H2></CENTER>") 40 48 41 49 ads.makepage('pubforget',\ … … 71 79 title = "<CENTER><H2><EM><font color='#B8860B;'>Ehouarn Millour's peer-reviewed publications</font></EM></H2></CENTER>") 72 80 81 ads.makepage('pubmadeleine',\ 82 retrieve = False,\ 83 customcond = gencond + ''' -c 'author:"Madeleine"' ''',\ 84 listyear = range(anneec,2009-1,-1),\ 85 linkads = lk,\ 86 printnum = True,\ 87 title = "<CENTER><H2><EM><font color='#B8860B;'>Jean-Baptiste Madeleine's peer-reviewed publications</font></EM></H2></CENTER>") 88 89 ads.makepage('pubguerlet',\ 90 retrieve = False,\ 91 customcond = gencond + ''' -c 'author:"Guerlet"' ''',\ 92 listyear = range(anneec,2008-1,-1),\ 93 linkads = lk,\ 94 printnum = True,\ 95 title = "<CENTER><H2><EM><font color='#B8860B;'>Sandrine Guerlet's peer-reviewed publications</font></EM></H2></CENTER>") 96 73 97 ads.makepage('pub',\ 74 98 retrieve = False,\ … … 84 108 <a href="pubvenus.html">Venus</a> / 85 109 <a href="pubtitan.html">Titan</a> / 110 <a href="pubsaturn.html">Saturn</a> / 86 111 <a href="pubexo.html">Exoplanets</a><br> 87 112 <br> … … 91 116 <a href="pubmillour.html">E. Millour</a> / 92 117 <a href="pubspiga.html">A. Spiga</a> / 118 <a href="pubmadeleine.html">J.-B. Madeleine</a> / 119 <a href="pubguerlet.html">S. Guerlet</a> 93 120 <br> 94 121 <hr>
Note: See TracChangeset
for help on using the changeset viewer.