def __init__(self, root_dir, parser, argv): Command.__init__(self, root_dir, parser, argv) self.project_name = self.options.project_name addresses = self._parse_addresses() if self.args else scan_addresses( root_dir) self.targets = [Target.get(address) for address in addresses]
def _parse_addresses(self): addresses = OrderedSet() for spec in self.args: try: if self.options.is_directory_list: for address in scan_addresses(self.root_dir, spec): addresses.add(address) else: addresses.add(Address.parse(self.root_dir, spec)) except: self.error("Problem parsing spec %s: %s" % (spec, traceback.format_exc())) return addresses
def get_targets(): for address in util.scan_addresses(root_dir): target = Target.get(address) if Doc._is_documentable(target): yield target
def __init__(self, root_dir, parser, argv): Command.__init__(self, root_dir, parser, argv) self.project_name = self.options.project_name addresses = self._parse_addresses() if self.args else scan_addresses(root_dir) self.targets = [ Target.get(address) for address in addresses ]