stevevrporter Posted May 6, 2016 Share Posted May 6, 2016 Hey, great workflow. One question. Is the expected behaviour to place a linefeed at the end of the converted text. After a bit of experimenting, there seems to be cases where the conversion adds a line feed. Link to comment
gandalfsaxe Posted December 27, 2016 Share Posted December 27, 2016 Nice script. My problem with it is, it requires too much focus to use. I can't invoke a particular keyword or hotkey because the order of the items (Upper Case, Lower Case, Title Case etc.) depends on what was the last used. Is there any way to order them statically? Or even better, to invoke a different keyword for each, which reduces 3 steps (keyword + Cmd+number + paste) to 2 (keyword + paste). Link to comment
deanishe Posted December 27, 2016 Share Posted December 27, 2016 To always have the actions in the same order, you need to edit the workflow so it doesn't give the actions UIDs. The UID is how Alfred identifies actions and remembers what you selected in the past. Without UIDs, results are always shown in the same order they're emitted. Link to comment
gandalfsaxe Posted December 29, 2016 Share Posted December 29, 2016 On 12/27/2016 at 2:39 PM, deanishe said: To always have the actions in the same order, you need to edit the workflow so it doesn't give the actions UIDs. The UID is how Alfred identifies actions and remembers what you selected in the past. Without UIDs, results are always shown in the same order they're emitted. Hi tried to look around in the workflow and couldn't see any obvious place to change this. Any tips? Link to comment
deanishe Posted December 29, 2016 Share Posted December 29, 2016 In the xml.scpt and xml-paste.scpt files. The simplest thing to do is probably to edit the xmlItem() function so it doesn't add uid to the output. Link to comment
gandalfsaxe Posted December 29, 2016 Share Posted December 29, 2016 1 hour ago, deanishe said: In the xml.scpt and xml-paste.scpt files. The simplest thing to do is probably to edit the xmlItem() function so it doesn't add uid to the output. I deleted instances / mention of uid in those two files, but now the workflow doesn't really work. Nothing pops up when i choose "case" or "casep". Oh well... Link to comment
gandalfsaxe Posted December 29, 2016 Share Posted December 29, 2016 I ended up using the hotkey version. Despite the slightly annoying delay, it was more what I was looking for Link to comment
dfay Posted December 29, 2016 Author Share Posted December 29, 2016 Glad that is working for you. To be honest, I don't think I've used the keyword version in several years. You can also delete the two osascript lines in each of the bash scripts and just paste manually (that's actually how I use it). Or try a shorter delay. Link to comment
deanishe Posted December 29, 2016 Share Posted December 29, 2016 4 hours ago, Fnantier said: I deleted instances / mention of uid in those two files, but now the workflow doesn't really work. Nothing pops up when i choose "case" or "casep". Oh well... You're not supposed to delete all the mentions. Just the bit that generates the feedback for Alfred Link to comment
gandalfsaxe Posted January 11, 2017 Share Posted January 11, 2017 I have a slight problem with the hotkey version. After using e.g. "Title case" hotkey, it doesn't just alter the letter cases, but also adds a line break. Any way to avoid / fix this? Link to comment
dfay Posted January 11, 2017 Author Share Posted January 11, 2017 Here's a completely rewritten version (in Python) which combines the two workflows into one: https://dl.dropboxusercontent.com/u/6601556/Alfred/Case Converter 2.alfredworkflow It uses Alfred's built in Copy to Clipboard with automatic pasting to frontmost app instead of pbcopy in Bash and AppleScript pasting, which seems to give better results. Link to comment
gandalfsaxe Posted January 12, 2017 Share Posted January 12, 2017 (edited) On 1/11/2017 at 7:26 PM, dfay said: Here's a completely rewritten version (in Python) which combines the two workflows into one: https://dl.dropboxusercontent.com/u/6601556/Alfred/Case Converter 2.alfredworkflow It uses Alfred's built in Copy to Clipboard with automatic pasting to frontmost app instead of pbcopy in Bash and AppleScript pasting, which seems to give better results. Works wonderfully! Much appreciated. You should update your first post with this if you haven't :-) Edited January 12, 2017 by Fnantier Link to comment
MrBjorn Posted March 25, 2017 Share Posted March 25, 2017 I saw your nice service. But how do I install it? :-) I am a newbie to macOS automator, macOS 10.12, i rename the file to workflow and double click, but it says the file is damaged. I guess i do it wrong somehow? Link to comment
dfay Posted March 25, 2017 Author Share Posted March 25, 2017 This is not an automator workflow, it requires the Alfred power pack. Link to comment
heyJoeCampbell Posted February 9, 2018 Share Posted February 9, 2018 The Dropbox link is broken https://cl.ly/pR0j Link to comment
dfay Posted February 9, 2018 Author Share Posted February 9, 2018 (edited) Updated the description and the link in the top post above. Edited February 9, 2018 by dfay Link to comment
robgill Posted March 13, 2018 Share Posted March 13, 2018 This workflow is amazing I use it A LOT. I've thought of an improvement, but when I looks at hacking it, I can't work out how to implement it. I was wondering if it would be possible to mimic the cases in Alfred. For example, (see screenshot) instead of current options change this to: Title Case Sentence case UPPER CASE Capitalize lowercase or to be clear between Title Case and Capitalise, show an example Title Case (The Quick Brown Fox Jumps Over a Lazy Dog) Sentence Case (The quick brown fox jumps over a lazy dog) Upper Case (THE QUICK BROWN FOX JUMPS OVER A LAZY DOG) Capitalize (The Quick Brown Fox Jumps Over A Lazy Dog) Lowercase (the quick brown fox jumps over a lazy dog) But the first option would be ok for me just so I can quickly see CAPS! Link to comment
gandalfsaxe Posted March 13, 2018 Share Posted March 13, 2018 1 minute ago, robgill said: This workflow is amazing I use it A LOT. I've thought of an improvement, but when I looks at hacking it, I can't work out how to implement it. I was wondering if it would be possible to mimic the cases in Alfred. For example, (see screenshot) instead of current options change this to: Title Case Sentence case UPPER CASE Capitalize lowercase or to be clear between Title Case and Capitalise, show an example Title Case (The Quick Brown Fox Jumps Over a Lazy Dog) Sentence Case (The quick brown fox jumps over a lazy dog) Upper Case (THE QUICK BROWN FOX JUMPS OVER A LAZY DOG) Capitalize (The Quick Brown Fox Jumps Over A Lazy Dog) Lowercase (the quick brown fox jumps over a lazy dog) But the first option would be ok for me just so I can quickly see CAPS! I prefer keyboard shortcut to a keyword for this workflow, but I can see why others would prefer keyword. I use Cmd+Ctrl+Opt+Shift (yes all modifier keys) + * L (lower case) * U (upper case) * S (sentence case - but I almost never use this) * T (title case) In the beginning it felt a little like doing finger gymnastics (I use little, ring, middel and thumb for the four modifiers on the left, and index on right hand for the letter), but I've gotten used to it now. On the other hand, the heavy use of modifier keys, it never interferes with anything ? Anyway just for inspiration. Regarding your question, isn't it just a matter of connecting all the python scripts in the workflow to an Input -> Keyword, and then making the keyword titles that you want? See attached screenshots. robgill 1 Link to comment
robgill Posted March 13, 2018 Share Posted March 13, 2018 2 minutes ago, Fnantier said: I prefer keyboard shortcut to a keyword for this workflow, but I can see why others would prefer keyword. Thanks very much, I didn't even know that was an option! And I prob will prefer that too. Great tips for splitting the workflow too! Link to comment
dfay Posted March 13, 2018 Author Share Posted March 13, 2018 8 hours ago, robgill said: I was wondering if it would be possible to mimic the cases in Alfred. For example, (see screenshot) instead of current options change this to: Title Case Sentence case UPPER CASE Capitalize lowercase This is built into the latest version of the workflow as a script filter - see the top post. gandalfsaxe 1 Link to comment
gandalfsaxe Posted May 5, 2019 Share Posted May 5, 2019 Would you mind putting this on GitHub? Link to comment
paulw Posted June 8, 2019 Share Posted June 8, 2019 On 5/5/2019 at 7:31 PM, gandalfsaxe said: Would you mind putting this on GitHub? Agreed, @dfay I follow your github to keep aware of updates to your very helpful workflows. Link to comment
deanishe Posted June 13, 2019 Share Posted June 13, 2019 (edited) 1 hour ago, Ptujec said: And please don't hate me for using LaunchBar. Of course not, but why are you asking for a LaunchBar plugin here? I mean, of all the Mac-related forums you could ask on, can you think of one that has fewer LaunchBar users than the Alfred forum? Edited June 13, 2019 by deanishe dfay 1 Link to comment
xilopaint Posted June 13, 2019 Share Posted June 13, 2019 1 minute ago, deanishe said: Of course not, but why are you asking for a LaunchBar plugin here? I mean, of all the Mac-related forums you could ask on, can you think of one that has fewer LaunchBar users than the Alfred forum? hahahaha It's not my intention to make the troll here, but this is the undeniable proof of how Alfred Community rules. Link to comment
deanishe Posted June 13, 2019 Share Posted June 13, 2019 29 minutes ago, xilopaint said: hahahaha It's not my intention to make the troll here, but this is the undeniable proof of how Alfred Community rules. 😕 Because we're bad at making LaunchBar plugins? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now