Skip to content

Made it possible to pass multiple files to pandoc - fixes #248#259

Merged
JessicaTegner merged 1 commit intomasterfrom
issue248
Mar 22, 2022
Merged

Made it possible to pass multiple files to pandoc - fixes #248#259
JessicaTegner merged 1 commit intomasterfrom
issue248

Conversation

@JessicaTegner
Copy link
Owner

This pr makes it possible to pass multiple files to pandoc in various ways.

Examples (from the updated readme)

import pypandoc

# convert all markdown files in a chapters/ subdirectory.
pypandoc.convert_file('chapters/*.md', 'docx', outputfile="somefile.docx")

# convert all markdown files in the book1 and book2 directories.
pypandoc.convert_file(['book1/*.md', 'book2/*.md'], 'docx', outputfile="somefile.docx")

# convert the front from another drive, and all markdown files in the chapter directory.
pypandoc.convert_file(['D:/book_front.md', 'book2/*.md'], 'docx', outputfile="somefile.docx")

This fixes #248

simonv3

@simonv3
Copy link

simonv3 commented Mar 21, 2022

This looks like it should do what I want it to, thanks @NicklasTegner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible to pass multiple files to convert_file

3 participants