Updated CHANGELOG.md
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -2880,7 +2880,6 @@ def test_export_filename_template_1():
|
||||
],
|
||||
)
|
||||
assert result.exit_code == 0
|
||||
workdir = os.getcwd()
|
||||
files = glob.glob("*.*")
|
||||
assert sorted(files) == sorted(CLI_EXPORTED_FILENAME_TEMPLATE_FILENAMES1)
|
||||
|
||||
@@ -2915,6 +2914,37 @@ def test_export_filename_template_2():
|
||||
assert sorted(files) == sorted(CLI_EXPORTED_FILENAME_TEMPLATE_FILENAMES2)
|
||||
|
||||
|
||||
def test_export_filename_template_strip():
|
||||
""" export photos using filename template with --strip """
|
||||
import glob
|
||||
import locale
|
||||
import os
|
||||
import os.path
|
||||
import osxphotos
|
||||
from osxphotos.__main__ import export
|
||||
|
||||
locale.setlocale(locale.LC_ALL, "en_US")
|
||||
|
||||
runner = CliRunner()
|
||||
cwd = os.getcwd()
|
||||
# pylint: disable=not-context-manager
|
||||
with runner.isolated_filesystem():
|
||||
result = runner.invoke(
|
||||
export,
|
||||
[
|
||||
os.path.join(cwd, CLI_PHOTOS_DB),
|
||||
".",
|
||||
"-V",
|
||||
"--filename",
|
||||
"{searchinfo.venue,} {created.year}-{original_name}",
|
||||
"--strip",
|
||||
],
|
||||
)
|
||||
assert result.exit_code == 0
|
||||
files = glob.glob("*.*")
|
||||
assert sorted(files) == sorted(CLI_EXPORTED_FILENAME_TEMPLATE_FILENAMES1)
|
||||
|
||||
|
||||
def test_export_filename_template_pathsep_in_name_1():
|
||||
""" export photos using filename template with folder_album and "/" in album name """
|
||||
import locale
|
||||
|
||||
@@ -136,6 +136,10 @@ TEMPLATE_VALUES = {
|
||||
"{place.address.postal_code}": "20009",
|
||||
"{place.address.country}": "United States",
|
||||
"{place.address.country_code}": "US",
|
||||
"{uuid}": "128FB4C6-0B16-4E7D-9108-FB2E90DA1546",
|
||||
"{exif.camera_make}": "Apple",
|
||||
"{exif.camera_model}": "iPhone 6s",
|
||||
"{exif.lens_model}": "iPhone 6s back camera 4.15mm f/2.2",
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user