Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<# | ||
.SYNOPSIS | ||
Script to convert markdown file to word document | ||
.DESCRIPTION | ||
Convertes a markdown file into an word document using pandoc as converter. The process uses a word template file | ||
.PARAMETER i | ||
Specifies the input file. This is the markdown file | ||
.PARAMETER o | ||
Specifies the output file. This is the word document | ||
.PARAMETER t | ||
specifies the name of the word template used to convert the markdown file to a word document | ||
.EXAMPLE | ||
C:\PS> ./build.ps1 -i myfile.md -o myfile.docx -t mytemplate.docx | ||
Example that converts the file myfile.md | ||
.NOTES | ||
Author: Oliver Graf | ||
Date: November 19, 2016 | ||
REVEAL_URL=https://github.coventry.ac.uk/pages/aa9863/RevealTemplate/reveal.js | ||
HTML_PANDOC_OPTIONS = -t revealjs -V revealjs-url=$(REVEAL_URL) -V | ||
theme=$(REVEAL_THEME) --template newReveal.html --standalone | ||
pandoc $(HTML_PANDOC_OPTIONS) $(SOURCES) -o $(TARGET) | ||
#> | ||
|
||
param( | ||
[Parameter(Mandatory=$true)][string]$i, | ||
[Parameter(Mandatory=$true)][string]$o, | ||
[String]$theme = "league", | ||
[string]$template = "revealTemplate.html", | ||
[string]$revealURL = "https://github.coventry.ac.uk/pages/aa9863/RevealTemplate/reveal.js" | ||
|
||
) | ||
|
||
Write-Host ("Processing file {0} with template {1} and convert to {2}" -f $i, $t, $o) | ||
pandoc --standalone -t revealjs -V theme=$theme -V revealjs-url=$revealURL --template $template $i -o $o | ||
|
||
# We can do the SED equivilent https://www.kittell.net/code/powershell-unix-sed-equivalent-change-text-file/ |