Jump to content

Template File


zbrl

Recommended Posts

  • 2 weeks later...

Thank you for the submission. This looks useful, especially with the template support.


However, the method you suggest for adding templates (inside the workflow itself) will make it so the user loses any custom templates when they update it. A way to avoid that is to, on first run, copy the templates directory to alfred_workflow_data (make sure to create the folder first) and read from there. That is located outside the workflow, so will keep working on updates.


That would also help with the tf Keyword, which at the moment is confusing because the only effect one sees is a copy being made. By using the alfred_workflow_data in the rest of the code, you can also use ~/Library/Application Support/Alfred/Workflow Data/zbrl.templatefile directly in the File Filter’s scope.


I’d also recommend having a Keyword simply for opening that folder, so users have a quick way to add and edit templates.

Link to comment
Share on other sites

23 hours ago, vitor said:

Thank you for the submission. This looks useful, especially with the template support.


However, the method you suggest for adding templates (inside the workflow itself) will make it so the user loses any custom templates when they update it. A way to avoid that is to, on first run, copy the templates directory to alfred_workflow_data (make sure to create the folder first) and read from there. That is located outside the workflow, so will keep working on updates.


That would also help with the tf Keyword, which at the moment is confusing because the only effect one sees is a copy being made. By using the alfred_workflow_data in the rest of the code, you can also use ~/Library/Application Support/Alfred/Workflow Data/zbrl.templatefile directly in the File Filter’s scope.


I’d also recommend having a Keyword simply for opening that folder, so users have a quick way to add and edit templates.

Great advice! I will update this workflow in the next few days.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Better! But there are still a couple of usability issues which make it confusing for someone new to the workflow:

  • The tf Filter Filter does not have a title, so it doesn’t show up when searching for it.
  • Having to run opentf to start using the workflow shouldn’t be necessary. Running new should also copy the templates folder if it doesn’t exist. That way users will always have a way for the workflow to work even if they haven’t read the instructions.

I would also suggest a Universal Action or File Action as a way to add new templates, though that’s an improvement, it’s not necessary for inclusion.

Link to comment
Share on other sites

On 11/28/2022 at 10:02 PM, vitor said:

Better! But there are still a couple of usability issues which make it confusing for someone new to the workflow:

  • The tf Filter Filter does not have a title, so it doesn’t show up when searching for it.
  • Having to run opentf to start using the workflow shouldn’t be necessary. Running new should also copy the templates folder if it doesn’t exist. That way users will always have a way for the workflow to work even if they haven’t read the instructions.

I would also suggest a Universal Action or File Action as a way to add new templates, though that’s an improvement, it’s not necessary for inclusion.

 

Very reasonable, I updated it again 🥳!

Here is link: Release v1.1.1 · zzhanghub/alfred-template-file (github.com)

 

I will support Universal Action or File Action in the future.

 

Link to comment
Share on other sites

  • 2 months later...

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