hfr Posted July 31, 2017 Posted July 31, 2017 (edited) Hi, I sometimes ran into the problem that there still was some formatting (e.g. URLs) in my clipboard even though I pasted it as plaintext. With this tiny script, there will be nothing but plaintext left. Have fun. Download Source I linked it to Command+Option+Shift+C (equivalent to paste as plaintext). Saves me time every day. (I'm new to this, please tell me if I misbehaved in any way) Edited July 31, 2017 by hfr
deanishe Posted July 31, 2017 Posted July 31, 2017 3 hours ago, hfr said: tell me if I misbehaved in any way One thing that we generally recommend: put the workflow source code on GitHub, not just the exported workflow. It makes it much easier for other people to contribute via Pull Requests.
hfr Posted July 31, 2017 Author Posted July 31, 2017 15 minutes ago, deanishe said: One thing that we generally recommend: put the workflow source code on GitHub, not just the exported workflow. It makes it much easier for other people to contribute via Pull Requests. thanks for the hint. Like this: https://github.com/hfr-hfr/alfred-workflows/blob/master/CopyAsPlaintext/SourceCode ?
deanishe Posted July 31, 2017 Posted July 31, 2017 31 minutes ago, hfr said: thanks for the hint. Like this: https://github.com/hfr-hfr/alfred-workflows/blob/master/CopyAsPlaintext/SourceCode ? No, not really. I mean the whole workflow (i.e. info.plist, icon.png etc.). Basically the contents of the folder you see when you right-click on your workflow in Alfred Preferences and choose Open in Finder. That should be the root directory or a subdirectory of your repo. That way, people can install the workflow via git clone (plus possibly symlinking it), and submit meaningful pull requests. For example, when possible, I keep the "finished" workflow in a src directory of the repo. I can symlink that directory to Alfred's workflow directory to use the workflow, and other folks can submit pull requests against the full source code rather than submitting an impenetrable binary (the .alfredworkflow file). I keep the actual workflow source in a subdirectory because there's a copy of the compiled workflow in the root. Putting the workflow and the source in the root often leads to people exporting a workflow with a copy of the previous version in it, which has a copy of the version before that in it, etc. etc. hfr 1
hfr Posted July 31, 2017 Author Posted July 31, 2017 7 minutes ago, deanishe said: No, not really. I mean the whole workflow (i.e. info.plist, icon.png etc.). thanks for your help. This might be more like it: https://github.com/hfr-hfr/alfred-workflows/tree/master/CopyAsPlaintext/src ?
hfr Posted July 31, 2017 Author Posted July 31, 2017 (edited) 50 minutes ago, deanishe said: Looks good, but no icon? … give me a break. This morning I had to google "osascript", not knowing what it was. I'll get into painting icons later this week. Edited July 31, 2017 by hfr deanishe 1
hfr Posted August 1, 2017 Author Posted August 1, 2017 13 hours ago, deanishe said: Looks good, but no icon? now with icon thanks for your support, deanishe.
Vero Posted August 1, 2017 Posted August 1, 2017 @hfr Take a look at Alfred's built-in workflows by going to the Workflows tab, clicking on the [+] at the bottom of the sidebar, and choosing Templates > Clipboard > Paste as plain text from hotkey. All you need to do is set your hotkey! This workflow should do what you need, just in case you prefer to use the built-in option Cheers, Vero hfr 1
hfr Posted August 1, 2017 Author Posted August 1, 2017 (edited) @Vero Haha, great, thanks. I might discontinue my project then. Edited August 1, 2017 by hfr
smile-me Posted September 18, 2018 Posted September 18, 2018 Quote @hfr Take a look at Alfred's built-in workflows by going to the Workflows tab, clicking on the [+] at the bottom of the sidebar, and choosing Templates > Clipboard > Paste as plain text from hotkey. All you need to do is set your hotkey! @Vero There is even a simpler solution to this, if you have activated Clipboard > Clipboard History > Keep Plain Text, then assign a Viewer Hotkey. All you have to do then is cmd-c a richtext and then use the clipboard history viewer hotkey and select the most recent entry to paste the plaintext :-)
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