vitor Posted April 19, 2017 Author Share Posted April 19, 2017 Update. Get (Path) Finder window with JXA. Thank you again, @deanishe, for the Path Finder parts. To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
deanishe Posted April 19, 2017 Share Posted April 19, 2017 (edited) I think that's because you're getting a URL from Finder, not a path. AFAIK, by convention, directory URLs end with a slash, but directory paths don't. Edited April 19, 2017 by deanishe Link to comment
vitor Posted April 19, 2017 Author Share Posted April 19, 2017 38 minutes ago, deanishe said: I think that's because you're getting a URL from Finder, not a path. AFAIK, by convention, directory URLs end with a slash, but directory paths don't. I agree. That’s why I suspected that since Path Finder was using posixPath instead of url (which I consider very much a hack — they could’ve just given us a proper solution — it even includes file://) that the results would be inconsistent. Since that matters to the workflow, I had to verify. I ended up getting the path in Finder and performing a final .slice(0, -1) to remove the trailing slash. Though I’ll say all in all I always preferred having a trailing slash in directories to make it easy to differentiate between a file and a directory by just reading a path. Link to comment
deanishe Posted April 19, 2017 Share Posted April 19, 2017 53 minutes ago, vitor said: Though I’ll say all in all I always preferred having a trailing slash in directories to make it easy to differentiate between a file and a directory by just reading a path. For human-readable paths, definitely, but I prefer without the trailing slash for code. It makes working with paths so much easier (especially in shell scripts). tmpdir=${dirpath}.tmp would be a lot more work with trailing slashes. vitor 1 Link to comment
vitor Posted April 19, 2017 Author Share Posted April 19, 2017 29 minutes ago, deanishe said: For human-readable paths, definitely, but I prefer without the trailing slash for code. It makes working with paths so much easier (especially in shell scripts). tmpdir=${dirpath}.tmp would be a lot more work with trailing slashes. That’s a good point. Is there a meme for “I’d like to change my answer”? deanishe 1 Link to comment
vitor Posted May 12, 2017 Author Share Posted May 12, 2017 Update. New new icon. To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted June 10, 2017 Author Share Posted June 10, 2017 Update. Added the option to set a custom templates dir. This is will allow you to easily set up syncing with any service you like. The new custom_templates_dir Workflow Environment Variable enables that setting. If you leave it blank, everything will work the same. To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater. cands 1 Link to comment
Beto Posted October 17, 2017 Share Posted October 17, 2017 Hi, I'm currently using this workflow and it works perfectly, although I use it mostly on 1 folder "Projects" where I create a project folder with a defined structure. Thing is, the folder is created on the active finder window as intended. What I would like to do is: Call Alfred and my template gets created in a defined folder /home/projects/(create here) always, and then the finder opens a windows with the folder selected allowing me to easy rename and start interacting with it, any clue on how to do this? TIA. Link to comment
vitor Posted October 18, 2017 Author Share Posted October 18, 2017 @Beto From the README: On 29/05/2014 at 2:58 AM, vitor said: If you have a template that consists of a directory, you can place inside it an executable script with the name starting as _templatesmanagerscript. (the extension will be your pick), to be executed automatically after copying. You can do whatever in your script. Since what you want to do is always the same, you can setup the script to do your actions. You can even save said script in TemplatesManager itself! Link to comment
vitor Posted March 29, 2019 Author Share Posted March 29, 2019 Update. Require full paths when setting a sync directory. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
nrebrikov Posted January 17, 2020 Share Posted January 17, 2020 Hey! Im having trouble with folders containing non latin character in their name, is there something can be done to make it work? Error code is this: [12:30:59.466] ERROR: Templates Manager[Run Script] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1359:in `mkdir': No such file or directory @ dir_s_mkdir - /Users/nrebrikov/Downloads/ÑеÑÑ/02 From client (Errno::ENOENT) Link to comment
vitor Posted January 17, 2020 Author Share Posted January 17, 2020 @nrebrikov Give me the correct name of the directory, so I can test. Link to comment
nrebrikov Posted January 17, 2020 Share Posted January 17, 2020 3 minutes ago, vitor said: @nrebrikov Give me the correct name of the directory, so I can test. Here it is — Тест Link to comment
vitor Posted January 17, 2020 Author Share Posted January 17, 2020 Unfortunately, I’m unable to reproduce. It’s working fine for me. Link to comment
nrebrikov Posted January 18, 2020 Share Posted January 18, 2020 18 hours ago, vitor said: Unfortunately, I’m unable to reproduce. It’s working fine for me. Oh, i forgot one important thing — i want to use tml +⌘, so im actually trying to put the content of my template inside a Downloads/Тест folder, this way it doesn't work. Link to comment
vitor Posted January 18, 2020 Author Share Posted January 18, 2020 @nrebrikov Download the latest version (just released) and try again. Link to comment
nrebrikov Posted January 19, 2020 Share Posted January 19, 2020 18 hours ago, vitor said: @nrebrikov Download the latest version (just released) and try again. Works like a charm now, thanks a lot! Link to comment
cands Posted February 19, 2020 Share Posted February 19, 2020 I have been using this workflow a lot, it's been solid and reliable for a long time, thanks! Since I have added relatively many templates now I sometimes forget which template is for what purpose, and it is not always self-evident from the name of the main folder. I wonder, would it be easy to add a feature letting the user add an optional description of each template (it may e.g. be shown in the result subtext when showing the template list)? That would make the workflow even more useful I think. Link to comment
vitor Posted February 21, 2020 Author Share Posted February 21, 2020 @cands Thank you for the kind words. For the foreseeable feature, I don’t have intentions of spending more free time adding new features to this Workflow. Link to comment
cands Posted February 24, 2020 Share Posted February 24, 2020 On 2/21/2020 at 7:03 PM, vitor said: @cands Thank you for the kind words. For the foreseeable feature, I don’t have intentions of spending more free time adding new features to this Workflow. OK, I understand. Well the workflow is very useful as is, this was just a wish, thanks for all the time you have put in for it. vitor 1 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