init
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
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"])
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user