From fb8d21505d84c9abd6e85ec71b678b6d7e1d20e2 Mon Sep 17 00:00:00 2001 From: randogoth Date: Sun, 11 Jun 2023 01:10:21 +0300 Subject: [PATCH] verbosity changes --- orvani/cmd.py | 10 +++++----- orvani/orvani.py | 2 +- test/.context.yaml | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/orvani/cmd.py b/orvani/cmd.py index 371b30b..7b7b4be 100644 --- a/orvani/cmd.py +++ b/orvani/cmd.py @@ -118,19 +118,19 @@ def main(): if args.file and args.context: fb = orvani.add(args.file, *args.context) if fb[0] == 0: - console.print(f':label: File [strong]{fb[1]}[/strong] successfully tagged: {nice_context(fb[2])}') + console.print(f':label: Entry {nice_context(fb[2])}successfully added to file [strong]{fb[1]}[/strong].') elif fb[0] == 1: - console.print(f":thinking_face: Sorry, the file [strong]{fb[1]}[/strong] doesn't exist.") + console.print(f":thinking_face: File [strong]{fb[1]}[/strong] doesn't exist.") elif args.command in ['remove', 'rem', 'r']: if args.file and args.context: fb = orvani.remove(args.file, *args.context) if fb[0] == 0: - console.print(f':wastebasket: Tags {nice_context(fb[2])}of file [white][strong]{fb[1]}[/strong][/white] successfully removed.') + console.print(f':wastebasket: Entry {nice_context(fb[2])}successfully removed from file [strong]{fb[1]}[/strong].') elif fb[0] == 1: - console.print(f":thinking_face: Sorry, the file [strong]{fb[1]}[/strong] doesn't exist.") + console.print(f":thinking_face: File [strong]{fb[1]}[/strong] doesn't exist.") elif fb[0] == 2: - console.print(f":mag: Sorry, could not find an entry for [white][strong]{fb[1]}[/strong][/white] and {nice_context(fb[2])}") + console.print(f":mag: No match found for [white][strong]{fb[1]}[/strong][/white] and {nice_context(fb[2])}") elif args.command in ['list', 'ls', 'dir', 'l']: query = [args.file] + args.context diff --git a/orvani/orvani.py b/orvani/orvani.py index 6a7fcfc..f71db23 100644 --- a/orvani/orvani.py +++ b/orvani/orvani.py @@ -272,7 +272,7 @@ class OrvaniTag: shutil.copy2(source, dest) else: shutil.move(source, dest, copy_function=shutil.copy2) - return [0, dest, sourcedata] + return [0, source, dest, sourcedata] else: return [1, os.path.isfile(source), os.path.isdir(os.path.dirname(dest))] diff --git a/test/.context.yaml b/test/.context.yaml index a3fa3e6..332f365 100644 --- a/test/.context.yaml +++ b/test/.context.yaml @@ -22,7 +22,8 @@ items: - whoa - that test.txt: - contexts: [] + contexts: + - bbb note: dededede projects: [] tags: