RhetTbull / textinator

Simple MacOS StatusBar / Menu Bar app to automatically detect text in screenshots
MIT License
179 stars 8 forks source link

Feature: add app extension so Textinator can be used on existing images #5

Open RhetTbull opened 2 years ago

RhetTbull commented 2 years ago

An app extension would allow Textinator to be used on existing images using the right-click context menu. Alternatively, Textinator could register a Service for use from Services menu.

RhetTbull commented 2 years ago

A service might be the easiest.

        "NSServices": [
            {
                "NSMenuItem": {"default": "Detect text with Textinator"},
                "NSMessage": "detect_text",
                "NSRequiredContext": {"NSTextContent": "FilePath"},
                "NSSendFileTypes": ["public.image"],
            },
        ],
RhetTbull commented 2 years ago

I've implemented this as a Services menu so you can right click on one or more images in Finder and select "Services > Detect text with Textinator". Will release once I finish testing.

RhetTbull commented 2 years ago

This is working well but notifications do not get triggered when the service provider class runs. I'll need to look into this some more but it may be an issue with RUMPS.