Jump to content

Roam Daily Notes Generator


Recommended Posts

https://github.com/kylestratis/roam-daily-notes

http://www.packal.org/workflow/roam-daily-notes

 

I wrote this Alfred workflow to help generate a Daily Notes template for me in Roam. It generates spaces for Morning Pages, habits (make sure to edit with your own habits), and implements a temporal sieve, allowing you to look back at your daily notes form 1 week ago, 4 weeks ago, 12 weeks ago, and 1 year ago. 

daily_notes.png

Edited by seated_arts
Link to comment
  • 1 month later...

Hi! For some reason the trigger does not work. I set it to be the same as yours but I cannot get alfred to run the script or add anything to the clipboard. Can you confirm that all you need to do to run it is define the trigger in alfred? 

Link to comment

Hi @rish! It's possible but not entirely likely that there is a bug in the Packal file and I haven't been able to update it for a few versions now due to problems with the site. You can get the latest version (v. 1.3.1) from the Github link. It's possible you might have your system Python installed somewhere different than /usr/bin/python so you may need to update that as well. Failing that, if you enable debug mode within Alfred (cmd+d) and trigger the workflow, you should be able to see what is failing for you. The latest version worked for me today.

Link to comment
  • 1 month later...

Hi @seated_arts - This is great and it works for me with my chosen trigger. 

 

One thing that is nice with my daily note template is emojis next to my headings to highlight them. I tried to do this with your code but it won't run - have you tried to do this?

 

Any thoughts on how to add emojis? I tried using:

 

import emoji

 

And then:

- ## emoji.emojize(':light_bulb:') [[Morning Update]]

 

But it doesn't run and the debugger says:

 

import emoji

ImportError: No module named emoji

 

I have installed it via pip and it works fine if I write print(emoji.emojize(':light_bulb:')) from the terminal?

Link to comment
3 hours ago, mcmahonecon said:

Hi @seated_arts - This is great and it works for me with my chosen trigger. 

 

One thing that is nice with my daily note template is emojis next to my headings to highlight them. I tried to do this with your code but it won't run - have you tried to do this?

 

Any thoughts on how to add emojis? I tried using:

 

import emoji

 

And then:

- ## emoji.emojize(':light_bulb:') [[Morning Update]]

 

But it doesn't run and the debugger says:

 

import emoji

ImportError: No module named emoji

 

I have installed it via pip and it works fine if I write print(emoji.emojize(':light_bulb:')) from the terminal?

 

I think this has to do with the Python executable your Alfred installation is pointing to. I'm not sure how to best go about diagnosing it (those are notoriously fun issues), but this thread looks like it could be helpful: 

Good luck!

Link to comment
On 10/6/2020 at 9:47 PM, seated_arts said:

It's possible you might have your system Python installed somewhere different than /usr/bin/python so you may need to update that as well

 

/usr/bin/python is a standard part of macOS. It's guaranteed to be the system Python 2.7, unless the user has turned off SIP and deliberately overwritten it.

 

The way your workflow is set up, it's guaranteed to be run with the macOS Python 2.7 unless the user's OS is screwed up.

 

7 hours ago, mcmahonecon said:

I have installed it via pip and it works fine if I write print(emoji.emojize(':light_bulb:')) from the terminal?

 

You probably used the wrong pip. Alfred doesn't use your shell environment, so if you've installed a newer Python (e.g. via Homebrew), you're probably using that one in your shell, not the system Python Alfred and workflows use. Unless you're in a virtual env, you should always run pip as /path/to/python -m pip to ensure you’re running the right one.

 

The best solution for a workflow is to bundle any 3rd-party libraries, so it works out of the box on any system. To do that, open the workflow in Terminal/iTerm (or cd to the workflow directory) and run /usr/bin/python -m pip install --target=. emoji

 

Edited by deanishe
Link to comment

Thank you both for the prompt replies. 

 

I got the library working by installing it in the workflow directory. I still have some tweaks to make but the main hurdle is overcome. 

 

I think I will try to follow the @deanishe advice from https://www.deanishe.net/alfred-workflow/guide/third-party.html?highlight=python library and set up a library so I can invoke these 3rd party libraries across my workflows. I just need to understand the instantiate step - is it in the workflow every time or something to do once? 

 

But for now, at least I can fine tune the daily notes template. 

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