Each time I import a different tileset, I need to automate this process
If I undestand correctly what you mean:
Calling this function with filepath of local tileset, But file path must be written with a "file:/// prefix