class ImportAmbiguityCmd: """ Command to import an Ambiguity Group file and create the proper Ambiguity Groups """ description = "Import a file to seed the Ambiguity Groups" args = [Arg('filename', action='store', help="The file to load")] def run(self, *, filename): """ Create the new log entry """ groups = LoadAmbiguityGroups(filename) loader = AmbiguityLoader(groups) loader.load()
class ImportCmd: """ Command to import a file and create the necessary Words/Symbols """ description = "Import a file to seed the database" args = [Arg('filename', action='store', help="The file to load"), FlagArg('-l', '--listname', action='store', help="Name of the Concept List to create from the given elements")] def run(self, *, filename, listname): """ Create the new log entry """ eggs = LoadEggs(filename) loader = EggsLoader(eggs) loader.load() if listname is not None: ConceptListLoader(listname, eggs, loader.concepts).load()
def __init__(self, *, help): """ Initialize the Arg """ Arg.__init__(self, 'packages', action='store', nargs='+', help=help)
def getValue(self, args): """ Return the value from the args """ packages = Arg.getValue(self, args) return PackageFactory.buildAll(packages)