added edited and external_edit to cmd_line and __str__, to_json; closes #12
This commit is contained in:
@@ -1393,6 +1393,7 @@ class PhotoInfo:
|
|||||||
"path": self.path(),
|
"path": self.path(),
|
||||||
"ismissing": self.ismissing(),
|
"ismissing": self.ismissing(),
|
||||||
"hasadjustments": self.hasadjustments(),
|
"hasadjustments": self.hasadjustments(),
|
||||||
|
"external_edit": self.external_edit(),
|
||||||
"favorite": self.favorite(),
|
"favorite": self.favorite(),
|
||||||
"hidden": self.hidden(),
|
"hidden": self.hidden(),
|
||||||
"latitude": self._latitude(),
|
"latitude": self._latitude(),
|
||||||
@@ -1417,6 +1418,7 @@ class PhotoInfo:
|
|||||||
"path": self.path(),
|
"path": self.path(),
|
||||||
"ismissing": self.ismissing(),
|
"ismissing": self.ismissing(),
|
||||||
"hasadjustments": self.hasadjustments(),
|
"hasadjustments": self.hasadjustments(),
|
||||||
|
"external_edit": self.external_edit(),
|
||||||
"favorite": self.favorite(),
|
"favorite": self.favorite(),
|
||||||
"hidden": self.hidden(),
|
"hidden": self.hidden(),
|
||||||
"latitude": self._latitude(),
|
"latitude": self._latitude(),
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
""" version info """
|
""" version info """
|
||||||
|
|
||||||
__version__ = "0.14.15"
|
__version__ = "0.14.16"
|
||||||
|
|
||||||
|
|||||||
@@ -150,6 +150,8 @@ def dump(cli_obj):
|
|||||||
is_flag=True,
|
is_flag=True,
|
||||||
help="case insensitive search for name or description. Does not apply to keyword, person, or album",
|
help="case insensitive search for name or description. Does not apply to keyword, person, or album",
|
||||||
)
|
)
|
||||||
|
@click.option("--edited", is_flag=True, help="search for photos that have been edited")
|
||||||
|
@click.option("--external-edit", is_flag=True, help="search for photos edited in external editor")
|
||||||
@click.option("--favorite", is_flag=True, help="search for photos marked favorite")
|
@click.option("--favorite", is_flag=True, help="search for photos marked favorite")
|
||||||
@click.option(
|
@click.option(
|
||||||
"--not-favorite", is_flag=True, help="search for photos not marked favorite"
|
"--not-favorite", is_flag=True, help="search for photos not marked favorite"
|
||||||
@@ -184,6 +186,8 @@ def query(
|
|||||||
no_description,
|
no_description,
|
||||||
ignore_case,
|
ignore_case,
|
||||||
json,
|
json,
|
||||||
|
edited,
|
||||||
|
external_edit,
|
||||||
favorite,
|
favorite,
|
||||||
not_favorite,
|
not_favorite,
|
||||||
hidden,
|
hidden,
|
||||||
@@ -207,6 +211,8 @@ def query(
|
|||||||
no_name,
|
no_name,
|
||||||
description,
|
description,
|
||||||
no_description,
|
no_description,
|
||||||
|
edited,
|
||||||
|
external_edit,
|
||||||
favorite,
|
favorite,
|
||||||
not_favorite,
|
not_favorite,
|
||||||
hidden,
|
hidden,
|
||||||
@@ -276,6 +282,12 @@ def query(
|
|||||||
elif no_description:
|
elif no_description:
|
||||||
photos = [p for p in photos if not p.description()]
|
photos = [p for p in photos if not p.description()]
|
||||||
|
|
||||||
|
if edited:
|
||||||
|
photos = [p for p in photos if p.hasadjustments()]
|
||||||
|
|
||||||
|
if external_edit:
|
||||||
|
photos = [p for p in photos if p.external_edit()]
|
||||||
|
|
||||||
if favorite:
|
if favorite:
|
||||||
photos = [p for p in photos if p.favorite()]
|
photos = [p for p in photos if p.favorite()]
|
||||||
elif not_favorite:
|
elif not_favorite:
|
||||||
@@ -332,6 +344,7 @@ def print_photo_info(photos, json=False):
|
|||||||
"path",
|
"path",
|
||||||
"ismissing",
|
"ismissing",
|
||||||
"hasadjustments",
|
"hasadjustments",
|
||||||
|
"external_edit",
|
||||||
"favorite",
|
"favorite",
|
||||||
"hidden",
|
"hidden",
|
||||||
"latitude",
|
"latitude",
|
||||||
@@ -354,6 +367,7 @@ def print_photo_info(photos, json=False):
|
|||||||
p.path(),
|
p.path(),
|
||||||
p.ismissing(),
|
p.ismissing(),
|
||||||
p.hasadjustments(),
|
p.hasadjustments(),
|
||||||
|
p.external_edit(),
|
||||||
p.favorite(),
|
p.favorite(),
|
||||||
p.hidden(),
|
p.hidden(),
|
||||||
p._latitude(),
|
p._latitude(),
|
||||||
|
|||||||
Reference in New Issue
Block a user