stack_picker/scripts/validate_html.ml

20 lines
569 B
OCaml
Executable File

#!/usr/bin/env ocaml
let rec find_html_files (static_path : string) =
let files = Sys.readdir static_path in
Array.fold_left
(fun acc file ->
let path = Filename.concat static_path file in
if Sys.is_directory path then acc @ find_html_files path
else if Filename.check_suffix path ".html" then path :: acc
else acc)
[] files
let () =
let files = find_html_files "static" in
let _file_names = List.fold_left (fun name acc ->
acc ^ "\n - " ^ name
) "" files in
(* Printf.printf "Found files:\n%s" file_names; *)
exit 0