From c607d087183919f9dc8cc27edac4232650dfb67b Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 17 Jul 2023 23:03:21 +0300 Subject: Dump publication metadata with documentation Signed-off-by: Munyoki Kilyungi --- examples/dump-publication.scm | 51 +++++++++++++++---------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) (limited to 'examples') diff --git a/examples/dump-publication.scm b/examples/dump-publication.scm index 784d815..ff46d3d 100755 --- a/examples/dump-publication.scm +++ b/examples/dump-publication.scm @@ -13,11 +13,8 @@ (define %connection-settings - (call-with-input-file (list-ref (command-line) 1) - read)) - -(define %dump-directory - (list-ref (command-line) 2)) + (call-with-input-file (list-ref (command-line) 1) + read)) @@ -65,32 +62,18 @@ -(call-with-target-database - %connection-settings - (lambda (db) - (with-output-to-file (string-append %dump-directory "dump-publication.ttl") - (lambda () - (prefix "chebi:" "") - (prefix "dct:" "") - (prefix "foaf:" "") - (prefix "generif:" "") - (prefix "gn:" "") - (prefix "hgnc:" "") - (prefix "homologene:" "") - (prefix "kegg:" "") - (prefix "molecularTrait:" "") - (prefix "nuccore:" "") - (prefix "omim:" "") - (prefix "owl:" "") - (prefix "phenotype:" "") - (prefix "pubchem:" "") - (prefix "pubmed:" "") - (prefix "rdf:" "") - (prefix "rdfs:" "") - (prefix "uniprot:" "") - (prefix "up:" "") - (prefix "xsd:" "") - (prefix "publication:" "") - (newline) - (dump-publication db)) - #:encoding "utf8"))) +(dump-with-documentation + (name "Publications Metadata") + (connection %connection-settings) + (table-metadata? #f) + (prefixes + (("rdf:" "") + ("rdfs:" "") + ("gn:" "") + ("publication:" "") + ("pubmed:" ""))) + (inputs + (dump-publication)) + (outputs + (#:documentation "./docs/dump-publication.md" + #:rdf "./verified-data/dump-publication.md"))) -- cgit v1.2.3