Changeset 844
- Timestamp:
- 06/17/07 06:50:16 (2 years ago)
- Files:
-
- BADataMunger/trunk/bibliosaver.py (modified) (2 diffs)
- BADataMunger/trunk/pipeline.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
BADataMunger/trunk/bibliosaver.py
r840 r844 3 3 4 4 import lxml.etree as etree 5 6 import modsmixer 5 7 6 8 MODS = "http://www.loc.gov/mods/v3" … … 29 31 pcontent = etree.tostring(cleantree).encode('utf-8') 30 32 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') 32 35 g.write(pcontent) 33 36 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)) 34 41 35 42 def do_title(content, titleType=None): BADataMunger/trunk/pipeline.py
r841 r844 23 23 24 24 import 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')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/bib/awmcbib-mods.xml', r'/badigit/xml4pleiades') 26 26 p.cycle() 27 27 … … 29 29 """ 30 30 31 def __init__(self, configfile, dirfile, gisfile, destdir):31 def __init__(self, configfile, dirfile, gisfile, biblibfile, destdir): 32 32 # source, source_config=None, source_gis=None): 33 33 """Create a pipe object to manage the conversions and open the source … … 43 43 self['dirfile'] = normpath(normcase(dirfile)) 44 44 self['gisfile'] = normpath(normcase(gisfile)) 45 self['biblibfile'] = normpath(normcase(biblibfile)) 45 46 self['destdir'] = normpath(normcase(destdir)) 46 47
