Inkscape.org
Creating New Extensions To improve Open in VSCode extension
  1. #1
    Go Ray Go Ray @ray34g_

    Hello,

    I am currently developing an extension for VSCode that integrates with Inkscape, mainly to write embedded JS and CSS more easily using external text editor.

    The extension creates temporary folders for editing and stores the paths to these folders in data attributes of the script and style nodes, but I do not want this.
    The reason for this is that the extension cannot remember the path to the temporary folder.

    I wonder if there is a way to use something like global variables that can retain data for the duration that the Inkscape application is running.

    I would appreciate any advice on best practices or alternative methods to retain data during Inkscape's runtime without using such temporary attributes.
    I apologize if my English is not perfect, as Japanese is my native language.

    Thank you.

     

  2. #2
    Go Ray Go Ray @ray34g_

    Open In VSCode - Inkspace the Inkscape Gallery | Inkscape

    ray34g/open_in_vscode: Inkscape extension to edit embedded Javascript and CSS with VSCode. (github.com)

  3. #3
    inklinea inklinea @inklinea⛰️

    It's not possible as far as I know to have a persistent variable.

    However, is it not possible to use

    tempfile.gettempdir()

    Which should give the current system temp folder on Ubuntu and Windows ? I use it.

    Then just have a single custom attribute in the svg file to represent the filename prefix ? 

Inkscape Inkscape.org Inkscape Forum Creating New Extensions To improve Open in VSCode extension