Changeset 14312

Show
Ignore:
Timestamp:
06/21/08 00:05:34 (5 years ago)
Author:
kiyoka
Message:

Released 0.2.7

Location:
lang/gauche/oldtype/branches/stable
Files:
3 added
13 modified

Legend:

Unmodified
Added
Removed
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/format.scm

    r13081 r14312  
    5252          oldtype:expand-page 
    5353          oldtype:format-line-plainly 
    54           ) 
    55   ) 
     54          oldtype:sxml->plain-text 
     55          )) 
    5656(select-module oldtype.format) 
    5757 
     
    6565(define (oldtype:calculate-heading-id headings) 
    6666  (string-append "H-" (number->string (hash headings) 36))) 
     67 
     68 
     69(define (oldtype:wikiname->plain wikiname) 
     70  (let1 m (#/[|](.+)/ wikiname) 
     71        (if m 
     72            (rxmatch-substring m 1) 
     73            wikiname))) 
     74 
     75(define (oldtype:wiki-macro->plain expr) 
     76  (let ((command (car expr)) 
     77        (arg  ;; symbol list to string list. 
     78         (map 
     79          (lambda (x) 
     80            (if (number? x) 
     81                (number->string x) 
     82                (symbol->string x))) 
     83          (cdr expr))) 
     84        (len (length (cdr expr)))) 
     85    (case command 
     86      ((img)        "[img] ") 
     87      ((todo)       "[TODO] ") 
     88      ((done)       "[DONE] ") 
     89      ((youtube)    "[YouTube] ") 
     90      ((thumb) 
     91       (if (< 0 len) 
     92           (let1 _url (car arg) 
     93                 (string-append "[Thumb " _url "] ")) 
     94           "!!Error : No argument ##(thumb URL) command")) 
     95      ((amazon) 
     96       (if (< 0 len) 
     97           (let* ((_asin (car arg)) 
     98                  (_asin (if (#/^[0-9]+$/ _asin) 
     99                             (format "~10,,,'0@a" _asin) 
     100                             _asin))) 
     101             (if (#/^[0-9a-zA-Z]+$/ _asin) 
     102                 (format "[Amazon ~a] " _asin) 
     103                 (format "!!Error : ASIN code format error for ##(amazon asin) command \"~a\"!!" _asin))) 
     104           "!!Error : No argument ##(amazon URL) command")) 
     105      ;; timestamp 
     106      ((timestamp)   "[timestamp] ") 
     107      ;; since 
     108      ((since)       "[since] ") 
     109      ;; download link oldtype-mode.el source code 
     110      ((download-el) "[Download oldtype-mode.el now]") 
     111      (else 
     112       (format "!!Error : no such macro \"~a\"!!" command))))) 
     113 
     114 
     115(define (oldtype:sxml->plain-text sxmls) 
     116  (tree->string 
     117   (let rec 
     118       ((sxmls sxmls)) 
     119     (match sxmls 
     120            (()  '()) 
     121            (((and (name . _) sxml) . rest) ;; generic node 
     122             (let1 arg (cdr sxml) 
     123                   (cons 
     124                    (case name 
     125                      ((div) 
     126                       (let* ((param (car arg)) ;; param is assoc-list 
     127                              (lineno (assq-ref param 'lineno))) 
     128                         (rec (cdr arg)))) 
     129                      ((a) 
     130                       (let1 param (car arg) ;; param is assoc-list 
     131                             (rec (cdr arg)))) 
     132                      ((p-normal)    (rec arg)) 
     133                      ((pre-quote)   (rec arg)) 
     134                      ((pre-verb)    (rec arg)) 
     135                      ((pre-ul1)     (cons "- "     (rec arg))) 
     136                      ((pre-ul2)     (cons "-- "    (rec arg))) 
     137                      ((pre-ul3)     (cons "--- "   (rec arg))) 
     138                      ((pre-ol1)     (cons "# "     (rec arg))) 
     139                      ((pre-ol2)     (cons "## "    (rec arg))) 
     140                      ((pre-ol3)     (cons "### "   (rec arg))) 
     141                      ((h1)          (cons "[] "    (rec arg))) 
     142                      ((h2)          (cons "* "     (rec arg))) 
     143                      ((h3)          (cons "** "    (rec arg))) 
     144                      ((h4)          (cons "*** "   (rec arg))) 
     145                      ((h5)          (cons "**** "  (rec arg))) 
     146                      ((h6)          (cons "***** " (rec arg))) 
     147                      ((wiki-macro)  (oldtype:wiki-macro->plain arg)) 
     148                      ((wiki-name)   (oldtype:wikiname->plain (car arg))) 
     149                      ((hr)          (list "----\n")) 
     150                      ((@)           '()) 
     151                      ((@@)          '()) 
     152                      (else 
     153                       (format "!!Error : no such tag \"~a\"!!" name))) 
     154                    (rec rest)))) 
     155            ((other . rest) 
     156             (cons other (rec rest))))))) 
     157 
     158 
    67159 
    68160;; utility : strips wiki markup and returns a plaintext line. 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/oldtype.kahua

    r13943 r14312  
    9999              (tr/ 
    100100               (td/ "lineno") 
    101                (td/ lineno)) 
    102               (tr/ 
    103                (td/ "EmacsLisp") 
    104                (td/ (format ";; (oldtype-openfile \"~a\" ~a)" (name-of oldtype-page) lineno)))) 
     101               (td/ lineno))) 
    105102             (h2/ "Information of This Page.") 
    106103             (pre/ 
     
    114111                (get-text-list oldtype-page))))) 
    115112            "" 
     113            lineno 
    116114            )))) 
    117115   nodeset)) 
     
    275273 
    276274 
    277 (define (standard-page wikiname barcode nodes first-line) 
     275(define (standard-page wikiname barcode nodes first-line . rest-arg) 
    278276  (html/ (head/ (title/ (string-append wikiname " / " first-line)) 
    279277                (link/ (@/ (rel "stylesheet") (type "text/css") 
     
    292290                (if (eq? 'w3m (oldtype-user-agent)) 
    293291                    (div/ 
    294                      (format " ;; (oldtype-openfile \"~a\" 1)" wikiname) 
     292                     (format " ;; (oldtype-openfile \"~a\" ~d)" wikiname (if (not (null? rest-arg)) 
     293                                                                             (car rest-arg) 
     294                                                                             1)) 
    295295                     (br/)) 
    296296                    (text/ "")) 
     
    315315                (span/ (@/ (class "forw3m")))) 
    316316          (br/) 
    317           (h1/ 
    318            wikiname 
    319            " " 
    320            (a/ (@/ (href (oldtype:gen-rss-path wikiname)) 
    321                    (class "help") 
    322                    (title "This is RSS feed URL")) 
    323                (oldtype:icon-image 'rss)) 
    324            (oldtype:hatena-bookmarks wikiname)) 
     317          (h1/ wikiname 
     318               " " 
     319               (a/ (@/ (href (oldtype:gen-rss-path wikiname)) 
     320                       (class "help") 
     321                       (title "This is RSS feed URL")) 
     322                   (oldtype:icon-image 'rss)) 
     323               (a/ (@/ (href (oldtype:gen-plain-path wikiname)) 
     324                       (class "help") 
     325                       (title "PLAIN TEXT")) 
     326                   (oldtype:icon-image 'plain)) 
     327               (oldtype:hatena-bookmarks wikiname)) 
    325328          barcode 
    326329          (hr/) 
     
    341344            (#/^[ ]*$/ x) 
    342345            (#/^[ ]*##/ x)))) 
    343     (get-text-list oldtype-page)))) 
     346    (get-plain-list oldtype-page)))) 
    344347 
    345348 
     
    367370  (let ((wikiname (or wikiname "index"))) 
    368371    (show-page/page wikiname))) 
     372 
     373 
     374(define-entry (show-plain wikiname) 
     375  (let* ((wikiname (or wikiname "index")) 
     376         (oldtype-page (oldtype:load-page (kahua-site-root) wikiname))) 
     377    (html/ 
     378     (head/ 
     379      (title/ (string-append wikiname))) 
     380     (body/ 
     381      (pre/ 
     382       (string-join 
     383        (get-plain-list oldtype-page) 
     384        "\n")))))) 
    369385 
    370386 
     
    400416                (item/ 
    401417                 (title/            (string-append (name-of e) "::" (oldtype-first-line e))) 
    402                  (description/      (oldtype-first-line e)) 
     418                 (description/      (string-join (get-plain-list e) "<br>")) 
    403419                 (link/             (string-append base-url "show-page/" (uri-encode-string (name-of e)) 
    404420                                                   (if (< 1 lineno) 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/page.scm

    r13637 r14312  
    5757          get-text 
    5858          get-text-list 
     59          get-plain-list 
    5960          get-rss-entry-pages 
    6061          )) 
     
    7475   (timeline    :accessor timeline-of    :init-keyword :timeline 
    7576                :init-value '()) 
     77   ;; vector of text in page 
     78   (plain       :accessor plain-of       :init-keyword :plain 
     79                :init-value '()) 
    7680   )) 
    7781 
     
    8488        (oldtype:sxml->internal 
    8589         (oldtype-parse wiki-port))) 
     90  (set! (plain-of self) 
     91        (list->vector 
     92         (string-split  
     93          (oldtype:sxml->plain-text (sxml-of self)) 
     94          #\newline))) 
    8695  self) 
    8796 
     
    91100    (name     . ,(name-of     self)) 
    92101    (sxml     . ,(sxml-of     self)) 
    93     (timeline . ,(serialize (timeline-of self))))) 
    94  
     102    (timeline . ,(serialize (timeline-of self))) 
     103    (plain    . ,(vector->list (plain-of self))))) 
     104                   
    95105 
    96106(define-method deserialize ((dummy <oldtype-page>) internal-data) 
     
    98108    :name      (assq-ref internal-data 'name) 
    99109    :sxml      (assq-ref internal-data 'sxml) 
    100     :timeline  (deserialize (make <oldtype-timeline>) (assq-ref internal-data 'timeline)))) 
    101    
     110    :timeline  (deserialize (make <oldtype-timeline>) (assq-ref internal-data 'timeline)) 
     111    :plain     (list->vector (assq-ref internal-data 'plain)))) 
     112 
    102113 
    103114(define-method get-revision ((self <oldtype-page>) lineno) 
     
    127138(define-method get-text-list ((self <oldtype-page>)) 
    128139  (vector->list (text-of (timeline-of self)))) 
     140 
     141(define-method get-plain-list ((self <oldtype-page>)) 
     142  (vector->list (plain-of self))) 
    129143 
    130144 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/parse.scm

    r7811 r14312  
    181181              ((string=? "----" line)            '(hr)) 
    182182              ((string-prefix? "!" line)         `(open-single-verb . ,line)) 
    183               ((string=? "{{{" line)             '(open-verb)) 
    184               ((string=? "<<<" line)             '(open-quote)) 
    185               ((and (string=? ">>>" line) 
    186                     (memq 'blockquote ctx))      '(close-quote)) 
    187183              ((string-prefix? " " line)         `(pre . ,line)) 
    188184              ((rxmatch #/^(\*{1,}) / line)      => (cut cons 'heading <>)) 
     
    212208      (case (token-type tok) 
    213209        ((eof)  (reverse! seed)) 
    214         ((null) (block (next-token ctx) ctx seed)) 
     210        ((null) (block (next-token ctx) ctx (cons `(div (@@ (lineno ,line-no)) (p-normal " \n")) seed))) 
    215211        ((hr)   (block (next-token ctx) ctx (cons `(div (@@ (lineno ,line-no)) (hr)) seed))) 
    216212        ((open-single-verb) 
     
    243239                (pre-verb  
    244240                 ,@(expand-tab  
    245                     (string-drop (token-value tok) 1)))))) 
     241                    (string-drop (token-value tok) 1)) 
     242                 "\n")))) 
    246243 
    247244  ;; Verbatim 
     
    444441      (cond ((eof-object? line) 
    445442             (if (null? r) line (string-concatenate-reverse r))) 
    446             (verbatim 
    447              (when (string=? "}}}" line) (set! verbatim #f)) 
    448              line) 
    449             ((string-prefix? ";;" line) 
    450              (rec (getline) r)) 
    451             ((string=? "{{{" line) 
    452              (if (null? r) 
    453                (begin (set! verbatim #t) line) 
    454                (begin (ungetline line) (string-concatenate-reverse r)))) 
    455             ((string-prefix? "~" line) 
    456              (rec (getline) (cons (string-drop line 1) r))) 
    457443            (else 
    458444             (if (null? r) 
    459                (rec (getline) (cons line r)) 
    460                (begin (ungetline line) (string-concatenate-reverse r)))) 
     445                 (rec (getline) (cons line r)) 
     446                 (begin (ungetline line) (string-concatenate-reverse r)))) 
    461447            ))) 
    462448  ) 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/staticimg/preview_list.html

    r10015 r14312  
    88<img src="icon.person.png"/> 
    99<img src="dot16.png" />  
    10 img src="dot18.png" />  
     10<img src="dot18.png" />  
    1111<img src="dot20.png" />  
    1212<img src="icon.accept.png" />  
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/util.kahua

    r13637 r14312  
    226226    ((rss) 
    227227     (img/ (@/ (src (string-append (oldtype:static-image-path) "icon.rss.png")) 
    228                (alt "RSS") (class "icon")))) 
     228               (alt "RSS")))) 
     229    ((plain) 
     230     (img/ (@/ (src (string-append (oldtype:static-image-path) "icon.article_text.png")) 
     231               (alt "PLAIN")))) 
    229232    (else 
    230233     `(p/ ,(format "!!Error : no such icon-image \"~a\"!!" sym))))) 
     
    347350   "/get-rss/" wikiname)) 
    348351 
     352(define (oldtype:gen-plain-path wikiname) 
     353  (string-append 
     354   "/show-plain/" wikiname)) 
     355 
    349356(define (oldtype:expand-wiki-name name) 
    350357  (let1 url-name 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/util.scm

    r13637 r14312  
    11;;; 
    2 ;;; oldtype/format.scm - format wiki pages (backward compatibility module) 
    3 ;;; 
    4 ;;;  Copyright (c) 2003-2006 Shiro Kawai, All rights reserved. 
     2;;; oldtype/util.scm - util for OldType 
     3;;; 
     4;;;  Copyright (c) 2008 Kiyoka Nishiyama, All rights reserved. 
    55;;; 
    66;;;  Permission is hereby granted, free of charge, to any person 
     
    2525;;; 
    2626;;; $Id: util.scm 199 2008-01-13 11:16:43Z kiyoka $ 
    27 ;;; 
    28 ;;; Modified by kiyoka to implement OldType wiki formatter. 
    29 ;;; I renamed namespace of wiliki- 'oldtype-' to avoid collision of 
    30 ;;; installation. 
    3127;;; 
    3228 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/version.kahua

    r14129 r14312  
    77 
    88;;--------------------------------------------------------- 
    9 (define *oldtype-version* "0.2.6") 
     9(define *oldtype-version* "0.2.7") 
  • lang/gauche/oldtype/branches/stable/command/blog

    r13289 r14312  
    6565                    (cons 
    6666                     ot-blog-header 
    67                      entries)))) 
     67                     (reverse entries))))) 
    6868   (oldtype:grouping-blog-entries 
    6969    (ot-blog-entrylist))) 
    7070 
    7171  (exit 0)) 
    72  
  • lang/gauche/oldtype/branches/stable/src

    • Property svn:ignore
      •  

        old new  
        1313Entry2.sexp 
        1414Test.ann.txt 
         15Sample1.sxml 
         16Sample1.txt 
         17Sample2.sxml 
         18Sample2.txt 
  • lang/gauche/oldtype/branches/stable/src/Makefile

    r13637 r14312  
    33OTSAMPLE='../edit/Test.ot' 
    44 
    5 all: log.txt  Test.ann.txt  Entry1.ann.txt  Entry2.ann.txt  
     5all: log.txt  Test.ann.txt  Entry1.ann.txt  Entry2.ann.txt 
    66        gosh -I ../Kahua/oldtype ./oldtype_to internal  ../edit/Test.ot    log.txt Test.ann.txt    > Test.sexp 
    77        gosh -I ../Kahua/oldtype ./oldtype_to internal  ../edit/Entry1.ot  log.txt Entry1.ann.txt  > Entry1.sexp 
    88        gosh -I ../Kahua/oldtype ./oldtype_to internal  ../edit/Entry2.ot  log.txt Entry2.ann.txt  > Entry2.sexp 
    9         gosh -I ../Kahua/oldtype ./oldtype_to sxml      ${OTSAMPLE} > out.sxml 
    10         gosh -I ../Kahua/oldtype ./oldtype_to plain     ${OTSAMPLE} > out.txt 
     9        gosh -I ../Kahua/oldtype ./oldtype_to sxml      ../edit/Sample1.ot > Sample1.sxml 
     10        gosh -I ../Kahua/oldtype ./oldtype_to sxml      ../edit/Sample2.ot > Sample2.sxml 
     11        gosh -I ../Kahua/oldtype ./oldtype_to plain     ../edit/Sample1.ot > Sample1.txt 
     12        gosh -I ../Kahua/oldtype ./oldtype_to plain     ../edit/Sample2.ot > Sample2.txt 
    1113 
    1214test: log.txt Test.ann.txt 
  • lang/gauche/oldtype/branches/stable/src/oldtype_to

    r13289 r14312  
    158158      ('plain 
    159159       (let* ( 
    160               (tree           (oldtype:format-line-plainly converted-str))) 
    161          (for-each 
    162           print 
    163           tree))) 
     160              (sxml           (oldtype-parse input-port)) 
     161              (sexp           (oldtype:sxml->plain-text sxml))) 
     162         (print 
     163          (tree->string 
     164           sexp)))) 
    164165      (else 
    165166       (cerr (format "Unsupported type. [~a]" (symbol->string type))) 
  • lang/gauche/oldtype/branches/stable/src/test.scm

    r13637 r14312  
    1414(use oldtype.core) 
    1515(use gauche.test)                                                      
     16(use util.list) 
    1617 
    1718 
     
    3435          (open-input-string converted-str))) 
    3536    (let ((oldtype-page #f) 
    36           (oldtype-timeline #f)) 
     37          (oldtype-timeline #f) 
     38          (loaded        (with-input-from-file "Test.sexp.master" 
     39                           (lambda () 
     40                             (read))))) 
    3741 
    3842      (test-start "serialize,deserialize") 
     
    4448                   (deserialized   (deserialize (make <oldtype-timeline>) serialized))) 
    4549              (test "serialized == DATA        " 
    46                     '((name . "Test") (revision . 13317) 
    47                       (log 
    48                        (13334 (revision . 13334) (committer . kiyoka) (utc . 1212756234) (rank . 5)) 
    49                        (13317 (revision . 13317) (committer . kiyoka) (utc . 1212711085) (rank . 3)) 
    50                        (13306 (revision . 13306) (committer . kiyoka) (utc . 1212676363) (rank . 5)) 
    51                        (13304 (revision . 13304) (committer . kiyoka) (utc . 1212675369) (rank . 4)) 
    52                        (13242 (revision . 13242) (committer . kiyoka) (utc . 1212594143) (rank . 5)) 
    53                        (13237 (revision . 13237) (committer . kiyoka) (utc . 1212592559) (rank . 5)) 
    54                        (13233 (revision . 13233) (committer . kiyoka) (utc . 1212591037) (rank . 5)) 
    55                        (13224 (revision . 13224) (committer . kiyoka) (utc . 1212584569) (rank . 5)) 
    56                        (13223 (revision . 13223) (committer . kiyoka) (utc . 1212584402) (rank . 5)) 
    57                        (13080 (revision . 13080) (committer . kiyoka) (utc . 1212407693) (rank . 5)) 
    58                        (13032 (revision . 13032) (committer . kiyoka) (utc . 1212334026) (rank . 5)) 
    59                        (13023 (revision . 13023) (committer . kiyoka) (utc . 1212331805) (rank . 5)) 
    60                        (12471 (revision . 12471) (committer . kiyoka) (utc . 1211813046) (rank . 5)) 
    61                        (12460 (revision . 12460) (committer . kiyoka) (utc . 1211806608) (rank . 5)) 
    62                        (12356 (revision . 12356) (committer . kiyoka) (utc . 1211721110) (rank . 5)) 
    63                        (12293 (revision . 12293) (committer . kiyoka) (utc . 1211642182) (rank . 5)) 
    64                        (12266 (revision . 12266) (committer . kiyoka) (utc . 1211601688) (rank . 5)) 
    65                        (11607 (revision . 11607) (committer . kiyoka) (utc . 1210777124) (rank . 5)) 
    66                        (11606 (revision . 11606) (committer . kiyoka) (utc . 1210777098) (rank . 5)) 
    67                        (11603 (revision . 11603) (committer . kiyoka) (utc . 1210774733) (rank . 5)) 
    68                        (11245 (revision . 11245) (committer . kiyoka) (utc . 1210161037) (rank . 5)) 
    69                        (10961 (revision . 10961) (committer . kiyoka) (utc . 1209740697) (rank . 5)) 
    70                        (10957 (revision . 10957) (committer . kiyoka) (utc . 1209737179) (rank . 5)) 
    71                        (10149 (revision . 10149) (committer . kiyoka) (utc . 1208864713) (rank . 5)) 
    72                        (10146 (revision . 10146) (committer . kiyoka) (utc . 1208862687) (rank . 5)) 
    73                        (10084 (revision . 10084) (committer . kiyoka) (utc . 1208784928) (rank . 5)) 
    74                        (10014 (revision . 10014) (committer . kiyoka) (utc . 1208695655) (rank . 5)) 
    75                        (9977 (revision . 9977) (committer . kiyoka) (utc . 1208667401) (rank . 5)) 
    76                        (9976 (revision . 9976) (committer . kiyoka) (utc . 1208667383) (rank . 5)) 
    77                        (9952 (revision . 9952) (committer . kiyoka) (utc . 1208652380) (rank . 5)) 
    78                        (9948 (revision . 9948) (committer . kiyoka) (utc . 1208650871) (rank . 5)) 
    79                        (9924 (revision . 9924) (committer . kiyoka) (utc . 1208619757) (rank . 5)) 
    80                        (9903 (revision . 9903) (committer . kiyoka) (utc . 1208606479) (rank . 5)) 
    81                        (9585 (revision . 9585) (committer . kiyoka) (utc . 1208348091) (rank . 5)) 
    82                        (9583 (revision . 9583) (committer . kiyoka) (utc . 1208346288) (rank . 5)) 
    83                        (8962 (revision . 8962) (committer . kiyoka) (utc . 1207444336) (rank . 5)) 
    84                        (8676 (revision . 8676) (committer . kiyoka) (utc . 1207141582) (rank . 5)) 
    85                        (8607 (revision . 8607) (committer . kiyoka) (utc . 1207051192) (rank . 5)) 
    86                        (8569 (revision . 8569) (committer . kiyoka) (utc . 1206968180) (rank . 5)) 
    87                        (8342 (revision . 8342) (committer . kiyoka) (utc . 1206360044) (rank . 5)) 
    88                        (8263 (revision . 8263) (committer . kiyoka) (utc . 1206115042) (rank . 5)) 
    89                        (8254 (revision . 8254) (committer . kiyoka) (utc . 1206097354) (rank . 5)) 
    90                        (8212 (revision . 8212) (committer . kiyoka) (utc . 1206027766) (rank . 5)) 
    91                        (8211 (revision . 8211) (committer . kiyoka) (utc . 1206027177) (rank . 5)) 
    92                        (8208 (revision . 8208) (committer . kiyoka) (utc . 1206016615) (rank . 5)) 
    93                        (8205 (revision . 8205) (committer . kiyoka) (utc . 1206012635) (rank . 5)) 
    94                        (8091 (revision . 8091) (committer . kiyoka) (utc . 1205842976) (rank . 5)) 
    95                        (7924 (revision . 7924) (committer . kiyoka) (utc . 1205421544) (rank . 5)) 
    96                        (7920 (revision . 7920) (committer . kiyoka) (utc . 1205419584) (rank . 5)) 
    97                        (7919 (revision . 7919) (committer . kiyoka) (utc . 1205418381) (rank . 5)) 
    98                        (7870 (revision . 7870) (committer . kiyoka) (utc . 1205336331) (rank . 5)) 
    99                        (7811 (revision . 7811) (committer . kiyoka) (utc . 1205239814) (rank . 5))) 
    100                       (annotation 
    101                        ((revision . 8208) (committer . kiyoka) (utc . 1206016615) (rank . 5)) 
    102                        ((revision . 13304) (committer . kiyoka) (utc . 1212675369) (rank . 4)) 
    103                        ((revision . 13317) (committer . kiyoka) (utc . 1212711085) (rank . 3)) 
    104                        ((revision . 13317) (committer . kiyoka) (utc . 1212711085) (rank . 3)) 
    105                        ((revision . 13317) (committer . kiyoka) (utc . 1212711085) (rank . 3)) 
    106                        ((revision . 13317) (committer . kiyoka) (utc . 1212711085) (rank . 3))) 
    107                       (text "* UnitTest用のサンプルファイル" "----" "*** start" "*** [[Entry1]]" "*** [[Entry2]]" "*** end") 
    108                       (distribution 
    109                        (8208 1) 
    110                        (13317 6 5 4 3) 
    111                        (13304 2))) 
     50                    (assq-ref loaded 'timeline) 
    11251                    (lambda () (serialize deserialized))) 
    11352              (test "serialized == deserialized" serialized (lambda () (serialize deserialized))))) 
     
    11756      (let1 serialized     (serialize oldtype-page) 
    11857            (test "serialized == DATA        " 
    119                   '((name . "Test") 
    120                     (sxml 
    121                      (div 
    122                       ((lineno . 1)) 
    123                       (h2 "UnitTest用のサンプルファイル" "\n")) 
    124                      (div 
    125                       ((lineno . 2)) 
    126                       (hr)) 
    127                      (div 
    128                       ((lineno . 3)) 
    129                       (h4 "start" "\n")) 
    130                      (div 
    131                       ((lineno . 4)) 
    132                       (h4 
    133                        (wiki-name "Entry1") "\n")) 
    134                      (div 
    135                       ((lineno . 5)) 
    136                       (h4 
    137                        (wiki-name "Entry2") "\n")) 
    138                      (div 
    139                       ((lineno . 6)) 
    140                       (h4 "end" "\n"))) 
    141                     (timeline (name . "Test") (revision . 13317) 
    142                               (log 
    143                                (13334 (revision . 13334) (committer . kiyoka) (utc . 1212756234) (rank . 5)) 
    144                                (13317 (revision . 13317) (committer . kiyoka) (utc . 1212711085) (rank . 3)) 
    145                                (13306 (revision . 13306) (committer . kiyoka) (utc . 1212676363) (rank . 5)) 
    146                                (13304 (revision . 13304) (committer . kiyoka) (utc . 1212675369) (rank . 4)) 
    147                                (13242 (revision . 13242) (committer . kiyoka) (utc . 1212594143) (rank . 5)) 
    148                                (13237 (revision . 13237) (committer . kiyoka) (utc . 1212592559) (rank . 5)) 
    149                                (13233 (revision . 13233) (committer . kiyoka) (utc . 1212591037) (rank . 5)) 
    150                                (13224 (revision . 13224) (committer . kiyoka) (utc . 1212584569) (rank . 5)) 
    151                                (13223 (revision . 13223) (committer . kiyoka) (utc . 1212584402) (rank . 5)) 
    152                                (13080 (revision . 13080) (committer . kiyoka) (utc . 1212407693) (rank . 5)) 
    153                                (13032 (revision . 13032) (committer . kiyoka) (utc . 1212334026) (rank . 5)) 
    154                                (13023 (revision . 13023) (committer . kiyoka) (utc . 1212331805) (rank . 5)) 
    155                                (12471 (revision . 12471) (committer . kiyoka) (utc . 1211813046) (rank . 5)) 
    156                                (12460 (revision . 12460) (committer . kiyoka) (utc . 1211806608) (rank . 5)) 
    157                                (12356 (revision . 12356) (committer . kiyoka) (utc . 1211721110) (rank . 5)) 
    158                                (12293 (revision . 12293) (committer . kiyoka) (utc . 1211642182) (rank . 5)) 
    159                                (12266 (revision . 12266) (committer . kiyoka) (utc . 1211601688) (rank . 5)) 
    160                                (11607 (revision . 11607) (committer . kiyoka) (utc . 1210777124) (rank . 5)) 
    161                                (11606 (revision . 11606) (committer . kiyoka) (utc . 1210777098) (rank . 5)) 
    162                                (11603 (revision . 11603) (committer . kiyoka) (utc . 1210774733) (rank . 5)) 
    163                                (11245 (revision . 11245) (committer . kiyoka) (utc . 1210161037) (rank . 5)) 
    164                                (10961 (revision . 10961) (committer . kiyoka) (utc . 1209740697) (rank . 5)) 
    165                                (10957 (revision . 10957) (committer . kiyoka) (utc . 1209737179) (rank . 5)) 
    166                                (10149 (revision . 10149) (committer . kiyoka) (utc . 1208864713) (rank . 5)) 
    167                                (10146 (revision . 10146) (committer . kiyoka) (utc . 1208862687) (rank . 5)) 
    168                                (10084 (revision . 10084) (committer . kiyoka) (utc . 1208784928) (rank . 5)) 
    169                                (10014 (revision . 10014) (committer . kiyoka) (utc . 1208695655) (rank . 5)) 
    170                                (9977 (revision . 9977) (committer . kiyoka) (utc . 1208667401) (rank . 5)) 
    171                                (9976 (revision . 9976) (committer . kiyoka) (utc . 1208667383) (rank . 5)) 
    172                                (9952 (revision . 9952) (committer . kiyoka) (utc . 1208652380) (rank . 5)) 
    173                                (9948 (revision . 9948) (committer . kiyoka) (utc . 1208650871) (rank . 5)) 
    174                                (9924 (revision . 9924) (committer . kiyoka) (utc . 1208619757) (rank . 5)) 
    175                                (9903 (revision . 9903) (committer . kiyoka) (utc . 1208606479) (rank . 5)) 
    176                                (9585 (revision . 9585) (committer . kiyoka) (utc . 1208348091) (rank . 5)) 
    177                                (9583 (revision . 9583) (committer . kiyoka) (utc . 1208346288) (rank . 5)) 
    178                                (8962 (revision . 8962) (committer . kiyoka) (utc . 1207444336) (rank . 5)) 
    179                                (8676 (revision . 8676) (committer . kiyoka) (utc . 1207141582) (rank . 5)) 
    180                                (8607 (revision . 8607) (committer . kiyoka) (utc . 1207051192) (rank . 5)) 
    181                                (8569 (revision . 8569) (committer . kiyoka) (utc . 1206968180) (rank . 5)) 
    182                                (8342 (revision . 8342) (committer . kiyoka) (utc . 1206360044) (rank . 5)) 
    183                                (8263 (revision . 8263) (committer . kiyoka) (utc . 1206115042) (rank . 5)) 
    184                                (8254 (revision . 8254) (committer . kiyoka) (utc . 1206097354) (rank . 5)) 
    185                                (8212 (revision . 8212) (committer . kiyoka) (utc . 1206027766) (rank . 5)) 
    186                                (8211 (revision . 8211) (committer . kiyoka) (utc . 1206027177) (rank . 5)) 
    187                                (8208 (revision . 8208) (committer . kiyoka) (utc . 1206016615) (rank . 5)) 
    188                                (8205 (revision . 8205) (committer . kiyoka) (utc . 1206012635) (rank . 5)) 
    189                                (8091 (revision . 8091) (committer . kiyoka) (utc . 1205842976) (rank . 5)) 
    190                                (7924 (revision . 7924) (committer . kiyoka) (utc . 1205421544) (rank . 5)) 
    191                                (7920 (revision . 7920) (committer . kiyoka) (utc . 1205419584) (rank . 5)) 
    192                                (7919 (revision . 7919) (committer . kiyoka) (utc . 1205418381) (rank . 5)) 
    193                                (7870 (revision . 7870) (committer . kiyoka) (utc . 1205336331) (rank . 5)) 
    194                                (7811 (revision . 7811) (committer . kiyoka) (utc . 1205239814) (rank . 5))) 
    195                               (annotation 
    196                                ((revision . 8208) (committer . kiyoka) (utc . 1206016615) (rank . 5)) 
    197                                ((revision . 13304) (committer . kiyoka) (utc . 1212675369) (rank . 4)) 
    198                                ((revision . 13317) (committer . kiyoka) (utc . 1212711085) (rank . 3)) 
    199                                ((revision . 13317) (committer . kiyoka) (utc . 1212711085) (rank . 3)) 
    200                                ((revision . 13317) (committer . kiyoka) (utc . 1212711085) (rank . 3)) 
    201                                ((revision . 13317) (committer . kiyoka) (utc . 1212711085) (rank . 3))) 
    202                               (text "* UnitTest用のサンプルファイル" "----" "*** start" "*** [[Entry1]]" "*** [[Entry2]]" "*** end") 
    203                               (distribution 
    204                                (8208 1) 
    205                                (13317 6 5 4 3) 
    206                                (13304 2)))) 
     58                  loaded 
    20759                  (lambda () (serialize oldtype-page))) 
    20860 
     
    22577 
    22678      (test "ago string of lineno 1 <oldtype-timeline>" 
    227             "  (2 months ago)"  
     79            "  (3 months ago)"  
    22880            (lambda () 
    22981              (get-ago (log-by-lineno oldtype-timeline 1)))) 
    23082      (test "ago string of lineno 1 <oldtype-page>" 
    231             "  (2 months ago)" 
     83            "  (3 months ago)" 
    23284            (lambda () 
    23385              (get-ago oldtype-page 1))) 
     
    253105      (test "date,ago,rank,committer of lineno 1 <oldtype-page>" 
    254106            '((date  . "2008-03-20 21:36 (+0900)") 
    255               (ago   . "  (2 months ago)") 
     107              (ago   . "  (3 months ago)") 
    256108              (rank  . 5) 
    257109              (committer . "kiyoka"))