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.

Allow to pass multiple input files via globbing

See original GitHub issue

Following some discussion on issue #14, I would like to change the API to allow to pass multiple input files via shell globbing. This will be a breaking change because currently the second input argument is treated as the pdf output filename.

$ md-to-pdf **/*.md

The shell would expand the glob into an array of files that will be passed as input arguments (leaving the glob expansion to the shell rather than dealing with it using some npm package).

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
simonhaenischcommented, Jun 8, 2019

Ah, I see you had already found this issue! Thanks for dropping the info here (:

1reaction
karlhorkycommented, Jun 7, 2019

To do this with the current version, you can do this with a shell for loop in your npm script:

{
  "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

Python glob multiple filetypes - Stack Overflow
Maybe there is a better way, but how about: import glob types = ('*.pdf', '*.cpp') # the tuple of file types files_grabbed =...
Read more >
Glob pattern support for input files · Issue #24 · mermaid-js ...
If would be nice to be able to run a single command that takes multiple input files (glob patterns). Imagine a package.json build...
Read more >
Python Glob: Filename Pattern Matching - PYnative
Python glob module to find files and folders whose names follow a specific pattern. Search files recursively with wildcard characters.
Read more >
Bash Globbing Tutorial - Linux Hint
You can apply globbing pattern by using '?' four times to do this task. Find out the list of all files and folder...
Read more >
Use the OS and Glob Python Packages to Manipulate File Paths
The glob function can be used to find just one folder or file. This can be done by just giving glob the path...
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