def initMetadata(args): with open(args.config) as f: config = yaml.load(f.read()) guild = Guild(config, args.rebuild) if args.init: guild.init() else: guild.update() print print args print guild.wikiProject.snapshotsLoaded, "snapshots loaded" print guild.wikiProject.snapshotsCreated, "snapshots created" print guild.wikiProject.assetsCreated, "metadata created"
#!/usr/bin/env python import argparse, yaml, re from xidb import Guild parser = argparse.ArgumentParser( description="Upgrade markdown proposals to json") parser.add_argument('-c', '--config', dest='config') args = parser.parse_args() conffile = args.config or "../meridion.yaml" with open(conffile) as f: config = yaml.load(f.read()) guild = Guild(config) guild.update() for asset in guild.assets: if re.search("^Proposal-\d{4}\.md$", asset): print asset oldProposal = guild.assets[asset] print oldProposal.xid
#!/usr/bin/env python import argparse, yaml, re from xidb import Guild parser = argparse.ArgumentParser(description="Upgrade markdown proposals to json") parser.add_argument('-c', '--config', dest='config') args = parser.parse_args() conffile = args.config or "../meridion.yaml" with open(conffile) as f: config = yaml.load(f.read()) guild = Guild(config) guild.update() for asset in guild.assets: if re.search("^Proposal-\d{4}\.md$", asset): print asset oldProposal = guild.assets[asset] print oldProposal.xid