QuickAdd Plugin

Thanks @Christian That was exactly what I’m looking for!

Thank you, Filipe! This is just what I was looking for :clap:

I used it to create a workaround for opening workspace with the current day Workspace Plugin Improvements: Save current workspace and open with today's note - #8 by renarl.

1 Like

Thanks for your message @renarl !

I’m glad to know that my post was helpful to you!

Have a great day!

is there a way to give input to variables? for example templater has a way to manipulate date format to change it from today to yesterday or add and subtract to it. is there anyway that i can do that with date variable?

Hey! Yeah - details here:

In Research to Notes to Stories feat. Eleanor Konik (Obsidian App) | LYT House Episode 1 - YouTube, Eleanor runs the Zettelizer macro and in addition of the new zettles there is an outline section appended to the source file.

I followed the instructions from the QuickAdd Zettelzier example, but I am missing this part of the functionality.

@Christian is it possible to share also that part of the js script or does it require a more complex setup?

2 Likes

Extended the previous mentioned zettelizer script to generate the zettels inside a folder with the same name as the source document.

If you have also the plugin Zoottelkeeper installed, it will also generate an index file with the new notes.

Example Outcome:

If you are interested, you can grab the code from here.

Thanks to @EleanorKonik and @Christian for the inspiration!

4 Likes

@Christian or anyone who can help,

Love the plug in. But, I’m having trouble with VDATE when used in the File name format inside a template choice inside a macro. Just in a stand-alone template choice it seems to work fine. Any thoughts?

This is in the file name field: {{VDATE:start,YYYY-MM-DD HHmm}} {{VALUE:series}} ({{VALUE:presenter}}) - {{VALUE: eventName}}

update: This has been resolved. It was just skipping the data fields in the popups, but now it works again. Not sure what the problem was but restarting obsidian after disabling QuickAdd, followed by restarting Obsidian and reenabling QuickAdd seemed to fix it.

I guess I’ll leave this here in case it helps anyone else.

1 Like

Now that I’ve played with it some more, I’m starting to see how amazingly useful this plugin will be!

Is there a way to use {{VDATE: someDate, YYYY-MM-DDTHH:mm}} in one area and then the same date reformatted in another spot like {{VDATE:someDATE, dddd, MMMM Do YYYY}}? I need the ISO format in the header to work with dataview, but I would like to have a nice format in the body of the markdown. That would be pretty useful.

Similarly, it would be nice to be able to reuse a dropdown choice {{VALUE:choice 1, choice 2, choice 3}} more than once with out having to choose again. like {{VALUE:name, choice 1, choice 2, choice 3}}.

3 Likes

Hey @mgamble! Glad to hear you like the plugin, and that you resolved the issue. :slight_smile:

Neither of the features are implemented yet, but I’ll take both of your suggestions as feature requests and work on them when I can.

1 Like

Hi @Christian thanks for making this amazing plug-in! :grinning:

I know nothing about Javascript (I know a bit of Python) but wanted to create a macro that can pull new messages from my Telegram bot and append it to my current note.

I would really appreciate any help! Hopefully others will find this macro useful too!

.js macro

'use-strict';

import { fetch } from './node_modules/node-fetch';

export async function getMsg() {
  let response =  await fetch('https://api.telegram.org/bot[BOT_TOKEN]/getupdates');
  let data = await response.json()
  let jsn = data.result
  console.log(jsn)
  var count = jsn.length;
  for (var i = 0; i < count; i++) {
    var message_item = jsn[i];
    var msg_text = message_item.message.text
    console.log(msg_text)
  }
  return data;
}

getMsg()

Error message:

image

The node-modules folder is in the same directory as the script

Things I’ve tried:

  1. Including "type": "module"; in local package.json
  2. Used a different import method - var fetch = import('./node_modules/node-fetch') and var fetch = require('./node_modules/node-fetch')

Sorry if this is really basic, I’m completely lost when it comes to JS. Would appreciate any help!

Hey! This might help you with creating requests :slight_smile:

Super cool what you’re building!

Thanks for the reply @Christian! Sorry to bother but in Ezimport.js, how did you import a module to use the fetch method?

@curiosity I did not import anything to use it. It’s globally accessible.

Ah ok, for some reason, running ANY macro runs into import error in my Obsidian. Unsure why this happens

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