forked from daattali/beautiful-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.convert-md-to-adoc.bat
32 lines (27 loc) · 934 Bytes
/
.convert-md-to-adoc.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
@ECHO OFF
rem use input filename as parameter
rem example:
rem .convert-md-to-adoc.bat test02.md
rem .convert-md-to-adoc.bat "test 03.md"
REM use https://github.com/asciidoctor/kramdown-asciidoc
REM read there, how to install
REM kramdown --version
REM gem install kramdown-asciidoc
REM test list files
REM for %%f in (.\a*.md) do @echo %%f
rem echo %1
rem asciidoctor -b docbook test.adoc
rem pandoc -f docbook -t markdown -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"
FOR %%i IN (%*) DO (
ECHO %%i
ECHO filedrive=%%~di
ECHO filepath=%%~pi
ECHO filename=%%~ni
ECHO fileextension=%%~xi
ECHO fullpath=%%~fni
echo kramdoc --lazy-ids --auto-id-prefix=_ --auto-id-separator=_ "%%~fni"
kramdoc --lazy-ids --auto-id-prefix=_ --auto-id-separator=_ "%%~fni"
)