Changeset 1179


Ignore:
Timestamp:
19/02/18 12:50:13 (21 months ago)
Author:
mjuckes
Message:

adding makeTables.py to command line

Location:
CMIP6dreqbuild/trunk/src/framework/dreqPy
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/dreq.py

    r1086 r1179  
    448448               else: 
    449449                 v = (v,) 
    450              elif self._a[a].type not in [u'xs:string', u'aa:st__uid']: 
     450             elif self._a[a].type not in [u'xs:string', u'aa:st__uid', 'aa:st__fortranType', 'aa:st__configurationType']: 
    451451               print ('ERROR: Type %s not recognised [%s:%s]' % (self._a[a].type,self._h.label,a) ) 
    452452 
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/dreqCmdl.py

    r1031 r1179  
    4141      ex203.main( scope ) 
    4242      print( "Tests completed" ) 
     43  elif sys.argv[1] == '--makeTables': 
     44      print( "Making web page tables" ) 
     45      if scr: 
     46        import makeTables 
     47      else: 
     48        from . import makeTables 
     49      makeTables.run() 
    4350  else: 
    4451     x = scope.dreqUI(sys.argv[1:]) 
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/makeTables.py

    r1063 r1179  
    6565 
    6666class makePurl(object): 
    67   def __init__(self): 
     67  def __init__(self,dq): 
    6868    c1 = re.compile( '^[a-zA-Z][a-zA-Z0-9]*$' ) 
    6969    mv = dq.coll['var'].items 
     
    139139      bdy.append( '</ul></body></html>\n' ) 
    140140      oo = open( '%s/%s.html' % (self.odir,v.label), 'w' ) 
    141       oo.write( dq.pageTmpl % ( title, '', '../', '../index.html', '\n'.join( bdy ) ) ) 
     141      oo.write( self.dq.pageTmpl % ( title, '', '../', '../index.html', '\n'.join( bdy ) ) ) 
    142142      oo.close() 
    143143      self.anno[v.label] = '<a href="../t/%s.html">Usage</a>' % v.label 
     
    351351htmlStyle['timeSlice']    = {'getIrefs':['__all__']} 
    352352 
    353 if __name__ == "__main__": 
     353def run(): 
    354354  try: 
    355355    import makeTables 
     
    400400    print ('Could not make tables ...') 
    401401    raise 
    402   mp = makePurl() 
     402  mp = makePurl( dq ) 
    403403  mj = makeJs( dq ) 
     404 
     405if __name__ == "__main__": 
     406  run() 
Note: See TracChangeset for help on using the changeset viewer.