Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
327 B
Raw Blame
#
#  SPDX-License-Identifier: GPL-3.0-or-later
#

from pathlib import Path


def exportPath(cfg, path, dirname, userDefined):
    return dirname / (Path(path) if userDefined else (cfg["outDir"] / Path(path)))


def sanitize(cfg, path):
    ps = map(lambda p: cfg["sym"].sub("_", p), Path(path).parts)
    return str(Path(*ps))