Changeset 20736 for lang/gauche
- Timestamp:
- 10/05/08 01:39:58 (5 years ago)
- Location:
- lang/gauche/oldtype/trunk/tool/tdiary2oldtype
- Files:
-
- 1 added
- 2 modified
-
convertToOT.scm (added)
-
convertToSexp.scm (modified) (3 diffs)
-
tdiary2oldtype.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/gauche/oldtype/trunk/tool/tdiary2oldtype/convertToSexp.scm
r20692 r20736 2 2 3 3 (use srfi-1) 4 4 (use srfi-13) 5 5 6 6 (define (load-td2 port) … … 29 29 (string-append 30 30 (if (#/^Date: / str) 31 (format "( \"~a\" ." (cadr pair))31 (format "( \"~a\" " (cadr pair)) 32 32 "") 33 33 (format "(~a . \"~a\")" (car pair) (cadr pair))))) 34 34 ((= 0 (string-length str)) 35 35 (reset-body!)) 36 ((#/^ .$/ str)36 ((#/^[.]$/ str) 37 37 (string-append (reset-body!) 38 38 " )")) 39 39 (else 40 (let1 str (regexp-replace-all #/[\"]/ str "'") 40 (let1 str (string-trim 41 (regexp-replace-all #/[\"]/ str "'")) 41 42 (push-body! str) 42 43 #f)))) … … 45 46 46 47 (define (main argv) 47 (let1 mode (string->symbol (cadr argv)) 48 (print "(") 49 (for-each print 50 (load-td2 51 (current-input-port))) 52 (print ")"))) 48 (print "(") 49 (for-each print 50 (load-td2 51 (current-input-port))) 52 (print ")")) 53 53 54 54 -
lang/gauche/oldtype/trunk/tool/tdiary2oldtype/tdiary2oldtype.sh
r20690 r20736 7 7 gosh ./convertToSexp.scm c < tdc.txt > tdc.scm 8 8 9 #gosh ./convertToSexp.scm d < td2_small.txt > td2.scm 10 #gosh ./convertToSexp.scm c < tdc_small.txt > tdc.scm 11 12 mkdir -p out 13 gosh ./convertToOT.scm td2.scm tdc.scm
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)