ryleigh Posted October 14, 2013 Share Posted October 14, 2013 Sometimes I like using this site to generate ascii text I can use as a giant section comment while coding. I saw that it's just a frontend to the unix FIGlet tool, so I thought it'd be cool to make a workflow that would accept text (and an optional font style) and copy the ascii output to clipboard. I'm not really sure what I'm doing though, so any help would be appreciated. - Not sure how to (or if I can) use figlet as a standalone command line application. I don't want to use macports or whatever to fully install it, just wanted to have it in a folder that I could cd to in terminal and run that way. This would feel more self-contained to me than just installing it outright (and requiring workflow users to install it themselves). - Once I've got that I assume I need to create a workflow script (applescript?) that pipes the input into the figlet program and copies the output to the clipboard Thanks for any advice! Link to comment
jdfwarrior Posted October 15, 2013 Share Posted October 15, 2013 Sometimes I like using this site to generate ascii text I can use as a giant section comment while coding. I saw that it's just a frontend to the unix FIGlet tool, so I thought it'd be cool to make a workflow that would accept text (and an optional font style) and copy the ascii output to clipboard. I'm not really sure what I'm doing though, so any help would be appreciated. - Not sure how to (or if I can) use figlet as a standalone command line application. I don't want to use macports or whatever to fully install it, just wanted to have it in a folder that I could cd to in terminal and run that way. This would feel more self-contained to me than just installing it outright (and requiring workflow users to install it themselves). - Once I've got that I assume I need to create a workflow script (applescript?) that pipes the input into the figlet program and copies the output to the clipboard Thanks for any advice! Ryleigh, Doing this should be fairly straight forward. I haven't ever used the FIGlet app myself but if you know the syntax to run it from the terminal, then the same thing could be used to run it as a workflow in Alfred. Create a new workflow using the Templates->Essentials->Keyword to Script template. Double click the keyword item in the workflow editor area and set all details for that. Next, double click the Run Script item. There will be a button in the bottom of the script area to allow you to quickly open the workflow folder. Now just copy the application into that folder. Go back to the Run Script item in the workflow editor and in the script area, enter the command to run the FIGlet application. Commands entered here will be run the same as if you were running them from the terminal (as long as no other applications are having to be referenced because Alfred doesn't import your profile). To pass data to it, in your command, just use the {query} placeholder. For instance, if I wanted to make a workflow that would echo the text I entered into Alfred for that workflow, I would do.. echo "{query}" Finally, since I haven't used FIGlet, I don't know if it auto copies data to the clipboard for you or if you have to capture its output and then save that to the clipboard yourself. If you have copyist yourself, you can click the + in the top right of the workflow editor area and select Output->Copy to Clipboard. In the text area, once again use the {query} placeholder. That will copy output from your command to the clipboard. Let me know if you have any oner questions Link to comment
ryleigh Posted October 15, 2013 Author Share Posted October 15, 2013 Thanks a lot David, much appreciated! 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