QuickAdd Plugin

That’s odd. Would you file an issue for it, so we can figure it out? :slight_smile:

Done! Thanks!

1 Like

i am looking for a script that fetches a metadata from the current activefile for me. can someone pls help me with that?

Is there a way to “prepend” the current note name to the newly created note? So if I’m in a note named “Test_Note_Parent” and I select some text in that note… Say I select the word “Child” and type in the doubles [[]] brackets to create a new note. When I click to add the note, it will create the note with the name as “Test_Note_Parent:Chi­ld” Basically creating a new note with the selected text as the Note name, but Prepending or prefixing the current note name to the beginning of the newly created note?

1 Like

@Christian This app is fantastic! Thank you for developing this! I need to log in some info about my pet birds every day and Quickadd can be super useful with that…
I also have a small question to ask: when I try to log in some fields (inserting values after three lines) with a macro,

Diet: 
Supplement: 
Daily Log: 

The result is always like:

Diet: 
value
Supplement: 
value
Daily Log: 
value

Is there a way to format it without the line breaks?

Diet: value
Supplement: value
Daily Log: value

Thanks again for this wonderful plugin!

2 Likes

How to add in one note only?

@andreirs did you find the snippets for the outline-function, or are you using your own WF?

I would be really interested in the outline-function as Eleanor showed.
Could one just point me in that direction?

I’m not sure I understand your question. I linked in my previous post the scripts I’m using. Or are you referring to the outliner plugin?

Hi everyone,

Question here, is it possible to search for files and use their names as input? I’m trying to quick add tasks to projects (I have heaps of them, each with a different name) and it would be great to have this option while having the flexibility.

My idea was something like this:

1 - Open QuickAdd “Create Task”
2 - Search for the file/project I want to add the task
3 - Input task description
4 - Close QuickAdd

Any ideas or comments if this is possible to implement? I tried to use the “Quick Switcher” command as part of the workflow but QuickAdd jumps to the next step before I’ve selected the file I want to add the ask.

Thanks!

Hey! Just saw your comment on my video. I’ll paste my response here for anyone else with similar questions:

That sounds like a smart feature, but doesn’t exist yet from what I know of. I suppose it wouldn’t be impossible with some scripting, though - either in QuickAdd or Templater :slight_smile:

Hey! Could you show me the macro in question? I put

Diet: {{VALUE:DIET}}
Supplement: {{VALUE:SUPP}}
Daily Log: {{VALUE:LOG}}

in a template and it worked fine. I also put it in a capture, and it worked fine. :slight_smile:

Do you have anything in the frontmatter or filename that indicates that a given file denotes a project? If so, I think it would be very possible with a script - and it would always be updated to include all projects, including new ones. :slight_smile:

Hey @Christian ,

Thanks for your reply. My script knowledge is limited but I’m keen to make it happen.

Coming back to your question, yes, all files have a frontmatter property called “Type” where I can identify them as Project, Notes, Archive, etc.

i was looking at metaedit api to use it in quickadd:

update(propertyName: string, propertyValue: string, file: TFile | string)
Updates a property with the given name to the given value in the given file.

If the file is a string, it should be the file path. Otherwise, a TFile is fine.

This is an asynchronous function, so you should await it.

it say the update function value type is string, i have a counter in yaml that i want to go up by one number in the current active file. what should i do?

That makes it a bit easier. You’d be able to fetch all files where the type is project.
Something like this (probably not a very efficient way to do it):

app.metadataCache.getCachedFiles()
    .map(file => app.metadataCache.getFileCache(app.vault.getAbstractFileByPath(file)))
.filter(meta => meta?.frontmatter?.type === "Project")

Something like this :slight_smile:

const currentFile = app.workspace.getActiveFile();
if (!currentFile) return;

const cfMeta = app.metadataCache.getFileCache(currentFile);
const counter = parseInt(cfMeta.frontmatter.count);

app.plugins.plugins["metaedit"].api.update("count", counter + 1, currentFile);
2 Likes

thank you so much, i got he desired results for the counter, but couldn’t pass it to update the matadata because i couldn’t figure out that yaml key needs to be in “”. it is a bit confusing in the documentaion.

1 Like

Can you use the suggester, but be able to choose more than one option? How would I do that? I tried using this, {{VALUE: but could not seem to make it work. I want to be able to have options for how I slept like was up late, and fell asleep quickly or had a hard time sleeping.

Something like {{VALUE:Up late,Fast asleep,Poor sleep}}?

I don’t think I explained what I am tying to do clearly. So, today I want to be able to say that I was Up late and Fell asleep quickly, so I want to use two of the suggested responses. Is that possible?