From af9311c9c86a3d0a5764ebd1539d40f14e62f2ec Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sat, 27 Aug 2022 11:11:38 -0700 Subject: [PATCH] Fixed --print to work with {tab} --- osxphotos/cli/dump.py | 2 +- osxphotos/cli/query.py | 2 +- tests/test_cli_dump.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osxphotos/cli/dump.py b/osxphotos/cli/dump.py index 568a79ca..2162fe5b 100644 --- a/osxphotos/cli/dump.py +++ b/osxphotos/cli/dump.py @@ -89,4 +89,4 @@ def dump( for rendered_template in rendered_templates: if not rendered_template: continue - rich_click_echo(rendered_template) + print(rendered_template) diff --git a/osxphotos/cli/query.py b/osxphotos/cli/query.py index 62a39f33..024deb71 100644 --- a/osxphotos/cli/query.py +++ b/osxphotos/cli/query.py @@ -414,7 +414,7 @@ def query( for rendered_template in rendered_templates: if not rendered_template: continue - rich_click_echo(rendered_template) + print(rendered_template) if not quiet: print_photo_info(photos, cli_json or json_, print_func=click.echo) diff --git a/tests/test_cli_dump.py b/tests/test_cli_dump.py index 96ac28e8..63e05dc5 100644 --- a/tests/test_cli_dump.py +++ b/tests/test_cli_dump.py @@ -63,9 +63,9 @@ def test_dump_print(photos): db_path, "--deleted", "--print", - "{uuid}_{photo.original_filename}", + "{uuid}{tab}{photo.original_filename}", ], ) assert result.exit_code == 0 for photo in photos: - assert f"{photo.uuid}_{photo.original_filename}" in result.output + assert f"{photo.uuid}\t{photo.original_filename}" in result.output