diff options
author | Pjotr Prins | 2023-08-23 14:23:44 +0200 |
---|---|---|
committer | Pjotr Prins | 2023-08-23 14:23:44 +0200 |
commit | afbbd86f316c2bfa70b86c1c51a4147a83f285ec (patch) | |
tree | cfcb6445da1f69e3a9a553424dc557dba57a8040 /gn/data | |
parent | 9dff66430a956f7c8fe92a600bf36c4b1895f958 (diff) | |
download | gn-guile-afbbd86f316c2bfa70b86c1c51a4147a83f285ec.tar.gz |
Able to render group data
Diffstat (limited to 'gn/data')
-rw-r--r-- | gn/data/group.scm | 5 | ||||
-rw-r--r-- | gn/data/species.scm | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gn/data/group.scm b/gn/data/group.scm index 3d31a0b..014b689 100644 --- a/gn/data/group.scm +++ b/gn/data/group.scm @@ -10,6 +10,7 @@ #:export ( get-group-links + get-group-data )) (define (get-group-links gnid func) @@ -22,3 +23,7 @@ (func (car r)) #f)) recs) )) + +(define (get-group-data id) + (car (cdr (make-pairs (lambda () (sparql-group-info (string-append "gn:" id)))) + ))) diff --git a/gn/data/species.scm b/gn/data/species.scm index 7923101..a712bae 100644 --- a/gn/data/species.scm +++ b/gn/data/species.scm @@ -73,7 +73,7 @@ (define (get-expanded-taxon-data short-name) "Here we add information related to one taxonomy species" - (call/cc (lambda (return) + (call/cc (lambda (return) ; use call/cc to be able to return early (for-each (lambda (rec) (if (string=? (assoc-ref rec "shortName") short-name) (return (expand-species rec)))) @@ -133,5 +133,5 @@ ("meta-links" . ,(list->vector (get-group-links (gnid-species id) (lambda (r) (mk-meta (url-parse-id r)))))) ("links" . ,(list->vector (get-group-links (gnid-species id) - (lambda (r) (mk-meta (url-parse-id r)))))) + (lambda (r) (mk-data (url-parse-id r)))))) )) |