Classes | Functions | Variables
make_static_page Namespace Reference

Classes

class  Tag
 

Functions

def footer ()
 
def AddFile (fout, deets, f)
 

Variables

string header
 
string header2
 
string disclaimer = 'These plots <b>are not yet blessed</b>. Please review them and send comments to the authors. You may only show them publicly once they have passed the review period and migrated to the main blessed plots page.'
 
 page_cfg = json.load(file(config.BLESSED_PLOTS))
 
 doc_deets = json.load(file(config.WEB_PATH + config.JSON_FILENAME))
 
list allNos = [d['id'] for d in doc_deets]
 
list allCatNos = [[n for n in page['docs']] for page in page_cfg]
 
list new = [n for n in allNos if n not in allCatNos]
 
 fout_main = open(config.WEB_PATH + '/index.html', 'w')
 
 cat = page['category']
 
 safe_cat = cat.replace(' ', '_').replace('/', 'and')
 
string thumb = config.WEB_PATH+"plots/"
 
 height = subprocess.check_output("identify -format %h "+thumb, shell=True)
 
 fout_sub = open(config.WEB_PATH + '/' + safe_cat+'.html', 'w')
 
list deets = [d for d in doc_deets if d['id'] == docNo]
 
list auths = [(a['firstname'] or '')+' '+(a['lastname'] or '').encode('ascii', 'ignore') for a in deets['authors']]
 

Function Documentation

def make_static_page.AddFile (   fout,
  deets,
  f 
)

Definition at line 116 of file make_static_page.py.

References runNovaSAM.str.

Referenced by genie::flux::GDk2NuFlux.FluxWindowNormal(), genie::flux::GNuMIFlux.FluxWindowNormal(), genie::flux::GNuMIFlux.LoadBeamSimData(), genie::flux::GSimpleNtpFlux.SetGenWeighted(), and genie::flux::GDk2NuFluxXMLHelper.~GDk2NuFluxXMLHelper().

116 def AddFile(fout, deets, f):
117  thumb = 'plots/'+str(deets['id'])+'/thumbs/'+f['base']+'_thumb.png'
118 
119  with Tag(fout, 'span', {'class': 'plot'}):
120  fout.write('<img src="'+thumb+'"><br>\n')
121  for ext in f['exts']:
122  with Tag(fout, 'a', {'href': 'plots/'+str(deets['id'])+'/'+f['base']+'.'+ext}):
123  fout.write('['+ext+']')
124  fout.write('\n')
125 
126  with Tag(fout, 'div', {'class': 'caption'}):
127  fout.write(f['caption'])
128 
129  fout.write('\n\n')
130 
131 
def AddFile(fout, deets, f)
def make_static_page.footer ( )

Definition at line 112 of file make_static_page.py.

112 def footer():
113  return '\n<hr>\n<a href="https://cdcvs.fnal.gov/redmine/projects/novaart/wiki/Where_to_Find_Graphics_for_NOvA_Public_Presentations">Other sources of images</a>\n\n<hr>\nLast updated '+strftime('%Y-%m-%d %H:%M:%S %Z')+'\n</body></html>'
114 
115 

Variable Documentation

make_static_page.allCatNos = [[n for n in page['docs']] for page in page_cfg]

Definition at line 136 of file make_static_page.py.

list make_static_page.allNos = [d['id'] for d in doc_deets]

Definition at line 135 of file make_static_page.py.

list make_static_page.auths = [(a['firstname'] or '')+' '+(a['lastname'] or '').encode('ascii', 'ignore') for a in deets['authors']]

Definition at line 210 of file make_static_page.py.

make_static_page.cat = page['category']
make_static_page.deets = [d for d in doc_deets if d['id'] == docNo]

Definition at line 194 of file make_static_page.py.

string make_static_page.disclaimer = 'These plots <b>are not yet blessed</b>. Please review them and send comments to the authors. You may only show them publicly once they have passed the review period and migrated to the main blessed plots page.'

Definition at line 110 of file make_static_page.py.

make_static_page.doc_deets = json.load(file(config.WEB_PATH + config.JSON_FILENAME))

