Changeset 844

Show
Ignore:
Timestamp:
06/17/07 06:50:16 (2 years ago)
Author:
thomase
Message:

Incorporate the mods mixing process (enhancing the records with data from the awmc bib database) into the main production pipeline for the full munge.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • BADataMunger/trunk/bibliosaver.py

    r840 r844  
    33 
    44import lxml.etree as etree 
     5 
     6import modsmixer 
    57 
    68MODS = "http://www.loc.gov/mods/v3" 
     
    2931    pcontent = etree.tostring(cleantree).encode('utf-8') 
    3032    destfile = "%s-biblio-mods.xml" % self['filenameroot'] 
    31     g = open(join(self['bibdestdir'], destfile),'w') 
     33    destpath = join(self['bibdestdir'], destfile) 
     34    g = open(destpath,'w') 
    3235    g.write(pcontent) 
    3336    g.close() 
     37     
     38    # mix the content in the mods file with content in the master library file 
     39    destfile = "%s-biblio-mods-mixed.xml" % self['filenameroot'] 
     40    m = modsmixer.Mixer(destpath, self['biblibfile'], join(self['bibdestdir'], destfile)) 
    3441         
    3542def do_title(content, titleType=None): 
  • BADataMunger/trunk/pipeline.py

    r841 r844  
    2323     
    2424import pipeline 
    25 p = pipeline.Pipe(r'/TomDocs/awmcwork/pleiadesact/svnbox/BADataMunger/config/BATL065_config.xml', r'/badigit/wordhtml/BATL065_.htm', r'/badigit/extraction/ba065points.xml', r'/badigit/xml4pleiades') 
     25p = pipeline.Pipe(r'/TomDocs/awmcwork/pleiadesact/svnbox/BADataMunger/config/BATL065_config.xml', r'/badigit/wordhtml/BATL065_.htm', r'/badigit/extraction/ba065points.xml', r'/badigit/bib/awmcbib-mods.xml', r'/badigit/xml4pleiades') 
    2626p.cycle() 
    2727         
     
    2929    """ 
    3030 
    31     def __init__(self, configfile, dirfile, gisfile, destdir): 
     31    def __init__(self, configfile, dirfile, gisfile, biblibfile, destdir): 
    3232        # source, source_config=None, source_gis=None): 
    3333        """Create a pipe object to manage the conversions and open the source  
     
    4343        self['dirfile'] = normpath(normcase(dirfile)) 
    4444        self['gisfile'] = normpath(normcase(gisfile)) 
     45        self['biblibfile'] = normpath(normcase(biblibfile)) 
    4546        self['destdir'] = normpath(normcase(destdir)) 
    4647