make_filesystem_url_mutator

wwt_data_formats.folder.make_filesystem_url_mutator(basedir)[source]

Return a function that converts relative URLs to filesystem paths.

Parameters:
basedirstring, path

An absolute path that the relative URLs will be combined with.

Returns:
A mutator function suitable for use with
wwt_data_formats.abcs.UrlContainer.mutate_urls().

Notes

This function is designed for usage with wwt_data_formats.abcs.UrlContainer.mutate_urls(). It returns a mutator function that can be passed to this method. The mutator will take relative URLs and convert them to filesystem paths by combining them with the basedir argument. Input URLs that are absolute will be unchanged.