diff --git a/osxphotos/__init__.py b/osxphotos/__init__.py index 279f2eff..0563d130 100644 --- a/osxphotos/__init__.py +++ b/osxphotos/__init__.py @@ -19,6 +19,7 @@ import objc from Foundation import * from . import _applescript +from ._version import __version__ # TODO: find edited photos: see https://github.com/orangeturtle739/photos-export/blob/master/extract_photos.py # TODO: Add test for imageTimeZoneOffsetSeconds = None diff --git a/osxphotos/_version.py b/osxphotos/_version.py index a57f56a3..d5a4582f 100644 --- a/osxphotos/_version.py +++ b/osxphotos/_version.py @@ -1,4 +1,4 @@ """ version info """ -__version__ = "0.14.13" +__version__ = "0.14.14" diff --git a/osxphotos/cmd_line.py b/osxphotos/cmd_line.py index 512ff7eb..fc98ee7b 100644 --- a/osxphotos/cmd_line.py +++ b/osxphotos/cmd_line.py @@ -7,6 +7,8 @@ import yaml import osxphotos +from ._version import __version__ + # TODO: add "--any" to search any field (e.g. keyword, description, name contains "wedding") (add case insensitive option) @@ -37,6 +39,7 @@ CTX_SETTINGS = dict(help_option_names=["-h", "--help"]) help="Print output in JSON format", ) @click.option("--debug", required=False, is_flag=True, default=False, hidden=True) +@click.version_option(__version__, "--version", "-v") @click.pass_context def cli(ctx, db, json, debug): ctx.obj = CLI_Obj(db=db, json=json, debug=debug) @@ -188,8 +191,8 @@ def query( missing, not_missing, ): - """ Query the Photos database using 1 or more search options\n - If more than one option is provided, they are treated as "AND" + """ query the Photos database using 1 or more search options; + if more than one option is provided, they are treated as "AND" (e.g. search for photos matching all options) """