fix pandoc conversion
This commit is contained in:
parent
09da54f4f0
commit
3c65448c74
@ -36,7 +36,7 @@ fun convert(inputPath: Path, outputPath: Path) {
|
||||
|
||||
).also {
|
||||
logger.info("Running pandoc: ${it.command().joinToString(separator = " ")}")
|
||||
}.inheritIO().start().waitFor()
|
||||
}.directory(source.parent.toFile()).inheritIO().start().waitFor()
|
||||
|
||||
val htmlPath = target.parent.resolve(source.fileName.nameWithoutExtension + ".html")
|
||||
|
||||
@ -61,6 +61,24 @@ fun convert(inputPath: Path, outputPath: Path) {
|
||||
source.copyToIgnoringExistingDirectory(target, false)
|
||||
}
|
||||
}
|
||||
|
||||
// inputPath.walk().filter { it.extension == "md" }.forEach { source ->
|
||||
//
|
||||
// val docxPath =
|
||||
// (outputPath / source.relativize(inputPath)).resolveSibling(source.fileName.nameWithoutExtension + ".docx")
|
||||
//
|
||||
// ProcessBuilder(
|
||||
// "pandoc",
|
||||
// "--from=markdown",
|
||||
// "--to=docx",
|
||||
// "--lua-filter=${scriptPath.absolute()}",
|
||||
// "--output=${docxPath.absolute()}",
|
||||
// "${source.absolute()}",
|
||||
//
|
||||
// ).also {
|
||||
// logger.info("Running pandoc: ${it.command().joinToString(separator = " ")}")
|
||||
// }.inheritIO().start().waitFor()
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user