(
        self,
        domains=['enterprise-attack', 'mobile-attack'],
        layers=None,
        markdown=None,
        minor_changes=False,
        unchanged=False,
        new='new',
        old='old',
        show_key=False,
        site_prefix='',
        types=['technique', 'software', 'group', 'mitigation'],
        use_taxii=False,
        verbose=False
    )
Construct a new 'DiffStix' object.

        params:
            domains: list of domains to parse, e.g. enterprise-attack, mobile-attack
            layers: array of output filenames for layer files, e.g. ['enterprise.json', 'mobile.json', 'pre.json']
            markdown: output filename for markdown content to be written to
            minor_changes: if true, also report minor changes section (changes which didn't increment version)
            new: directory to load for new stix version
            old: directory to load for old stix version
            show_key: if true, output key to markdown file
            site_prefix: prefix links in markdown output
            types: which types of objects to report on, e.g technique, software
            verbose: if true, print progress bar and status messages to stdout
Construct a new 'DiffStix' object.
Construct a new DiffStix object .
def __init__(
        self,
        domains=['enterprise-attack', 'mobile-attack'],
        layers=None,
        markdown=None,
        minor_changes=False,
        unchanged=False,
        new='new',
        old='old',
        show_key=False,
        site_prefix='',
        types=['technique', 'software', 'group', 'mitigation'],
        use_taxii=False,
        verbose=False
    ):
        """
        Construct a new 'DiffStix' object.

        params:
            domains: list of domains to parse, e.g. enterprise-attack, mobile-attack
            layers: array of output filenames for layer files, e.g. ['enterprise.json', 'mobile.json', 'pre.json']
            markdown: output filename for markdown content to be written to
            minor_changes: if true, also report minor changes section (changes which didn't increment version)
            new: directory to load for new stix version
            old: directory to load for old stix version
            show_key: if true, output key to markdown file
            site_prefix: prefix links in markdown output
            types: which types of objects to report on, e.g technique, software
            verbose: if true, print progress bar and status messages to stdout
        """
        self.domains = domains
        self.layers = layers
        self.markdown = markdown
        self.minor_changes = minor_changes
        self.unchanged = unchanged
        self.new = new
        self.old = old
        self.show_key = show_key
        self.site_prefix = site_prefix
        self.types = types
        self.use_taxii = use_taxii
        self.verbose = verbose

        self.data = {   # data gets load into here in the load() function. All other functionalities rely on this data structure
            # technique {
                # enterprise-attack {
                    # additions: [],
                    # deletions: [],
                    # changes: [],
                    # minor_changes: [],
                    # revocations: [],
                    # deprecations: [],
                    # unchanged: []
                # }
                # mobile-attack...
            # }
            # software...
        }
        self.stixIDToName = {} # stixID to object name
        self.new_subtechnique_of_rels = [] # all subtechnique-of relationships in the new data
        self.old_subtechnique_of_rels = [] # all subtechnique-of relationships in the old data
        self.new_id_to_technique = {} # stixID => technique for every technique in the new data
        self.old_id_to_technique = {} # stixID => technique for every technique in the old data
        # build the bove data structures
        self.load_data()
        # remove duplicate relationships
        self.new_subtechnique_of_rels = [i for n, i in enumerate(self.new_subtechnique_of_rels) if i not in self.new_subtechnique_of_rels[n+1:]]
        self.old_subtechnique_of_rels = [i for n, i in enumerate(self.old_subtechnique_of_rels) if i not in self.old_subtechnique_of_rels[n+1:]]
def __init__ ( self , domains = [ 'enterprise-attack' , 'mobile-attack' ] , layers = None , markdown = None , minor_changes = False , unchanged = False , new = 'new' , old = 'old' , show_key = False , site_prefix = '' , types = [ 'technique' , 'software' , 'group' , 'mitigation' ] , use_taxii = False , verbose = False ) : self . domains = domains self . layers = layers self . markdown = markdown self . minor_changes = minor_changes self . unchanged = unchanged self . new = new self . old = old self . show_key = show_key self . site_prefix = site_prefix self . types = types self . use_taxii = use_taxii self . verbose = verbose self . data = { # data gets load into here in the load() function. All other functionalities rely on this data structure # technique { # enterprise-attack { # additions: [], # deletions: [], # changes: [], # minor_changes: [], # revocations: [], # deprecations: [], # unchanged: [] # } # mobile-attack... # } # software... } self . stixIDToName = { } # stixID to object name self . new_subtechnique_of_rels = [ ] # all subtechnique-of relationships in the new data self . old_subtechnique_of_rels = [ ] # all subtechnique-of relationships in the old data self . new_id_to_technique = { } # stixID => technique for every technique in the new data self . old_id_to_technique = { } # stixID => technique for every technique in the old data # build the bove data structures self . load_data ( ) # remove duplicate relationships self . new_subtechnique_of_rels = [ i for n , i in enumerate ( self . new_subtechnique_of_rels ) if i not in self . new_subtechnique_of_rels [ n + 1 : ] ] self . old_subtechnique_of_rels = [ i for n , i in enumerate ( self . old_subtechnique_of_rels ) if i not in self . old_subtechnique_of_rels [ n + 1 : ] ]