Jump to content

Clipboard "filters"


Recommended Posts

I mostly bought Alfred for text replacement and clipboard features. I saw something in a competing clipboard product that'd be pretty helpful, and I can't seem to find a way to pull it off with workflows as-is. 

 

The feature lets you create a script that will be applied to the text in the clipboard, with a preview window and some other niceties. For me, the value is I use a bewildering number of different slightly-incompatible Markdown-like syntaxes all day, and it'd be nice to work in my editor in one universal format and paste via scripts that convert to the various idiosyncratic ones. Their example is "make an HTML list from items" but I'm seeing more value in things like "Let me convert some CSV rows to the three dumb Markdown table formats used across the systems I need."

 

It'd save me a lot of dang effort, and could be as simple as giving me a workflow that lets me use a clipboard snippet as input. I think I could pull that off right now via AppleScript, but it's unwieldy enough I'd rather just buy the other product. Same time, I've already paid for Alfred, so I'd rather not switch.

Link to comment

Take a look at these for examples of how to proceed:

 

https://www.alfredforum.com/topic/2180-case-converter-including-title-case/#comment-12226

 

https://www.alfredforum.com/topic/4818-code-case/#comment-29475

(this may be the best model if you want to be able to preview the output)

 

Also this one that I use but which never posted:

 

https://dl.dropboxusercontent.com/u/6601556/Alfred/Text cleaners.alfredworkflow

Edited by dfay
Link to comment

Great post, dfay.

 

As regards preview, here's a great example of using Alfred's Quicklook feature. You could use it to preview your tables etc. as rendered HTML.

 

I'm moving this to the Workflow Help & Questions forum, as it's more of a "how do I do X" than a concrete feature suggestion.

 

@Slypenslyde: You probably know this already, but here's how to make a "Clipboard Contents" input for a workflow.

Edited by deanishe
wording iz hard
Link to comment

Ah, OK. I can certainly assemble these pieces into what I want. 

 

I can't quite seem to get the movie example working as in the gif, but it did cause me to find out about the Quicklook feature, so that's a thing I can ask questions about when it's the missing piece.

 

slightly disagree with the view "We don't need clipboard input because you can write one yourself", but I'd rather go work on my script than argue for it.

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...