site-gen/main.odin
Simon Kellet 023ae00e71 init
2026-03-07 11:02:36 +00:00

38 lines
800 B
Odin

package main
import "core:fmt"
import "core:os"
main :: proc() {
//steps
//1. parse all md files into html
//2. delete old dir (if exists)
//3. make new dir (HTML)
//4. for each file, write a new file with the name
//5. append css style
//done?
md_files := walk_tree_and_get_md_names("./test/website/MARKDOWN/")
defer delete(md_files)
html_files := make(map[string]cstring)
defer delete(html_files)
//convert each file to html
for file in md_files {
fmt.printfln("parsing %s to html...", file)
html, err := parse_file_md_to_html(file)
if err != nil {
fmt.printfln("ERROR: Could not open file %s: %s", file, os.error_string(err))
}
//fmt.println(html)
html_files[file] = html
}
fmt.println(html_files["/Users/simon/Odin/cm/test/website/MARKDOWN/A5Week4.md"])
}