Jump to content

TemplatesManager — Save and reuse files, directory structures, and urls


Recommended Posts

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
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.

Link to comment
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”?

Link to comment
  • 3 weeks later...
  • 4 weeks later...

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.
 

Link to comment
  • 4 months later...

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

@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
  • 9 months later...

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
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
  • 1 month later...

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
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. 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...