core
Client
Client (path:str, verbose:bool=False, depth:int=0)
*Initialize the Client with a specific Visio file.
Args: path (str): The path to the Visio file. verbose (bool): Optional; True to enable detailed logging, False by default. depth (int): Optional; the depth of the graph to download, 0 by default.*
Client.convert
Client.convert (input_path:str, output_dir:str, depth:int=0, verbose:bool=False)
*Convert all Visio files found at the specified input path to RDF and visualize them.
Args: input_path (str): A glob pattern to specify which files to process. output_dir (str): The directory where output files will be saved. depth (int): Optional; the depth of the graph to download, 0 by default.*
Client.main
Client.main (path:str, output_dir:str, page:int=-1, verbose:bool=False, depth:int=0)
*Process a single Visio file: parse it, convert it to RDF, and create visualizations.
Args: path (str): The path to the Visio file. output_dir (str): The directory to save output files. page (int): Optional; specify which page of the Visio file to process, -1 means all pages. verbose (bool): Optional; True for detailed output, False by default. depth (int): Optional; the depth of the graph to download, 0 by default.*
Client.create_nodes_and_edges
Client.create_nodes_and_edges (page_index:int)
*Creates nodes and edges based on the provided page index from the visualization pages. It collects and organizes data about connections and shapes on each page.
Args: page_index (int): Index of the page to process. If -1, all pages are processed.*
Client.determine_shape_name
Client.determine_shape_name (child:Any, master_page_id:str)
*Determines the shape name based on the child’s properties and master page ID.
Args: child (Any): The child shape object. master_page_id (str): ID of the master page to help determine the shape.
Returns: str: A string indicating the shape type.*
Client.convertToRdf
Client.convertToRdf ()
*Converts the nodes and edges to RDF format.
Returns: str: The RDF data.*
Client.save
Client.save (output_dir)
*Save the RDF data to a file.
Args: output_dir (str): The directory to save the output files.
Returns: List[str]: A list of paths to the saved files.*
Client.download
Client.download (url:str)
*Download RDF data from a specific URL.
Args: url (str): The URL to download RDF data from.
Returns: Graph: An RDF graph object containing the downloaded data.*
Client.fix_subject_str
Client.fix_subject_str (subject_str:str)
*Fixes the subject string by removing unnecessary parts.
Args: subject_str (str): The subject string to fix.
Returns: str: The fixed subject string.*