question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE REQUEST] Capture to any file by select filename in input textbox instead of setting

See original GitHub issue

Is your feature request related to a problem? Please describe. I want to capture idea/thought to different markdown pages, but currently I can only set one page for one command ( except the daily note which we could use a template like daily/{{DATE:gggg-MM-DD - ddd MMM D}}.md )

Describe the solution you’d like A clear and concise description of what you want to happen.

image

in this example, we could add any content to any file under file’s title #todo, after insert, we could get result in filename.md

...
# todo  
some_context #this line is add by quick-add
....

It would be much more convenient then select only one filename in Capture setting

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
chhoumanncommented, Aug 20, 2022

Sure, @datavistics!

You could create a macro with this script:

module.exports = async (params) => {
    const allMdFiles = params.app.vault.getMarkdownFiles();
    const selectedFilePath = await params.quickAddApi.suggester(
        allMdFiles.map(f => f.basename),
        allMdFiles.map(f => f.path)
    );

    params.variables.path = selectedFilePath;
}

Call the script first, and then capture to the {{VALUE:path}} variable. image

So the macro looks like this: image

I called the script ask_for_file.js.

0reactions
ChitaGideoncommented, Nov 20, 2022
image

If we can use macro directly in capture filename, it could be much convenient .

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML input file selection event not firing upon selecting the ...
2. I tried the demo, but (using Chrome 21) I keep getting `C:\fakepath` + then the filename I selected (excluding the path). ·...
Read more >
<input type="file"> - HTML: HyperText Markup Language | MDN
If no file is selected yet, the value is an empty string ( "" ). When the user selected multiple files, the value...
Read more >
Excel VBA GetOpenFileName to Browse and Select File
This post will demonstrate how we can allow a user to select a file using a traditional “open file”-type dialog box.
Read more >
File input (or "upload") in HTML forms
When a[n] INPUT tag of type FILE is encountered, the browser might show a display of (previously selected) file names, and a “Browse”...
Read more >
Handling File Uploads With Flask - miguelgrinberg.com
The filename attribute in the FileStorage provides the filename submitted by the client. If the user submits the form without selecting a file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found