Skip to content

Instantly share code, notes, and snippets.

View clingerman's full-sized avatar

Jason Clingerman clingerman

  • US National Archives
  • College Park, MD
View GitHub Profile
@clingerman
clingerman / combine.py
Last active August 8, 2022 21:52 — forked from DominicBM/combine.py
combine multiple xml files into one (Python 2.7)
import os, re, glob
file = 'm384-import-1.xml'
filenames = glob.glob("*.xml")
counter = 2
outputfile = file
for fname in filenames:
in_size = (os.stat(fname).st_size / 1000000)
import csv, xml, re, time, os, datetime, argparse
import xml.etree.ElementTree as ET
# Construct python command like: python reformat_partner_xml.py
parser = argparse.ArgumentParser()
parser.add_argument('--series', dest='series', metavar='SERIES',
action='store')
parser.add_argument('--objects', dest='objects', metavar='OBJECTS',
action='store')