Jump to content

Recommended Posts

Alfred Bear Templates Workflow

Workflow to create a bear note from a given template. These templates follow bear snippet syntax and can contain default alfred variables (e.g. {datetime}).

The Templates live in the bearTemplateDirectory which is by default '~/.bear-templates' but can be changed by giving another path starting at the users home directory.

Usage

By default just type bt and then start to type. The Workflow suggests all template names it found in the bearTemplateDirectory. To get the snippet variables translated it pushes the template text to the clipboard. So after using the workflow the template is in Bear and also in your clipboard.

Alfred Workflow.png

Download

You can download the workflow from Packal

Edited by jmeischner
Added download link
Link to comment
  • 1 month later...

Very nice workflow. However, I don't get it working.

I've created the directory ~/.bear-templates and added a file called "Weekly Review" with simple contents: "Hello World"

 

When I hit Alfred with "bt" and start typing w, it doesn't show my Weekly Review file. 

Could you please let me know what I'm doing wrong?

 

Does the file need to be formatted? It seems it shows the whole directory listing of my home folder.

In case I need to set os variables. My shell is zsh. 

 

Thanks in advance,

 

Robin

Link to comment
On 9/3/2019 at 7:43 AM, jmeischner said:

The Templates live in the bearTemplateDirectory which is by default '~/.bear-templates'

 

The default is actually ~ because you set bearTemplateDirectory to "Don't export", which means it's empty…

 

@RobinB You need to go into the workflow's settings (the weird [𝑥] icon) and set bearTemplateDirectory to .bear-templates

Edited by deanishe
Link to comment
On 10/10/2019 at 7:30 PM, deanishe said:

 

The default is actually ~ because you set bearTemplateDirectory to "Don't export", which means it's empty…

 

@RobinB You need to go into the workflow's settings (the weird [𝑥] icon) and set bearTemplateDirectory to .bear-templates

 

Thank you deanishe. I will reexport and upload the workflow and hopefully export the bearTemplateDirectory this time 😓

 

Sorry for the inconvenience,

Jan

Link to comment
  • 1 year later...

Hi there - I've just got a new MacBookPro with the M1 chip and Big Sur and have just reinstalled this package and it's now failing after selecting a template (which worked on my old machine) - I get a new Bear note created with the following text "./node_modules/.bin/run-node bear-template/readAndCompileTemplate.js"

 

Not sure if this is a Big Sur or Apple Silicon thing - any ideas please?

 

Many thanks,

  Gordon

Link to comment

Hej Gordon,

 

happy to hear that you're using/used the workflow.

 

I can not test it on apple silicon but on Big Sur it's actually working for me. But the text you're getting in your note is exactly the text in one of the Alfred workflow steps (image) which should normally get executed instead of just passed as argument to the next step. So I would assume it's somehow a problem with Alfred and it's workflow execution 🙈

 

From February onwards I'll hopefully be able to test it on a M1 chip, but in the meantime I can not reproduce it and therefore have no idea how to help 😓

 

Sorry 🥺,

Jan

Bildschirmfoto 2020-12-10 um 09.32.40.png

Link to comment
  • 1 month later...
4 hours ago, jmeischner said:

Hej Gordon,

 

I realized we spoke about two different workflows. The current version of the Alfred-bear workflow is discussed here: thread and I was now able to test this on a M1 and it's working.

 

Kind regards,

Jan

Thanks Jan - I've tried the new node package and I can confirm it's working on M1.  Thank you 🙂

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