from os.path import join
from ..configuration import config
from ..metadata import load_json, create_segment_metadata

def update_metadata(cmd):
    for segment in ['arrest', 'sentence', 'supervision', 'demographic', 'flat', 'subject', 'summary', 'prosecution']:
        print 'Start %s metadata update ...' % segment
        load_json(join(config.meta_dir, segment), segment, cmd.args.verbose)
        print '...finished updating %s metadata.' % segment
    
    #create_segment_metadata(config.meta_dir, cmd.args.verbose)