Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Could you explain more about script? #15

Closed
zhl111 opened this issue Jun 20, 2021 · 7 comments
Closed

[Question] Could you explain more about script? #15

zhl111 opened this issue Jun 20, 2021 · 7 comments

Comments

@zhl111
Copy link

zhl111 commented Jun 20, 2021

I can't reproduce it successfully, do I need to set up metaedit? No programming knowledge, need more detailed steps, thanks a lotimage

@chhoumann
Copy link
Owner

chhoumann commented Jun 20, 2021

Hey! For that script to work, you need MetaEdit installed. It's in the Community Plugin store.

  1. Create a Javascript file with the script in it in your vault
  2. Add a new macro in the Macro Manager
  3. Select the Javascript file you created as the user script
  4. Add the macro to a macro choice

Like this (this example is for another script)
FHlfsh54CF

You can see the await Update('Book', val, `bins/daily/${date}.md`) function on the second last line.
That updates the value of the book property to the value entered in the prompt. And bins/daily/${date}.md is the path to my daily journal note for that day.

Hope this helps!

@zhl111
Copy link
Author

zhl111 commented Jun 20, 2021

You are so sweet, the previous steps were fine but it still didn't work. Is it because of the notes path? Or am I missing some step? I am copying your script example as is.
image

@chhoumann
Copy link
Owner

It could very well be the note path, yes! My daily journals are located in my bins/daily folder, and they're named in a special way. So if yours on't have that path, it'll fail.

There's the format(...) in the script code - that's where I put the format that I use for the name of my daily notes. You could just replace that with yours.

And replace the bins/daily with the folder wherein you have your daily note files. You'll also need a property (YAML or Dataview) that is called "Book".

@zhl111
Copy link
Author

zhl111 commented Jun 20, 2021

Thank you so much!👍👍👍

@doney88
Copy link

doney88 commented May 1, 2023

can I retrieve content from different notes (maybe the contents after specific header), and compose all the source into one content and insert after active note?
i guess it must be done by script , right ?

@asteriamoon
Copy link

What do I name the file

@kongyuan
Copy link

kongyuan commented Apr 1, 2024

This part of the UI is confusing and should be completely redone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants