MaddTheSane / Simple-Comic

macOS comic viewer
MIT License
255 stars 22 forks source link

Contextual menu item: Look Up (Dictionary panel) #92

Closed DavidPhillipOster closed 1 year ago

DavidPhillipOster commented 1 year ago

Add support for the standard dictionary panel to OCR'ed text.

Documented, with screen shots, in https://davidphilliposter.dreamwidth.org/3454.html

nickv2002 commented 1 year ago

LGTM. Can integrate it into the next build we push out for the store/signed release. 👍

DavidPhillipOster commented 1 year ago

Thank you both. I'm truly pleased that you acted on this so quickly. I'm happy to wait for the next push to the store/signed release.

DavidPhillipOster commented 1 year ago

A "Search With Google" contextual menu command would look like:

- (void)google:(id)sender {
  NSString *s = [[[self selection] componentsSeparatedByString:@"\n"] firstObject];
  NSURLComponents *parts = [[NSURLComponents alloc] initWithString:@"https://www.google.com/search"];
  parts.queryItems = @[ [[NSURLQueryItem alloc] initWithName:@"q" value:s] ];
  NSURL *url = [parts URL];
  [NSWorkspace.sharedWorkspace openURL:url];
}

but I don't think it is a good fit for Simple Comic so I didn't include it in the pull request.

nickv2002 commented 1 year ago

Now in TestFlight if you want to try see: https://github.com/MaddTheSane/Simple-Comic/releases/tag/App-Store-1.9.6

Update: the same build has been released to as a regular release now too