Pre-release v0.0.8
Pre-release
Pre-release
Additions
- XAProtocols.py — Contains definitions for high-level classes that can be subclassed to indicate availability of functionality to other aspects of PyXA. For example, XAClipboard utilizes the get_clipboard_representation() method of classes subclassed from XAClipboardCodable.
- Current protocols:
- XAShowable
- XASelectable
- XADeletable
- XAPrintable
- XACloseable
- XAClipboardCodable
- XACanOpenPath
- XACanPrintPath
- Current protocols:
- Expanded functionality for XABase.XAClipboard via XAProtocols.XAClipboardCodable protocol
- All Python literals can be set as the content of the clipboard
- Many PyXA objects can be set as the content of the clipboard - New properties and methods for XABase.XAURL
- base_url — The base/host portion of the URL, e.g.
www.google.com
- parameters — The parameter portion of the URL, e.g.
?query=“Hi”
- scheme — The scheme portion of the URL, e.g.
http://
/ - fragment — The fragment portion of the URL, e.g.
#example
- html — The HTML code for the webpage at the URL
- title — The title of the webpage at the URL
- extract_text() -> List[str] — Gets the visible text of the webpage at the URL
- extract_images() -> List[XAImage] — Gets all images on the webpage at the URL
- base_url — The base/host portion of the URL, e.g.
- XABase.XAImage.show_in_preview() — Shows the TIFF representation of the image in Preview
- User input classes — Currently use NSAppleScript to create the views that users are accustomed to. Might use custom-created windows and views in the future.
- XABase.XADialog
- XABase.XAMenu
- XABase.XAFilePicker
- XABase.XAFolderPicker
- XABase.XAFileNameDialog
- Support for several new applications
- Numbers
- Alfred
- Drafts
- Hammerspoon
- VLC
Changes
- Several methods that actually represent properties have been corrected to be object properties.
- XAApplication.front_window, XAScriptableApplication.front_window
- XAMusicApplication.current_track
- XASafariApplication.current_document
- Added SaveOption and PrintErrorHandling enums to XABaseScriptable.XASBApplication
Deprecations
- Using property dictionaries to filter XALists is now deprecated functionality. Use the XABase.XAList.filter() method instead.
- XABase.XAList.containing() — Use the XABase.XAList.filter() method instead.
- XABase.XAObject.has_element_properties() — all elements now have a properties dictionary, even if it is empty.
- XABase.XAClipboard.set_contents() — Directly set the XABase.XAClipboard.contents property instead.
- TextEdit.XATextEditDocument.copy() - Use the XABase.XAClipboard class instead.
Removals
- XABase.XAHasElements, XABaseScriptable.XAHasScriptableElements, and all associated methods — Functionalities completely replaced by XAList. No impact to existing scripts.
- XABase.XAAcceptsPushedElements — Functionality replaced by XAList. No impact to existing scripts.
- XABase.XACanConstructElement — Functionality replaced by per-application make() methods. No impact to existing scripts.
- XABase.XAShowable, XABase.XACanOpenPath, XABase.XASelectable, XABase.XADeletable, XABase.CanPrintPath, XABase.XACloseable — Moved to XAProtocols. No impact to existing scripts.
- XABase.xa_url() — Deprecated in v0.0.5. Now completely replaced by XAURL.
- XABase.xa_path() — Deprecated in v0.0.5. Now completely replaced by XAPath.
Full Changelog: v0.0.7...v0.0.8