Skip to content

Commit 1a21888

Browse files
committed
Imagecatalog: Implement get_image method
1 parent 4a61580 commit 1a21888

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

marmoset/imagecatalog/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from .catalog import ImageCatalog
44

5-
65
def list_all(args):
76
"""List all images."""
87
# pylint: disable-msg=unused-argument
@@ -11,6 +10,11 @@ def list_all(args):
1110
for image_metadata in metadata_list:
1211
print_metadata(image_metadata)
1312

13+
def get_image(args):
14+
"""Get Metadata for a single image"""
15+
catalog = ImageCatalog
16+
metadata = catalog.get_image_path(args.filename)
17+
print_metadata(metadata)
1418

1519
def print_metadata(metadata_dict):
1620
"""Print the image's metadata dict."""

0 commit comments

Comments
 (0)