From f318a24041abf5e6300914bdc8bde9b48518e33c Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 27 Jul 2021 12:50:38 +0300 Subject: [PATCH] Show clickable path --- picsorter.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/picsorter.py b/picsorter.py index 2ca8b30..2bb5642 100644 --- a/picsorter.py +++ b/picsorter.py @@ -82,7 +82,7 @@ class PicSorter: from_path = os.fspath(filename) to_path = os.fspath(self.config.dir_processed) shutil.move(from_path, to_path) - print("Saved to", to_path) + self.__show_path(to_path) return True return False @@ -109,9 +109,12 @@ class PicSorter: image_path, tags = meta_result to_path = self.library.move(image_path, tags) self.db.add(post_id, tags.tags_string) - print("Saved to", to_path) + self.__show_path(to_path) return True + def __show_path(self, p: str) -> None: + print("Saved to", 'file://' + p.replace(' ', '%20')) + if __name__ == '__main__': PicSorter.parse_args()