aboutsummaryrefslogtreecommitdiff
path: root/scm/dictrans.scm
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2004-10-08 19:50:54 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2004-10-08 19:50:54 +0000
commit8fedf48b3b154a2936f0c5e57bb1e0f9ab2e57b9 (patch)
treecdac473eca976e9e7b08e9f15b378bbdeece9589 /scm/dictrans.scm
parent05be2845943e0850121a60e463af608c2db3cf2a (diff)
downloadellinika-8fedf48b3b154a2936f0c5e57bb1e0f9ab2e57b9.tar.gz
ellinika-8fedf48b3b154a2936f0c5e57bb1e0f9ab2e57b9.tar.bz2
Moved to /scm
git-svn-id: file:///home/puszcza/svnroot/ellinika/trunk@200 941c8c0f-9102-463b-b60b-cd22ce0e6858
Diffstat (limited to 'scm/dictrans.scm')
-rw-r--r--scm/dictrans.scm20
1 files changed, 15 insertions, 5 deletions
diff --git a/scm/dictrans.scm b/scm/dictrans.scm
index ff99dea..bbb6058 100644
--- a/scm/dictrans.scm
+++ b/scm/dictrans.scm
@@ -1,6 +1,8 @@
+#! =GUILE_BINDIR=/guile -s
+!#
;;;; This file is part of Ellinika
;;;; Copyright (C) 2004 Sergey Poznyakoff
;;;;
;;;; Ellinika is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation; either version 2 of the License, or
@@ -75,16 +77,14 @@
;;;; <K>string</K>+
;;;; [<F>string</F>]
;;;; <P>string</P>
;;;; <X>string</X>*
;;;; <T ID="string" />*
;;;; </NODE>
+;=UPDPATH=
-(set! %load-path (cons "/usr/local/share/guile-sql" %load-path))
-(set! %load-path (cons "/home/gray/linguae/ellinika" %load-path))
-
(use-modules (xmltools xmltrans)
(sql)
(ellinika xlat)
(ice-9 getopt-long))
(use-syntax (ice-9 syncase))
@@ -100,12 +100,19 @@
(define sql-password #f)
(define sql-user #f)
(define verbose-option #f)
(define debug-level 0)
(define input-files '())
+(define sysconf-dir "=SYSCONFDIR=")
+
+;;; Load the site defaults
+(let ((rc-file (string-append sysconf-dir "/" config-file-name)))
+ (if (file-exists? rc-file)
+ (load rc-file)))
+
(define (debug level . rest)
(if (>= debug-level level)
(begin
(for-each
(lambda (x)
(display x))
@@ -347,14 +354,12 @@
(cond
((xmltrans:attr attr "__INVALID__")) ; Ignore
((not (current-node-get #:key))
(xmltrans:parse-error #f "K element is missing"))
((or (null? (current-node-get #:p-list)) (null? (null? (current-node-get #:xref))))
-; (display current-node)(newline)
-; (display p-article)(newline)
(xmltrans:parse-error #f "No articles and no cross references for the node"))
(else
(push-node current-node)))
#f)
;;; Topic
@@ -818,7 +823,12 @@
(update-stat conn)
(sql-connect-close conn))
(exit 0)
+;;;; Local variables:
+;;;; mode: Scheme
+;;;; buffer-file-coding-system: utf-8
+;;;; End:
+
\ No newline at end of file

Return to:

Send suggestions and report system problems to the System administrator.