Jump to content

Case Converter (including Title Case) - now working on MacOS 12.3


Recommended Posts

Dear Alfred community,

 

I enjoyed using the Case Converter workflow since last year and it worked like a charm on my Macbook Pro 2019 Monterey 12.3. But since a few weeks, it doesn't work anymore, I don't know if it's related to the 12.3. 

 

The Capitalize function does appear on Alfred (photo 1) but as soon as I try to type or paste a word it goes to google search (which is my default search on Alfred - photo 2). Would you have any advices on how to make it work again ? 

I tried to delete and reinstall the workflow without success.

 

Regards, 

Joseph 

CleanShot 2022-04-05 at 17.04.00@2x.png

CleanShot 2022-04-05 at 17.04.06@2x.png

Link to comment

@Marlouis Welcome to the forum :)

 

This post summarises why you're seeing the change in macOS 12.3; In short, Apple have removed the Python 2 scripting language, which is used behind the scenes by the workflow you're using.

 

https://www.alfredapp.com/blog/guides-and-tutorials/python-2-workflows-on-macos-monterey-12-3/

 

The creator of this workflow has already updated it for Python 3, so take a look at the first post of this thread for details:

 

As @dfay opted for Python 3, you'll need to set this up on your Mac as well. If you're not familiar with the process, I'm sure community members will be able to help you out. 

Link to comment
9 minutes ago, dfay said:

is there a process to set up Python 3 in Monterey?  I just used the shebang above & it just worked.

 

If you’re using /usr/bin/python3, it should just work if the user already has the Developer Tools (DT) installed. If they have Homebrew, they have the DT. If they don’t have the DT, that shebang will trigger macOS to show a GUI prompt to install them in two clicks.


There’s a rare chance that the user will instead get a variant of xcrun: error: invalid active developer path. The cause seems to be a macOS update breaking the previously installed DT. xcode-select --install in the Terminal fixes it.

Edited by vitor
Link to comment
  • 2 weeks later...
On 4/5/2022 at 8:04 AM, Marlouis said:

The Capitalize function does appear on Alfred (photo 1) but as soon as I try to type or paste a word it goes to google search (which is my default search on Alfred - photo 2). Would you have any advices on how to make it work again ? 

 

@dfay there's a bug (typo) in your Workflow:

 

image.thumb.png.4c172422c228be699992a167683645bd.png

 

Link to comment
  • 5 months later...
On 4/24/2022 at 7:39 AM, dfay said:

Yes, see the first post in this thread.

 

Given:

 

//a[contains(@href, "UPPERCASE")][contains(@href, ".pdf")]

 

the script appears to insert backslash characters (\) on four locations below:

 

//a[contains\(@href, "uppercase"\)][contains\(@href, ".pdf"\)]

 

Any way to fix this?

Edited by winterflags
Link to comment
  • 2 weeks later...

First, thanks for this workflow. Been a lifesaver for someone who does content. 

 

One request though - can you take a look at the workflow again? I recently upgraded to Ventura (13.0) and it broke again. When I do the cc workflow, it starts off correct image.png.dbcbe0b3d960020acdce8400b1ffeb57.png

 

but when I try to enter a text, it tries to search for it on the internet.    

image.png.4e05b6ca63d3afe82e509f2be49f7aed.png

 

 

If I remember correctly, this was the same behavior before you made the update in March. But now, it broke again :( Hope you can make a fix. 

 

Link to comment
  • 1 month later...
  • 3 months later...

First of all, brilliant workflow. Tremendously useful.

 

I think I've come across two bugs:

 

1. Title case conversions do not work correctly when starting with UPPER CASE TEXT.

When I paste in a lower-case line of text, conversion to title case works fine.

When I paste in an upper-case line of text, it only converts the first word to title case, leaving the rest of the sentence capitalized.

 

2. The sentence case doesn't seem to recognize that the pronoun i should be capitalized.

Edited by Mindstormer
Link to comment
  • 1 month later...
On 4/12/2023 at 10:55 PM, Mindstormer said:

Title case conversions do not work correctly when starting with UPPER CASE TEXT.

 

37 minutes ago, David H said:

When all letters are already capitalized, Title Case in Case Converter doesn't work.

 

That’s a decision, not a bug. It’s quite common for case converters to make that choice, because otherwise acronyms get mangled. A way to work around, if you know your text doesn’t have acronyms, is to lowercase first then title case.

Link to comment
19 hours ago, vitor said:

That’s a decision, not a bug. It’s quite common for case converters to make that choice, because otherwise acronyms get mangled. A way to work around, if you know your text doesn’t have acronyms, is to lowercase first then title case.

Oh, I didn't know that. Thanks for your answer. 

Link to comment
On 5/18/2023 at 9:21 PM, vitor said:
On 5/18/2023 at 8:42 PM, David H said:

When all letters are already capitalized, Title Case in Case Converter doesn't work.

 

That’s a decision, not a bug. It’s quite common for case converters to make that choice, because otherwise acronyms get mangled. A way to work around, if you know your text doesn’t have acronyms, is to lowercase first then title case.

 OMG, thanks for clarifying this. This behaviour was driving me nuts. I kept checking the config, uninstalling and reinstalling the workflow...

I didn't realize this behaviour was specific to all Caps because all Caps is all I use the workflow for.

 

IMHO it makes more sense to let the converter treat acronyms wrong (and the user fixes it manually) rather than not doing anything at all.

 

Or here is a suggestion: If I understand it correctly, workflows doesn't touch words that are all Caps, right? My use case is that I often have the entire text all Caps and I'd say at least for that case it makes sense to make an exception to the exception and apply title case. So: if single words are all Caps, OK, leave them alone. But if the entire text (or, say more than 90 percent) is all caps, then apply titlecase anyway.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...