aboutsummaryrefslogtreecommitdiff
path: root/dump/triples.scm
diff options
context:
space:
mode:
Diffstat (limited to 'dump/triples.scm')
-rw-r--r--dump/triples.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/dump/triples.scm b/dump/triples.scm
index 1509ded..6ccf137 100644
--- a/dump/triples.scm
+++ b/dump/triples.scm
@@ -40,7 +40,16 @@ characters with an underscore and prefixing with gn:PREFIX."
(number? object))
(error "Triple object not a string, symbol or number:"
(list subject predicate object)))
- (format #t "~a ~a ~s .~%" subject predicate object))
+ (let ([format-string
+ (if (symbol? object)
+ "~a ~a ~a .~%" "~a ~a ~s .~%")]
+ [object
+ (if (and (symbol? object)
+ (string-contains (symbol->string object)
+ "\""))
+ (symbol->string object)
+ object)])
+ (format #t format-string subject predicate object)))
(define (scm->triples alist id)
(for-each (match-lambda