logicelf Posted March 30, 2015 Share Posted March 30, 2015 Hi folks, New user here, and loving Alfred so far - it's replaced a few other productivity apps and scripts for me, which is fantastic! I've migrated various snippets from TextExpander into Alfred, but there's one I can't lose (yet) because it's dynamic. I use it to paste a formatted timestamp - I type a keyword, and TextExpander pastes my initials followed by a formatted timestamp where the cursor is in the foreground app. Example: [JO 30/03/2015 @ 19:57] TextExpander takes a text string and placeholders as inputs - so the above uses: [JO %d/%m/%Y @ %H:%M] Where % denotes the start of a placeholder (in this case, to add the day, hour, etc.). I'd love to replace this with Alfred - any ideas? Thanks in advance, James Link to comment
RodgerWW Posted March 30, 2015 Share Posted March 30, 2015 In terminal you can use: date '+[JO %d/%m/%Y @ %H:%M]' to output: [JO 30/03/2015 @ 15:18] So, you could make a new workflow, perhaps shortcut key to script ... set the script to bin/bash and use the terminal line from above. Link to comment
raguay.customct Posted March 30, 2015 Share Posted March 30, 2015 I created a workflow for this quickly so that you can see how to do them: https://db.tt/QL8JIKwP You can use this as a template to create many others as well. I hope this is helpful. Link to comment
logicelf Posted March 31, 2015 Author Share Posted March 31, 2015 Hi both, Thanks very much for all your input! I have, though, stumbled upon an even easier method while experimenting with raguay.customct's workflow (thanks for that!). I've created a workflow with just a keyword input and a copy to clipboard action (with paste enabled) with the following value: [JO {date:short} @ {time}] The {date} and {time} placeholder snippets are built into Alfred - the short version of the date snippet is perfect. The above lets me drop in a string like this: [JO 31/03/2015 @ 16:05] Thanks all! 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