PyXA 0.1.0
Note: This version of PyXA requires Python 3.11.
Additions
- XALSM — A class for convenient text classification using latent semantic mapping
- Added save() method for saving LSM models to the disk.
- Added load() method for loading LSM models from the disk.
- Added add_category() method for easily adding new categories to the mapping.
- Added add_data() method for adding categories and training data.
- Added add_text() method for adding training data.
- Added categorize_query() method for mapping a string to a category using the built model.
- XABase.XAApplicationPicker — A class for having users selected an application from a menu
- Works similarly to XAFolderPicker and XAFilePicker.
- XABase.XATextDocumentList — General class for text documents that provides several bulk functions
- Has the same methods and attributes as the DocumentList class previously found in the TextEdit module
- XABase.XAVideo — Initial support for working with videos in PyXA
- Added reverse() method for reversing videos (this takes some time)
- Added save() method for saving modified videos to the disk
- Added show_in_quicktime() method for opening videos in QuickTime
- New features for XABase.XAImage and XABase.XAImageList:
- Added additional non-mutable information attributes has_alpha_channel, is_opaque, and color_space_name.
- Added ability to control image properties using mutable attributes for gamma, vibrance, tint, temperature, white_point, highlight, and shadow.
- Added an open() method to open one or more images from files or URLs.
- Added a save() method to save images to the disk.
- Added several filter methods for easy image adjustments, e.g. gaussian_blur(), pixellate(), invert(), and bloom(), among others.
- Added auto_enhance() method to automatically apply suggested image enhancements, e.g. correct red-eye.
- Added several distortion methods such as bump(), pinch(), and twirl().
- Added several transformation methods such as flip_horizontally(), rotate(), crop(), scale(), and pad().
- Added composition methods such as overlay_image(), overlay_text(), stitch_horizontally(), and additive_composition().
- Added extract_text() and image_from_text() to read text from images and turn text into images, respectively.
- All of these methods are implemented in both XAImage and XAImageList, with the latter offering some performance benefits
- New features for XABase.XAColor:
- Added several class methods, such as white(), black(), and orange(), for instantiating common XAColor objects.
- Added make_swatch() method for making a solid color image of a specified size
- Added clipboard-codability
- New features for XABase.XAList:
- Added additional filtering methods such as equalling(), not_equalling(), not_containing(), beginning_with(), ending_with(), greater_than(), less_than(), and between()
- Added count() method for counting elements of XALists that pass a key function
- Added support for checking membership in XALists using the “in” keyword
- New methods for XABase.XASound:
- Added trim() method for adjusting the length of sounds via PyXA
- Added save() method for saving modified sounds to the disk
- Added information attributes such as num_sample_frames, sample_rate, and duration
- New features fro XABase.XAText:
- Added working sentences() method to get a list of sentences in a text document.
- Added methods for tagging tokens by sentiment, lemma, language, and part of speech
- PyXA Additions — Modules that utilize other packages alongside PyXA and PyObjC features to provide useful automation features.
- Additions.XAWeb — A module for internet-related PyXA additions.
- RSS Features
- Additions.XAWeb.RSSReader — A class for fetching items from RSS feeds
- Additions.XAWeb.RSSItem, Additions.XAWeb.RSSItemList — Classes for interacting with fetched RSS items, e.g. to view metadata, access the contained content, or extract URLs from link tags
- Additions.XAWeb.RSSItemContent, Additions.XAWeb.RSSItemContentList — Classes for interacting with the content of RSS items, e.g to retrieve all images and links within in their full-featured PyXA representation
- RSS Features
- Additions.XAWeb — A module for internet-related PyXA additions.
- Pythonic properties and setters for every class
- Added local debug logging
- Support for New Applications
- Adobe Acrobat Reader
- Amphetamine
- Bike
- CardHop
- Flow
- Image Events
- iTerm
- RStudio
- Spotify
- System Events
Changes
- XABase.XAList
- Now correctly responds to negative indexing.
- Filtering now works with (more) non-string values.
- Push() now correctly returns either the added element(s) or None — before, it would return a location reference that could end up incorrectly pointing to another element.
- XABase.XAURL / XABase.XAPath
- Now tries to prepend necessary schemes if no valid is present when the object is initialized.
- XABase.XAColor
- red(), green(), and blue() methods now create instances of pure red, pure green, and pure blue colors, respectively. The red_value, green_value, and blue_value attributes now take on the previous functionality of these methods. Other value-getting methods have been transitioned to attributes as well.
- In general, modules have been tweaked to support more data types when calling methods, where appropriate.
- Many behind-the-scenes changes have been made to support faster execution.
- Documentation throughout several modules has been significantly improved, especially for the iWork suite.
Deprecations
- PyXA.application() — Use the PyXA.Application class instead.
- XABase.XATextDocument.set_text() — Directly set the XABase.XATextDocument.text attribute instead
- Providing NSData as the data parameter when initializing an XABase.XAList object — Pass the NSData as the image_reference parameter instead.
- XAiWorkItem.rotate(), in all forms — Set the rotate attribute instead.
Removals
- XABase.XAImage.name — Removed due to lack of use case
- TextEdit.XATextEditDocument.copy() — Deprecated in 0.0.8, now fully removed
Direction for Next Release
- Performance improvements
- Code reorganization
- Full macOS Ventura Support
- Integrate Finder classes with System Events classes