Inkscape.org
Creating New Extensions Getting SVG file path
  1. #1
    JK_is_here JK_is_here @JK_is_here

    I am working on an extension right now, I want to get the svg file location / path of the file using python script. I tried using os.path() but I am getting the path of where I save the python but not where I save the svg file. 
     

    PS: the python file and the svg is in different folder / directory

  2. #2
    inklinea inklinea @inklinea⛰️

     

    # Current svg save location (if has been saved)
    document_path = self.document_path()
    # Current SVG name in Inkscape
    document_name = self.svg.name
    # Current input file - a tempfile, current state of svg sent
    # to extension system when extension was run.
    input_file = self.options.input_file