-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into action_manager_modu…
…le_integration
- Loading branch information
Showing
14 changed files
with
223 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ result/ | |
# Coverage output | ||
.coverage | ||
/venv/ | ||
venv_python | ||
|
||
# Docs | ||
docs_src/_build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Import built-in modules | ||
import os | ||
|
||
# Import local modules | ||
from photoshop import Session | ||
|
||
|
||
root = "your/images/root" | ||
files = [] | ||
for name in os.listdir(root): | ||
files.append(os.path.join(root, name)) | ||
with Session() as api: | ||
options = api.BatchOptions() | ||
options.destination = 3 | ||
options.destinationFolder = "c:\\test" | ||
api.app.batch(files=files, actionName="Quadrant Colors", actionSet="Default Actions", options=options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.19.6" | ||
__version__ = "0.20.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# https://theiviaxx.github.io/photoshop-docs/Photoshop/BatchOptions.html | ||
# Import local modules | ||
from photoshop.api._core import Photoshop | ||
|
||
|
||
class BatchOptions(Photoshop): | ||
object_name = "BatchOptions" | ||
|
||
def __init__(self): | ||
super().__init__() | ||
|
||
@property | ||
def destination(self): | ||
"""The type of destination for the processed files.""" | ||
return self.app.destination | ||
|
||
@destination.setter | ||
def destination(self, value): | ||
self.app.destination = value | ||
|
||
@property | ||
def destinationFolder(self): | ||
"""The folder location for the processed files. Valid only when ‘destination’ = folder.""" | ||
return self.app.destinationFolder | ||
|
||
@destinationFolder.setter | ||
def destinationFolder(self, path): | ||
self.app.destinationFolder = path | ||
|
||
@property | ||
def errorFile(self): | ||
"""The file in which to log errors encountered. | ||
To display errors on the screen and stop batch processing when errors occur, leave blank.""" | ||
return self.app.errorFile | ||
|
||
@errorFile.setter | ||
def errorFile(self, file_path): | ||
self.app.errorFile = file_path | ||
|
||
@property | ||
def fileNaming(self) -> list: | ||
"""A list of file naming options. Maximum: 6.""" | ||
return self.app.fileNaming | ||
|
||
@fileNaming.setter | ||
def fileNaming(self, file_naming: list): | ||
self.app.fileNaming = file_naming | ||
|
||
@property | ||
def macintoshCompatible(self) -> bool: | ||
"""If true, the final file names are Macintosh compatible.""" | ||
return self.app.macintoshCompatible | ||
|
||
@macintoshCompatible.setter | ||
def macintoshCompatible(self, value: bool): | ||
self.app.macintoshCompatible = value | ||
|
||
@property | ||
def overrideOpen(self) -> bool: | ||
"""If true, overrides action open commands.""" | ||
return self.app.overrideOpen | ||
|
||
@overrideOpen.setter | ||
def overrideOpen(self, value: bool): | ||
self.app.overrideOpen = value | ||
|
||
@property | ||
def overrideSave(self) -> bool: | ||
"""If true, overrides save as action steps with the specified destination.""" | ||
return self.app.overrideSave | ||
|
||
@overrideSave.setter | ||
def overrideSave(self, value: bool): | ||
self.app.overrideSave = value | ||
|
||
@property | ||
def startingSerial(self) -> int: | ||
"""The starting serial number to use in naming files.""" | ||
return self.app.startingSerial | ||
|
||
@startingSerial.setter | ||
def startingSerial(self, value: int): | ||
self.app.startingSerial = value | ||
|
||
@property | ||
def suppressOpen(self) -> bool: | ||
"""If true, suppresses file open options dialogs.""" | ||
return self.app.suppressOpen | ||
|
||
@suppressOpen.setter | ||
def suppressOpen(self, value: bool): | ||
self.app.suppressOpen = value | ||
|
||
@property | ||
def suppressProfile(self) -> bool: | ||
"""If true, suppresses color profile warnings.""" | ||
return self.app.suppressProfile | ||
|
||
@suppressProfile.setter | ||
def suppressProfile(self, value: bool): | ||
self.app.suppressProfile = value | ||
|
||
@property | ||
def unixCompatible(self) -> bool: | ||
"""If true, the final file names are Unix compatible.""" | ||
return self.app.unixCompatible | ||
|
||
@unixCompatible.setter | ||
def unixCompatible(self, value: bool): | ||
self.app.unixCompatible = value | ||
|
||
@property | ||
def windowsCompatible(self) -> bool: | ||
"""If true, the final file names are Windows compatible.""" | ||
return self.app.windowsCompatible | ||
|
||
@windowsCompatible.setter | ||
def windowsCompatible(self, value: bool): | ||
self.app.windowsCompatible = value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.