Rotate non-locked text objects to make sure they are readable from bottom and right. The script registers a single action which has the usual scope argument that can be "all" or "selected".

Depending on scope, the action lists target text objects using query(), then it processes the list looking at each object id. If the object has the combination of rotation and mirrorings so that it is not readable from the bottom or right, it is rotated 180 degrees in-place. In-place rotation is achieved by rotating around the bounding box center of the object.

How to test: