forked from daattali/beautiful-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.convert-adoc-to-docx.bat
54 lines (46 loc) · 1.77 KB
/
.convert-adoc-to-docx.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@ECHO OFF
rem use input filename as parameter
rem example:
rem das hier verwenden:
rem .convert-adoc-to-docx.bat Germo_Goertz_IT_profile.adoc
rem _
rem da es oft Probleme mit pandoc gibt, erst mal testen
rem pandoc -v
rem pandoc --version
rem _
rem .convert-adoc-to-docx.bat Germo_Goertz_IT_profile_2.adoc
rem .convert-adoc-to-docx.bat test.adoc
rem .convert-adoc-to-docx.bat "test ccc ddd.adoc"
rem .convert-adoc-to-docx.bat adoc-syntax-quick-reference.adoc
rem mit folgendem Aufruf werden Bilder nicht exportiert, Der Aufruf muss also im Verzeichnis der zu exportierenden Datei erfolgen
rem .convert-adoc-to-docx.bat .\datamart\betty-barklay-plandaten.adoc
rem echo %1
rem asciidoctor -b docbook test.adoc
rem pandoc -f docbook -t markdown -s test.xml -o test.md
rem pandoc -f docbook -t docx -s test.xml -o test.md
rem asciidoctor -b docbook %1
rem pandoc -f docbook -t markdown -s android-editor.xml -o android-editor.md
rem for %%f in (.\*.md) do kramdoc --lazy-ids --auto-id-prefix=_ --auto-id-separator=_ "%%f"
rem notwendige Installationen: pandoc, asciidoctor
rem choco install pandoc -y
rem sometimes pandoc doesn't work, check version:
rem pandoc --version
rem sometime force helps
rem choco install pandoc -y -force
rem Install asciidoctor:
rem - zuerst ruby installieren, dann mit ruby asciidoctor
rem choco install ruby -y
rem gem install asciidoctor
rem asciidoctor --version
FOR %%i IN (%*) DO (
ECHO %%i
ECHO filedrive=%%~di
ECHO filepath=%%~pi
ECHO filename=%%~ni
ECHO fileextension=%%~xi
ECHO fullpath=%%~fni
echo asciidoctor -b docbook "%%~fni"
echo pandoc -f docbook -t docx --reference-doc=reference.docx -s "%%~pi%%~ni.xml" -o "%%~pi%%~ni.docx"
asciidoctor -b docbook "%%~fni"
pandoc -f docbook -t docx --reference-doc=reference.docx -s "%%~pi%%~ni.xml" -o "%%~pi%%~ni.docx"
)