From 96021ce922f21ba958c42a5786a0cd16c02eb79a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Optimal=20Sup-Sp=C3=A9?= Date: Thu, 1 Sep 2022 15:56:55 +0200 Subject: [PATCH] Ajout de UUID --- elm.json | 5 +++++ src/GenerateurH5P.elm | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/elm.json b/elm.json index ba53b14..86d8821 100644 --- a/elm.json +++ b/elm.json @@ -6,6 +6,7 @@ "elm-version": "0.19.1", "dependencies": { "direct": { + "TSFoster/elm-uuid": "4.2.0", "alexkorban/json-to-elm": "1.1.0", "avh4/elm-color": "1.0.0", "dmy/elm-pratt-parser": "2.0.0", @@ -28,7 +29,11 @@ "indirect": { "Garados007/elm-svg-parser": "1.0.0", "Janiczek/elm-bidict": "2.0.1", + "TSFoster/elm-bytes-extra": "1.3.0", + "TSFoster/elm-md5": "2.0.1", + "TSFoster/elm-sha1": "2.1.1", "andre-dietrich/parser-combinators": "3.2.0", + "danfishgold/base64-bytes": "1.1.0", "elm/bytes": "1.0.8", "elm/http": "2.0.0", "elm/regex": "1.0.0", diff --git a/src/GenerateurH5P.elm b/src/GenerateurH5P.elm index 84a7a2f..a5142b1 100644 --- a/src/GenerateurH5P.elm +++ b/src/GenerateurH5P.elm @@ -19,6 +19,7 @@ import Random.List import Set import String as S import Style exposing (..) +import UUID exposing (UUID) titre = @@ -1424,10 +1425,11 @@ trueFalseParser profondeur = |. keyword "TrueFalse" -title = - getChompedString <| - succeed () - |. chompWhile ((/=) '\n') +uuid n = + Random.initialSeed n + |> Random.step UUID.generator + |> Tuple.first + |> UUID.toString blankLine =