Definition at line 133 of file make_static_page.py.

make_static_page.fout_main = open(config.WEB_PATH + '/index.html', 'w')

Definition at line 147 of file make_static_page.py.

make_static_page.fout_sub = open(config.WEB_PATH + '/' + safe_cat+'.html', 'w')

Definition at line 184 of file make_static_page.py.

string make_static_page.header
Initial value:
1 = '''<!DOCTYPE html>
2 <html><head>
3 <meta charset="UTF-8">
4 <title>NOvA'''

Definition at line 30 of file make_static_page.py.

string make_static_page.header2
Initial value:
1 = '''
2 <div style="position:fixed;right:0;top:0">
3  <button type="button" title="Hide" onclick="Hide()" id="hidebutton">Hide captions</button>
4  <button type="button" title="Show" onclick="Show()" hidden id="showbutton">Show captions</button>
5 </div>
6 '''

Definition at line 103 of file make_static_page.py.

string make_static_page.height = subprocess.check_output("identify -format %h "+thumb, shell=True)

Definition at line 173 of file make_static_page.py.

list make_static_page.new = [n for n in allNos if n not in allCatNos]

Definition at line 138 of file make_static_page.py.

Referenced by ROOT.new_artcLcLAssnslEbsimcLcLDk2NucOsimbcLcLMCTruthcOvoidgR(), ROOT.new_artcLcLAssnslEbsimcLcLNuChoicecOsimbcLcLMCTruthcOvoidgR(), ROOT.new_artcLcLAssnslEsimbcLcLGTruthcOsimbcLcLMCTruthcOvoidgR(), ROOT.new_artcLcLAssnslEsimbcLcLMCFluxcOsimbcLcLMCTruthcOvoidgR(), ROOT.new_artcLcLAssnslEsimbcLcLMCParticlecOsimbcLcLMCTruthcOvoidgR(), ROOT.new_artcLcLAssnslEsimbcLcLMCTruthcObsimcLcLDk2NucOvoidgR(), ROOT.new_artcLcLAssnslEsimbcLcLMCTruthcObsimcLcLNuChoicecOvoidgR(), ROOT.new_artcLcLAssnslEsimbcLcLMCTruthcOsimbcLcLGTruthcOvoidgR(), ROOT.new_artcLcLAssnslEsimbcLcLMCTruthcOsimbcLcLMCFluxcOvoidgR(), ROOT.new_artcLcLAssnslEsimbcLcLMCTruthcOsimbcLcLMCParticlecOvoidgR(), ROOT.new_artcLcLPtrlEbsimcLcLDk2NugR(), ROOT.new_artcLcLPtrlEbsimcLcLNuChoicegR(), ROOT.new_artcLcLPtrlEsimbcLcLGTruthgR(), ROOT.new_artcLcLPtrlEsimbcLcLMCFluxgR(), ROOT.new_artcLcLPtrlEsimbcLcLMCParticlegR(), ROOT.new_artcLcLPtrlEsimbcLcLMCTruthgR(), ROOT.new_artcLcLWrapperlEartcLcLAssnslEbsimcLcLDk2NucOsimbcLcLMCTruthcOvoidgRsPgR(), ROOT.new_artcLcLWrapperlEartcLcLAssnslEbsimcLcLNuChoicecOsimbcLcLMCTruthcOvoidgRsPgR(), ROOT.new_artcLcLWrapperlEartcLcLAssnslEsimbcLcLGTruthcOsimbcLcLMCTruthcOvoidgRsPgR(), ROOT.new_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCFluxcOsimbcLcLMCTruthcOvoidgRsPgR(), ROOT.new_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCParticlecOsimbcLcLMCTruthcOvoidgRsPgR(), ROOT.new_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCTruthcObsimcLcLDk2NucOvoidgRsPgR(), ROOT.new_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCTruthcObsimcLcLNuChoicecOvoidgRsPgR(), ROOT.new_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCTruthcOsimbcLcLGTruthcOvoidgRsPgR(), ROOT.new_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCTruthcOsimbcLcLMCFluxcOvoidgRsPgR(), ROOT.new_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCTruthcOsimbcLcLMCParticlecOvoidgRsPgR(), ROOT.new_artcLcLWrapperlEvectorlEartcLcLEventIDgRsPgR(), ROOT.new_artcLcLWrapperlEvectorlEbsimcLcLDk2NugRsPgR(), ROOT.new_artcLcLWrapperlEvectorlEbsimcLcLNuChoicegRsPgR(), ROOT.new_artcLcLWrapperlEvectorlEsimbcLcLGTruthgRsPgR(), ROOT.new_artcLcLWrapperlEvectorlEsimbcLcLMCFluxgRsPgR(), ROOT.new_artcLcLWrapperlEvectorlEsimbcLcLMCNeutrinogRsPgR(), ROOT.new_artcLcLWrapperlEvectorlEsimbcLcLMCParticlegRsPgR(), ROOT.new_artcLcLWrapperlEvectorlEsimbcLcLMCTrajectorygRsPgR(), ROOT.new_artcLcLWrapperlEvectorlEsimbcLcLMCTruthgRsPgR(), ROOT.new_pairlEartcLcLPtrlEbsimcLcLDk2NugRcOartcLcLPtrlEsimbcLcLMCTruthgRsPgR(), ROOT.new_pairlEartcLcLPtrlEbsimcLcLNuChoicegRcOartcLcLPtrlEsimbcLcLMCTruthgRsPgR(), ROOT.new_pairlEartcLcLPtrlEsimbcLcLGTruthgRcOartcLcLPtrlEsimbcLcLMCTruthgRsPgR(), ROOT.new_pairlEartcLcLPtrlEsimbcLcLMCFluxgRcOartcLcLPtrlEsimbcLcLMCTruthgRsPgR(), ROOT.new_pairlEartcLcLPtrlEsimbcLcLMCParticlegRcOartcLcLPtrlEsimbcLcLMCTruthgRsPgR(), ROOT.new_pairlEartcLcLPtrlEsimbcLcLMCTruthgRcOartcLcLPtrlEbsimcLcLDk2NugRsPgR(), ROOT.new_pairlEartcLcLPtrlEsimbcLcLMCTruthgRcOartcLcLPtrlEbsimcLcLNuChoicegRsPgR(), ROOT.new_pairlEartcLcLPtrlEsimbcLcLMCTruthgRcOartcLcLPtrlEsimbcLcLGTruthgRsPgR(), ROOT.new_pairlEartcLcLPtrlEsimbcLcLMCTruthgRcOartcLcLPtrlEsimbcLcLMCFluxgRsPgR(), ROOT.new_pairlEartcLcLPtrlEsimbcLcLMCTruthgRcOartcLcLPtrlEsimbcLcLMCParticlegRsPgR(), ROOT.new_pairlETLorentzVectorcOTLorentzVectorgR(), ROOT.new_pairlEunsignedsPlongcOunsignedsPchargR(), ROOT.new_setlEintgR(), ROOT.new_simbcLcLGTruth(), ROOT.new_simbcLcLMCFlux(), ROOT.new_simbcLcLMCGeneratorInfo(), ROOT.new_simbcLcLMCNeutrino(), ROOT.new_simbcLcLMCParticle(), ROOT.new_simbcLcLMCTrajectory(), ROOT.new_simbcLcLMCTruth(), ROOT.new_unordered_maplEstringcOstringgR(), ROOT.new_vectorlEartcLcLEventIDgR(), ROOT.new_vectorlEbsimcLcLDk2NugR(), ROOT.new_vectorlEbsimcLcLNuChoicegR(), ROOT.new_vectorlEpairlETLorentzVectorcOTLorentzVectorgRsPgR(), ROOT.new_vectorlEpairlEunsignedsPlongcOunsignedsPchargRsPgR(), ROOT.new_vectorlEsimbcLcLGTruthgR(), ROOT.new_vectorlEsimbcLcLMCFluxgR(), ROOT.new_vectorlEsimbcLcLMCNeutrinogR(), ROOT.new_vectorlEsimbcLcLMCParticlegR(), ROOT.new_vectorlEsimbcLcLMCTrajectorygR(), ROOT.new_vectorlEsimbcLcLMCTruthgR(), ROOT.newArray_artcLcLAssnslEbsimcLcLDk2NucOsimbcLcLMCTruthcOvoidgR(), ROOT.newArray_artcLcLAssnslEbsimcLcLNuChoicecOsimbcLcLMCTruthcOvoidgR(), ROOT.newArray_artcLcLAssnslEsimbcLcLGTruthcOsimbcLcLMCTruthcOvoidgR(), ROOT.newArray_artcLcLAssnslEsimbcLcLMCFluxcOsimbcLcLMCTruthcOvoidgR(), ROOT.newArray_artcLcLAssnslEsimbcLcLMCParticlecOsimbcLcLMCTruthcOvoidgR(), ROOT.newArray_artcLcLAssnslEsimbcLcLMCTruthcObsimcLcLDk2NucOvoidgR(), ROOT.newArray_artcLcLAssnslEsimbcLcLMCTruthcObsimcLcLNuChoicecOvoidgR(), ROOT.newArray_artcLcLAssnslEsimbcLcLMCTruthcOsimbcLcLGTruthcOvoidgR(), ROOT.newArray_artcLcLAssnslEsimbcLcLMCTruthcOsimbcLcLMCFluxcOvoidgR(), ROOT.newArray_artcLcLAssnslEsimbcLcLMCTruthcOsimbcLcLMCParticlecOvoidgR(), ROOT.newArray_artcLcLPtrlEbsimcLcLDk2NugR(), ROOT.newArray_artcLcLPtrlEbsimcLcLNuChoicegR(), ROOT.newArray_artcLcLPtrlEsimbcLcLGTruthgR(), ROOT.newArray_artcLcLPtrlEsimbcLcLMCFluxgR(), ROOT.newArray_artcLcLPtrlEsimbcLcLMCParticlegR(), ROOT.newArray_artcLcLPtrlEsimbcLcLMCTruthgR(), ROOT.newArray_artcLcLWrapperlEartcLcLAssnslEbsimcLcLDk2NucOsimbcLcLMCTruthcOvoidgRsPgR(), ROOT.newArray_artcLcLWrapperlEartcLcLAssnslEbsimcLcLNuChoicecOsimbcLcLMCTruthcOvoidgRsPgR(), ROOT.newArray_artcLcLWrapperlEartcLcLAssnslEsimbcLcLGTruthcOsimbcLcLMCTruthcOvoidgRsPgR(), ROOT.newArray_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCFluxcOsimbcLcLMCTruthcOvoidgRsPgR(), ROOT.newArray_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCParticlecOsimbcLcLMCTruthcOvoidgRsPgR(), ROOT.newArray_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCTruthcObsimcLcLDk2NucOvoidgRsPgR(), ROOT.newArray_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCTruthcObsimcLcLNuChoicecOvoidgRsPgR(), ROOT.newArray_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCTruthcOsimbcLcLGTruthcOvoidgRsPgR(), ROOT.newArray_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCTruthcOsimbcLcLMCFluxcOvoidgRsPgR(), ROOT.newArray_artcLcLWrapperlEartcLcLAssnslEsimbcLcLMCTruthcOsimbcLcLMCParticlecOvoidgRsPgR(), ROOT.newArray_artcLcLWrapperlEvectorlEartcLcLEventIDgRsPgR(), ROOT.newArray_artcLcLWrapperlEvectorlEbsimcLcLDk2NugRsPgR(), ROOT.newArray_artcLcLWrapperlEvectorlEbsimcLcLNuChoicegRsPgR(), ROOT.newArray_artcLcLWrapperlEvectorlEsimbcLcLGTruthgRsPgR(), ROOT.newArray_artcLcLWrapperlEvectorlEsimbcLcLMCFluxgRsPgR(), ROOT.newArray_artcLcLWrapperlEvectorlEsimbcLcLMCNeutrinogRsPgR(), ROOT.newArray_artcLcLWrapperlEvectorlEsimbcLcLMCParticlegRsPgR(), ROOT.newArray_artcLcLWrapperlEvectorlEsimbcLcLMCTrajectorygRsPgR(), ROOT.newArray_artcLcLWrapperlEvectorlEsimbcLcLMCTruthgRsPgR(), ROOT.newArray_pairlEartcLcLPtrlEbsimcLcLDk2NugRcOartcLcLPtrlEsimbcLcLMCTruthgRsPgR(), ROOT.newArray_pairlEartcLcLPtrlEbsimcLcLNuChoicegRcOartcLcLPtrlEsimbcLcLMCTruthgRsPgR(), ROOT.newArray_pairlEartcLcLPtrlEsimbcLcLGTruthgRcOartcLcLPtrlEsimbcLcLMCTruthgRsPgR(), ROOT.newArray_pairlEartcLcLPtrlEsimbcLcLMCFluxgRcOartcLcLPtrlEsimbcLcLMCTruthgRsPgR(), ROOT.newArray_pairlEartcLcLPtrlEsimbcLcLMCParticlegRcOartcLcLPtrlEsimbcLcLMCTruthgRsPgR(), ROOT.newArray_pairlEartcLcLPtrlEsimbcLcLMCTruthgRcOartcLcLPtrlEbsimcLcLDk2NugRsPgR(), ROOT.newArray_pairlEartcLcLPtrlEsimbcLcLMCTruthgRcOartcLcLPtrlEbsimcLcLNuChoicegRsPgR(), ROOT.newArray_pairlEartcLcLPtrlEsimbcLcLMCTruthgRcOartcLcLPtrlEsimbcLcLGTruthgRsPgR(), ROOT.newArray_pairlEartcLcLPtrlEsimbcLcLMCTruthgRcOartcLcLPtrlEsimbcLcLMCFluxgRsPgR(), ROOT.newArray_pairlEartcLcLPtrlEsimbcLcLMCTruthgRcOartcLcLPtrlEsimbcLcLMCParticlegRsPgR(), ROOT.newArray_pairlETLorentzVectorcOTLorentzVectorgR(), ROOT.newArray_pairlEunsignedsPlongcOunsignedsPchargR(), ROOT.newArray_setlEintgR(), ROOT.newArray_simbcLcLGTruth(), ROOT.newArray_simbcLcLMCFlux(), ROOT.newArray_simbcLcLMCGeneratorInfo(), ROOT.newArray_simbcLcLMCNeutrino(), ROOT.newArray_simbcLcLMCParticle(), ROOT.newArray_simbcLcLMCTrajectory(), ROOT.newArray_simbcLcLMCTruth(), ROOT.newArray_unordered_maplEstringcOstringgR(), ROOT.newArray_vectorlEartcLcLEventIDgR(), ROOT.newArray_vectorlEbsimcLcLDk2NugR(), ROOT.newArray_vectorlEbsimcLcLNuChoicegR(), ROOT.newArray_vectorlEpairlETLorentzVectorcOTLorentzVectorgRsPgR(), ROOT.newArray_vectorlEpairlEunsignedsPlongcOunsignedsPchargRsPgR(), ROOT.newArray_vectorlEsimbcLcLGTruthgR(), ROOT.newArray_vectorlEsimbcLcLMCFluxgR(), ROOT.newArray_vectorlEsimbcLcLMCNeutrinogR(), ROOT.newArray_vectorlEsimbcLcLMCParticlegR(), ROOT.newArray_vectorlEsimbcLcLMCTrajectorygR(), ROOT.newArray_vectorlEsimbcLcLMCTruthgR(), and cafrwgt::CAFReweight.RetrieveGHEP().

list make_static_page.page_cfg = json.load(file(config.BLESSED_PLOTS))

Definition at line 132 of file make_static_page.py.

make_static_page.safe_cat = cat.replace(' ', '_').replace('/', 'and')

Definition at line 158 of file make_static_page.py.

string make_static_page.thumb = config.WEB_PATH+"plots/"

Definition at line 171 of file make_static_page.py.