From 76625b9e84427d8057df32ff55f1ab4905231c7f Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Wed, 27 Jul 2022 08:14:00 -0700 Subject: [PATCH] Feature add keep 730 (#740) * Implemented #730, --keep * Implemented #739, fixed --keep to accept relative paths * Updated to macos-latest Ref: https://github.com/actions/virtual-environments/issues/5583 * Release files for #730 --- .github/workflows/tests.yml | 2 +- API_README.md | 2 +- README.md | 27 +++- docs/.buildinfo | 2 +- docs/_modules/index.html | 6 +- docs/_sources/template_help.rst.txt | 2 +- docs/_static/documentation_options.js | 2 +- docs/cli.html | 11 +- docs/genindex.html | 15 +- docs/index.html | 6 +- docs/objects.inv | Bin 6869 -> 6877 bytes docs/overview.html | 6 +- docs/package_overview.html | 6 +- docs/py-modindex.html | 6 +- docs/reference.html | 6 +- docs/search.html | 6 +- docs/searchindex.js | 2 +- docs/template_help.html | 8 +- docs/tutorial.html | 6 +- docsrc/source/template_help.rst | 2 +- osxphotos/_version.py | 2 +- osxphotos/cli/export.py | 72 +++++++++- osxphotos/docs/docs.zip | Bin 1199788 -> 1200183 bytes tests/test_cli.py | 188 ++++++++++++++++++++++++++ 24 files changed, 336 insertions(+), 49 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0d439ea2..dc044e00 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ jobs: strategy: max-parallel: 4 matrix: - os: [macos-10.15] + os: [macos-latest] python-version: ['3.8', '3.9', '3.10'] steps: diff --git a/API_README.md b/API_README.md index 81195f5c..0ca69334 100644 --- a/API_README.md +++ b/API_README.md @@ -2005,7 +2005,7 @@ cog.out(get_template_field_table()) |{lf}|A line feed: '\n', alias for {newline}| |{cr}|A carriage return: '\r'| |{crlf}|a carriage return + line feed: '\r\n'| -|{osxphotos_version}|The osxphotos version, e.g. '0.50.9'| +|{osxphotos_version}|The osxphotos version, e.g. '0.50.10'| |{osxphotos_cmd_line}|The full command line used to run osxphotos| |{album}|Album(s) photo is contained in| |{folder_album}|Folder path + album photo is contained in. e.g. 'Folder/Subfolder/Album' or just 'Album' if no enclosing folder| diff --git a/README.md b/README.md index e42c20c3..5c21b16d 100644 --- a/README.md +++ b/README.md @@ -1195,6 +1195,29 @@ Options: you intend before using --cleanup. Use --dry- run with --cleanup first if you're not certain. + --keep KEEP_PATH When used with --cleanup, prevents file or + directory KEEP_PATH from being deleted when + cleanup is run. Use this if there are files in + the export directory that you don't want to be + deleted when --cleanup is run. KEEP_PATH may + be a file path, e.g. + '/Volumes/Photos/keep.jpg', or a file path and + wild card, e.g. '/Volumes/Photos/*.txt', or a + directory, e.g. '/Volumes/Photos/KeepMe'. + KEEP_PATH may be an absolute path or a + relative path. If it is relative, it must be + relative to the export destination. For + example if export destination is + `/Volumes/Photos` and you want to keep all + `.txt` files, you can specify `--keep + "/Volumes/Photos/*.txt"` or `--keep "*.txt"`. + If wild card is used, KEEP_PATH must be + enclosed in quotes to prevent the shell from + expanding the wildcard, e.g. `--keep + "/Volumes/Photos/*.txt"`. If KEEP_PATH is a + directory, all files and directories contained + in KEEP_PATH will be kept. --keep may be + repeated to keep additional files/directories. --add-exported-to-album ALBUM Add all exported photos to album ALBUM in Photos. Album ALBUM will be created if it doesn't exist. All exported photos will be @@ -1926,7 +1949,7 @@ Substitution Description {lf} A line feed: '\n', alias for {newline} {cr} A carriage return: '\r' {crlf} a carriage return + line feed: '\r\n' -{osxphotos_version} The osxphotos version, e.g. '0.50.9' +{osxphotos_version} The osxphotos version, e.g. '0.50.10' {osxphotos_cmd_line} The full command line used to run osxphotos The following substitutions may result in multiple values. Thus if specified @@ -2403,7 +2426,7 @@ The following template field substitutions are availabe for use the templating s |{lf}|A line feed: '\n', alias for {newline}| |{cr}|A carriage return: '\r'| |{crlf}|a carriage return + line feed: '\r\n'| -|{osxphotos_version}|The osxphotos version, e.g. '0.50.9'| +|{osxphotos_version}|The osxphotos version, e.g. '0.50.10'| |{osxphotos_cmd_line}|The full command line used to run osxphotos| |{album}|Album(s) photo is contained in| |{folder_album}|Folder path + album photo is contained in. e.g. 'Folder/Subfolder/Album' or just 'Album' if no enclosing folder| diff --git a/docs/.buildinfo b/docs/.buildinfo index 252548a7..d378f2cf 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 9565e5b4ec4fa43c83e599eb4b97045f +config: 91bc0cab5ddda090f3127abf3252d5cc tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_modules/index.html b/docs/_modules/index.html index e6becb56..a3c191bb 100644 --- a/docs/_modules/index.html +++ b/docs/_modules/index.html @@ -5,7 +5,7 @@ - Overview: module code - osxphotos 0.50.9 documentation + Overview: module code - osxphotos 0.50.10 documentation @@ -123,7 +123,7 @@
-
osxphotos 0.50.9 documentation
+
osxphotos 0.50.10 documentation
@@ -146,7 +146,7 @@
@@ -147,7 +147,7 @@
@@ -145,7 +145,7 @@
@@ -147,7 +147,7 @@
@@ -147,7 +147,7 @@
@@ -147,7 +147,7 @@
@@ -145,7 +145,7 @@
@@ -147,7 +147,7 @@
@@ -144,7 +144,7 @@
@@ -147,7 +147,7 @@
@@ -147,7 +147,7 @@