Megatest

Check-in [7571d597a5]
Login
Overview
Comment:Added create on edit for refdb
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 7571d597a51dff10569e0a73adc81e6b13a1697c
User & Date: matt on 2013-07-25 23:57:59
Other Links: branch diff | manifest | tags
Context
2013-07-26
00:34
Begingings of code in place for editing Megatest area using refdb check-in: 76df097649 user: matt tags: dev
2013-07-25
23:57
Added create on edit for refdb check-in: 7571d597a5 user: matt tags: dev
23:31
Moved meta data files to avoid possible future collisons in refdb check-in: 825466004b user: matt tags: dev
Changes

Modified Makefile from [705f91c9d9] to [7660beeb07].

22
23
24
25
26
27
28
29

30
31
32
33
34
35
36
22
23
24
25
26
27
28

29
30
31
32
33
34
35
36







-
+








CSIPATH=$(shell which csi)
CKPATH=$(shell dirname $(shell dirname $(CSIPATH)))

all : mtest dboard newdboard txtdb

refdb : txtdb/txtdb.scm
	csc txtdb/txtdb.scm -o refdb
	csc -I txtdb txtdb/txtdb.scm -o refdb

mtest: $(OFILES) megatest.o
	csc $(CSCOPTS) $(OFILES) megatest.o -o mtest

dboard : $(OFILES) $(GOFILES) dashboard.scm
	csc $(OFILES) dashboard.scm $(GOFILES) -o dboard

Modified txtdb/txtdb.scm from [5c0719a88a] to [84fe7eb4b4].

392
393
394
395
396
397
398




399
400
401
402
403
404
405
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409







+
+
+
+







;; 	(let ((dat (read-dat fname)))
;; 	  (if (null? dat)
;; 	      #f
;; 	      (map cadr dat))))))

(define (edit-refdb path)
  ;; TEMPORARY, REMOVE IN 2014
  (if (not (file-exists? path)) ;; Create new 
      (begin
	(print "INFO: Creating new txtdb at " path)
	(create-new-db path)))
  (if (not (file-exists? (conc path "/sxml/_sheets.sxml")))
      (begin
	(print "ERROR: You appear to have the old file structure for txtdb. Please do the following and try again.")
	(print)
	(print "mv " path "/sxml/sheets.sxml " path "/sxml/_sheets.sxml")
	(print "mv " path "/sxml/workbook.sxml " path "/sxml/_workbook.sxml")
	(print)
451
452
453
454
455
456
457
458

459
460
461
462
463
464
465
466

467
468
469
470
471
472
473
474
475
455
456
457
458
459
460
461

462
463
464
465





466


467
468
469
470
471
472
473







-
+



-
-
-
-
-
+
-
-







      (apply process-action (car rema)(cdr rema)))
     (else (print help)))))

;;======================================================================
;;  C R E A T E   N E W   D B S
;;======================================================================

(include "txtdb/metadat.scm")
(include "metadat.scm")

;; Creates a new db at path with one sheet
(define (create-new-db path)
  (create-directory path #t)
  (create-directory (conc path "/sxml") #t))
  ;; Sheet1.dat
  ;; sheet-names.cfg
  ;; sxml/Sheet1.sxml
  (extract-refdb minimal-sxml path))
  ;; sxml/_sheets.sxml
  ;; sxml/_workbook.sxml


(main)

#|  
 (define x (refdb:read-gnumeric-xml "testdata-stripped.xml"))