dfay Posted July 29, 2018 Share Posted July 29, 2018 (edited) Dynamic snippets to insert the date corresponding to the upcoming day. d.nm - next Monday d.nt - next Tuesday d.nw - next Wednesday d.nr - next Thursday d.nf - next Friday d.ns - next Saturday So given today's date 2018-07-30, the snippets in sequence produce 2018-08-06 2018-07-31 2018-08-01 2018-08-02 2018-08-03 2018-08-04 d.m+ - first day of next month 2020-02-01 And dt.n to add the next business day in prose, e.g. Tuesday, June 4, 2019 Download v. 1.2 - added first day of next month - added external triggers for M of next week and 1st of next month - updated so snippets will paste in Alfred (using the trick here: https://www.alfredforum.com/topic/11765-snippet-triggers-triggered-in-alfred-dont-paste-to-alfred/?tab=comments#comment-61652 ) v. 1.3 2022-03-31 - updated to use Python 3 for compatibility with MacOS 12.3 Edited April 1, 2022 by dfay flome, iGyver and cands 1 2 Link to comment
dfay Posted June 3, 2019 Author Share Posted June 3, 2019 Updated to use Alfred 4 conditionals to add a snippet to produce the next business day in prose (almost as requested here): Link to comment
dfay Posted January 31, 2020 Author Share Posted January 31, 2020 Updated to v.1.2 - added first day of next month - added external triggers for M of next week and 1st of next month - updated so snippets will paste in Alfred (using the trick here: https://www.alfredforum.com/topic/11765-snippet-triggers-triggered-in-alfred-dont-paste-to-alfred/?tab=comments#comment-61652 ) cands 1 Link to comment
sbc Posted April 20, 2020 Share Posted April 20, 2020 Can you provide an example of how to use this in a snippet? I've tried every possible permutation I can think of with no success. Thanks! Link to comment
dfay Posted April 20, 2020 Author Share Posted April 20, 2020 It's a workflow, with snippet triggers, so you'd need the PowerPack & to install the .alfredworkflow file linked in the first post. Link to comment
sbc Posted April 21, 2020 Share Posted April 21, 2020 Thanks. Yes, I have the powerpack and workflow installed. One thing I noticed just now is that the snippets in the workflow didn't import with the keywords set. Once I added a keyword I was able to get the snippet to work, e.g. here => 2020-04-27. Are the keywords not supposed to be imported along with the workflow, or is there a problem somewhere? That aside, what I'm really trying to do is use these snippet triggers within another snippet. OnceI realized this was probably the problem, I found your comment to a thread on nested snippets, which I read as saying I'll need to customize the workflow in order to get this to work. Is that still the case, as far as you know? Link to comment
deanishe Posted April 21, 2020 Share Posted April 21, 2020 2 hours ago, sbc said: Are the keywords not supposed to be imported along with the workflow, or is there a problem somewhere? Alfred strips hotkeys and snippet triggers on import to prevent surprises. You have to set your own, but once you do, Alfred will remember them and keep your changes when you update a workflow. sbc 1 Link to comment
juuls Posted January 12, 2021 Share Posted January 12, 2021 @dfay can you please explain what to change in the workflow in order to get it working? Perhaps share some screenshots :) Every snippit in the workflow starts with :week. Link to comment
dfay Posted January 12, 2021 Author Share Posted January 12, 2021 I'm not really sure what you're asking. Here's what my setup looks like: juuls 1 Link to comment
ComposMentis Posted May 29, 2021 Share Posted May 29, 2021 Hey @dfay I am just finding this workflow now - thank you! It's working great so far. I wanted to ask if there was any reason you didn't include a snippet for Sunday (i.e. next Sunday)? Quote d.nm - next Monday d.nt - next Tuesday d.nw - next Wednesday d.nr - next Thursday d.nf - next Friday d.ns - next Saturday I personally work on Sundays and would love this to be included as well. Can you guide me through how to add that, or perhaps include that in an update if it's not too difficult? I'm also curious if it is possible to duplicate them to include something like ;sunday in two weeks; or ;monday in two weeks; - that would be super handy. I'm curious if you have a guide or steps published somewhere to edit this workflow in any way? I've been looking for a way to enter dates dynamically like this for a while - thanks again! Link to comment
erikhighlander Posted November 14, 2022 Share Posted November 14, 2022 hi @dfay, does this still work on Ventura? for some reason, I can't get it to run. It just returns the last thing on my clipboard. thanks! Link to comment
dfay Posted November 15, 2022 Author Share Posted November 15, 2022 Yes, it’s working for me. What are you seeing in the debugging console? Link to comment
erikhighlander Posted January 6 Share Posted January 6 sorry for the very late reply. it's still not working for me. [07:54:16.029] Date snippets[Snippet] Processing complete [07:54:16.034] Date snippets[Snippet] Passing output '' to Arg and Vars [07:54:16.035] Date snippets[Arg and Vars] Processing complete [07:54:16.036] Date snippets[Arg and Vars] Passing output '0' to Run Script [07:54:16.049] ERROR: Date snippets[Run Script] xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun [07:54:16.051] Date snippets[Run Script] Processing complete [07:54:16.051] Date snippets[Run Script] Passing output '' to Copy to Clipboard [07:54:16.052] Date snippets[Copy to Clipboard] Processing complete [07:54:16.053] Date snippets[Copy to Clipboard] Passing output '' to Dispatch Key Combo Link to comment
erikhighlander Posted January 6 Share Posted January 6 i'm sure this is an easy fix for you, but it's not for me 😜 what is xcrun? Link to comment
vitor Posted January 7 Share Posted January 7 @erikhighlander See another post for the fix. It was caused by the update. Link to comment
Richard Wayman Posted August 9 Share Posted August 9 This workflow is just what I've been looking for, thanks. Is there a way to modify the date format of the output? At the moment it's in this format: 2023-08-15 With other Alfred snippets I can specify e.g. {date:dd.MM.yyyy} Is there a way to specify the date output format for this workflow? Thanks in advance 🙏🏻 Link to comment
Benjamski Posted August 14 Share Posted August 14 On 8/9/2023 at 12:33 AM, Richard Wayman said: This workflow is just what I've been looking for, thanks. Is there a way to modify the date format of the output? At the moment it's in this format: 2023-08-15 With other Alfred snippets I can specify e.g. {date:dd.MM.yyyy} Is there a way to specify the date output format for this workflow? Thanks in advance 🙏🏻 I would love to know this as well! 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