dennisvz wrote:Currently the supported text formats for transforming text in actions are "No change", "Title Case", "lowercase", "UPPERCASE". I'd like to suggest to add an option which uppercases the first letter only.
In my native language (Dutch) it's uncommon to Title Case Every Word In The Sentence. Instead it's very common to only Uppercase the first letter of a sentence.
I know it's possible to make a small script which will do the same, but I guess it's not a major change in the Text Format menu.
I use perl in a shell script in TextExpander to do it. But maybe it can be adapted to Hazel? (Credit to Though Asylum for this. If you want more like it, check them out.
http://www.thoughtasylum.com/blog/2011/ ... -case.html#!/usr/bin/perl -w
#Initialise
use strict;
my($text);
#Get the text from the clipboard
$text =`pbpaste`;
#Convert the text to lower case
$text ="\L$text";
#Convert the first character of each word to upper case
$text =~ s/ ((^\w)|(\s\w))/\U$1/xg;
#Output the text
print $text;