From 89b70e6d35dd1044c4025616693d20fd4217df50 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 16 Feb 2026 13:33:12 +0300 Subject: Add uuid function. Signed-off-by: Munyoki Kilyungi --- transform/strings.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/transform/strings.scm b/transform/strings.scm index 8b4ee45..c0f02e5 100644 --- a/transform/strings.scm +++ b/transform/strings.scm @@ -1,6 +1,11 @@ (define-module (transform strings) #:use-module (srfi srfi-1) #:use-module (srfi srfi-19) + #:use-module (rnrs bytevectors) + #:use-module (uuid generate) + #:use-module (uuid utils) + #:use-module (uuid well-known) + #:use-module (ice-9 iconv) #:use-module (ice-9 match) #:use-module (ice-9 rdelim) #:use-module (ice-9 string-fun) @@ -20,7 +25,13 @@ fix-email-id blank-p investigator-attributes->id - path-without-extension)) + path-without-extension + gn-uuid)) + +(define (gn-uuid string) + (generate-string-uuid + 'uuidv5 + (string->bytevector string "UTF-8"))) (define (blank-p str) (if (string-blank? str) #f str)) -- cgit 1.4.1