Compare commits

...

2 Commits

Author SHA1 Message Date
Stephane Bortzmeyer 1d75ff5e5e Merge branch 'master' of ssh://forge.chapril.org:222/bortzmeyer/GaBuZoMeu 2023-06-12 21:35:52 +02:00
Stephane Bortzmeyer c70895fc5f Create the directories if they don't exist 2023-06-12 21:35:43 +02:00
1 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,8 @@ import Registry.Utils
import Registry.Grammar (registry)
import Registry.Registry
import System.Directory (createDirectoryIfMissing)
infile = "./language-subtag-registry"
outdir = "./registry-html"
@ -31,6 +33,8 @@ main = do
input <- IO.hGetContents f
let theregistry = getRegistry input
foreach ["language", "script", "region", "variant",
"redundant", "grandfathered"]
(toHTMLFiles theregistry)
"redundant", "grandfathered"]
(\arg ->
createDirectoryIfMissing True (outdir ++ "/" ++ arg) >>
toHTMLFiles theregistry arg)