verbosity changes
This commit is contained in:
parent
2bfe336339
commit
fb8d21505d
3 changed files with 8 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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))]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue