Created
June 26, 2023 10:58
-
-
Save BobToninho/25c0c3dfc99749a745752846004f8e0e to your computer and use it in GitHub Desktop.
Define an utility function for converting markdown files to odt together with the script to use it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls *.md | each { |it| $it.name | parse '{file_name}.{extension}' | get file_name } | flatten | each { |it| to-odt $it } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def to-odt [file_name: string] { | |
let source = $file_name + ".md" | |
let target = $file_name + ".odt" | |
pandoc $source -f markdown -t odt -s -o $target | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment