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.

Compile all markdown files in current directory if no arguments are given

See original GitHub issue

If no arguments were given, instead of showing the help, search for all markdown (*.md, *.markdown, *.mdown, *.md.txt) files in the directory the command was invoked from, and compile each of them.

Maybe show a confirmation dialog if there are more than 10 files.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
simonhaenischcommented, Jun 8, 2019

@karlhorky if all files are in the same directory, you can even just do md-to-pdf dir 🤓 I’m actually planning to allow shell globbing so you can pass in a list of files, however it’s going to be a breaking change and I want to do a few other things along with it.

0reactions
karlhorkycommented, Jun 7, 2019

As mentioned in #22, a workaround for this with the current version is a shell for loop:

{
  "scripts: {
    "build": "for file in dir/*.md; do md-to-pdf $file; done"
  }
}

Ref: https://github.com/karlhorky/npm-scripts-tricks/blob/master/readme.md#run-a-command-for-all-files-in-a-directory

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to compile a selection of Markdown documents
If you want to compile all *.md files in the current directory into one file, recursively (not POSIX): pandoc -f markdown -t html...
Read more >
Markdown and including multiple files - Stack Overflow
The short answer is no. The long answer is yes. :-) Markdown was designed to allow people to write simple, readable text that...
Read more >
16.6 The working directory for R code chunks | R Markdown ...
The default working directory is the directory of the Rmd file, and there are two other possible choices: you may use the current...
Read more >
Broken links between multiple input Markdown files #6384
The problem is that this is not possible. To be able to compile files from different directories with Pandoc, the prefix ID must...
Read more >
Render multiple R Markdown documents into a book
Render multiple R Markdown files under the current working directory into a book ... to use new R sessions to compile individual Rmd...
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