Has anyone written a script to convert markdown to html?
I.e. so I can open md files via AutoHotkey. Thanks.
markdown to html anyone? Topic is solved
markdown to html anyone?
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: markdown to html anyone?
Thanks a lot tmplinshi.
Code: Select all
;note: for Markdown2HTML.ahk
;replace this:
;if StrStartsWith(tline, ";")
;with this:
;if (SubStr(tline, 1, 1) = ";")
;[Markdown2HTML function]
;GitHub - fincs/GenDocs: AutoHotkey documentation generator
;https://github.com/fincs/GenDocs
;[example md files]
;GitHub - Lexikos/Object.ahk: This library for AutoHotkey v2-alpha tests some ideas for potential changes to how objects work.
;https://github.com/Lexikos/Object.ahk
q:: ;convert md file to htm file
vPath := A_Desktop "\Object.ahk-master\readme.md"
FileRead, vText, % vPath
vHtml := Markdown2HTML(vText)
SplitPath, vPath, vName, vDir, vExt, vNameNoExt, vDrive
vPath2 := vDir "\" vNameNoExt ".htm"
if !FileExist(vPath2)
FileAppend, % vHtml, % "*" vPath2
Run, % vPath2
return
#Include %A_Desktop%\GenDocs-master\Lib\Markdown2HTML.ahk
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: NinjoOnline and 230 guests