Changeset 8262 for lang/gauche

Show
Ignore:
Timestamp:
03/22/08 00:45:00 (5 years ago)
Author:
kiyoka
Message:

Released stable version. (0.1.9)

Location:
lang/gauche/oldtype/branches/stable
Files:
10 modified

Legend:

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

    r7811 r8262  
    2424;;;  IN THE SOFTWARE. 
    2525;;; 
    26 ;;; $Id: format.scm 290 2008-03-01 01:55:39Z kiyoka $ 
     26;;; $Id: format.scm 289 2008-03-01 01:50:33Z kiyoka $ 
    2727;;; 
    2828;;; Modified by kiyoka to implement OldType wiki formatter. 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/oldtype-mode.el

    r7811 r8262  
    55;;   Copyright (C) 2007 Kiyoka Nishiyama 
    66;; 
    7 ;;     $Id: oldtype-mode.el 289 2008-03-01 01:50:33Z kiyoka $ 
     7;;     $Id: oldtype-mode.el 242 2008-02-02 09:58:22Z kiyoka $ 
    88;; 
    99;; This file is part of oldtype-mode 
     
    2929;; 
    3030;; ChangeLog: 
     31;;   [0.0.4] 
     32;;     1. Added image displaying feature for ##(amazon  asincode)  command. 
     33;;     2. Added image displaying feature for ##(youtube videocode) command. 
     34;; 
    3135;;   [0.0.3] 
    32 ;;     1. Added ##(amazon ASIN) command. 
     36;;     1. Supported URL to ##(amazon ASIN) command conversion feature.  ( C-c C-c key ) 
    3337;; 
    3438;;   [0.0.2] 
    3539;;     1. Added ##(todo),##(undo) command. 
    3640;;     2. Added oldtype-openfile( wikiname ) function. 
    37  
     41;;  
    3842;;   [0.0.1] 
    3943;;     1. first release 
    4044;; 
    4145;; 
    42 (defconst oldtype-version "0.0.3") 
     46(defconst oldtype-version "0.0.4") 
    4347 
    4448(defconst oldtype-wikiname-face 'oldtype-wikiname-face) 
     
    305309;; 
    306310(defun oldtype-install-fontification () 
     311  ;; 
     312  ;; "4873113482" 
     313  ;;   => "http://images.amazon.com/images/P/4873113482.09.MZZZZZZZ_.jpg" 
     314  ;; 
     315  ;; test pattern: 
     316  ;;   (amazon-asincode-to-url "4873113482") 
     317  ;; 
     318  (defun amazon-asincode-to-url (asincode) 
     319    (format "http://images.amazon.com/images/P/%s.09.MZZZZZZZ_.jpg" asincode)) 
     320 
     321  (defun youtube-video-to-url (videocode) 
     322    (format "http://img.youtube.com/vi/%s/1.jpg" videocode)) 
     323 
    307324  (defun code-linep (pos) 
    308325    (save-excursion 
     
    329346        (_image-pattern 
    330347         "\\(##[(]img[ ]+\\)\\([^)]+\\)\\([)]\\)") 
     348        (_various-webservice-pattern 
     349         "\\(##[(]\\(amazon\\|youtube\\)[ ]+\\)\\([^)]+\\)\\([)]\\)") 
    331350        (_simple-command-pattern 
    332351         "\\(##[(]\\(todo\\|done\\)[)]\\)")) 
     
    362381             t) 
    363382 
     383            ;; ##(amazon asincode), ##(youtube asincode),  
     384            (,_various-webservice-pattern 
     385             3 
     386             (let* ((beg       (match-beginning 1)) 
     387                    (command   (match-string-no-properties 2)) 
     388                    (value     (match-string-no-properties 3)) 
     389                    (end       (match-end 4))) 
     390               (compose-region beg 
     391                               end 
     392                               oldtype-image-icon-string) 
     393               (oldtype-remove-image beg 
     394                                     end) 
     395               (oldtype-insert-image-file beg 
     396                                          end 
     397                                          `( 
     398                                            (src .  
     399                                                 ,(case (intern command) 
     400                                                    (amazon 
     401                                                     (amazon-asincode-to-url value)) 
     402                                                    (youtube 
     403                                                     (youtube-video-to-url value)) 
     404                                                    (nil 
     405                                                     "")))))) 
     406             t) 
     407             
    364408            ;; ##(todo), ##(done) ... 
    365409            (,_simple-command-pattern 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/oldtype.kahua

    r7811 r8262  
    1111(use oldtype.util) 
    1212(use oldtype.kahualib) 
     13(use srfi-1) 
    1314(load "oldtype/version.kahua") 
    1415(load "oldtype/util.kahua") 
     
    152153                                         (if (oldtype:is-editable wikiname) 
    153154                                             (div/ (@/ (style "padding-left:  5em;") 
    154                                                        (onClick (format "otEditStart( ~a );" lineno))) 
     155                                                       (onDblClick (format "otEditStart( ~a );" lineno))) 
    155156                                                   _rest) 
    156157                                             (div/ (@/ (style "padding-left:  5em;")) 
     
    269270                 (oldtype:google-searchbox))) 
    270271          (br/) 
    271           (h1/ wikiname) 
     272          (h1/ wikiname  " "  (oldtype:hatena-bookmarks wikiname)) 
    272273          barcode 
    273274          (hr/) 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/util.kahua

    r7811 r8262  
    330330  (file-exists? 
    331331   (gen-sexp-filename wikiname))) 
     332 
     333(define (oldtype:kahua-app-args) 
     334  (let1 alist 
     335        (map 
     336         (lambda (a b) 
     337           (cons a b)) 
     338         (iota (length (kahua-app-args))) 
     339         (kahua-app-args)) 
     340 
     341        (map 
     342         (lambda (key value) 
     343           (cons (string->symbol (cdr key)) 
     344                 (cdr value))) 
     345         (filter (lambda (x) (= 0 (modulo (car x) 2)))  alist) 
     346         (filter (lambda (x) (= 1 (modulo (car x) 2)))  alist)))) 
     347 
     348(define (oldtype:get-fqdn) 
     349  (assq-ref (oldtype:kahua-app-args) 'fqdn)) 
     350 
     351(define (oldtype:hatena-bookmarks wikiname) 
     352  (let1 path (if (string=? wikiname "index") 
     353                 "/" 
     354                 (oldtype:gen-page-path wikiname)) 
     355        (node-set/ 
     356         (a/ (@/ (href (string-append "http://b.hatena.ne.jp/entry/http://" (oldtype:get-fqdn) path))) 
     357             (img/ (@/ (src "http://d.hatena.ne.jp/images/b_entry_de.gif")))) 
     358         (img/ (@/ (src (string-append "http://b.hatena.ne.jp/entry/image/http://" (oldtype:get-fqdn) path))))))) 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/util.scm

    r7811 r8262  
    108108;;   "2007-09-25T12:54:09.955196Z" 
    109109;; result: 
    110 ;;   ((nanosecond . 0) (second . 9) (minute . 54) (hour . 12) (day . 25) (month . 9) (year . 2007) (zone-offset . 9)) 
     110;;   ((nanosecond . 0) (second . 9) (minute . 54) (hour . 12) (day . 25) (month . 9) (year . 2007) (zone-offset . 0)) 
    111111(define (oldtype:date-string->date-alist str) 
    112112  (let* ((splitted (map string->number (string-split str #/[TZ.\-:]/))) 
     
    119119                     (second splitted) ;;month 
    120120                     (first  splitted) ;;year 
    121                      +9 ;;zone-offset 
     121                     0 ;;zone-offset 
    122122                     ))) 
    123123    `( 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/version.kahua

    r7811 r8262  
    77 
    88;;--------------------------------------------------------- 
    9 (define *oldtype-version* "0.1.8") 
     9(define *oldtype-version* "0.1.9") 
  • lang/gauche/oldtype/branches/stable/Makefile

    r7811 r8262  
    77        tar xfC ../stable.tar ../branches/stable 
    88        /bin/rm -f ../stable.tar 
     9        cat ./config.sh | sed 's/OT_MASTER=nil/OT_MASTER=t/' | sed 's/site-unstable/site-stable/' > ../branches/stable/config.sh 
  • lang/gauche/oldtype/branches/stable/bin/ot_RecentChanges

    r7811 r8262  
    11#!/bin/bash 
     2DISPLAY_LINES=30 
    23 
    34. ${OT_HOME}/bin/lib.sh 
     
    2425      echo "- CHANGED ${commit_date}: [[${name}]] by ([[${commit_author}]])" 
    2526  fi 
    26 done | sort -r > ${OT_EDITHOME}/edit/!RecentChanges.ot.tmp 
     27done | sort -r | head -${DISPLAY_LINES} > ${OT_EDITHOME}/edit/!RecentChanges.ot.tmp 
    2728if [ -s ${OT_EDITHOME}/edit/!RecentChanges.ot.tmp ]; then 
    2829  /bin/mv -f ${OT_EDITHOME}/edit/!RecentChanges.ot.tmp ${OT_EDITHOME}/edit/!RecentChanges.ot 
  • lang/gauche/oldtype/branches/stable/edit/Test.ot

    r7811 r8262  
    1 * 行指向のWiki記法 
    2 このページはOldTypeの記法の実験を兼ねています。 
    3 どんなことが出来るかはサンプルを見てもらえれば大体わかるはずです。 
     1* UnitTest用のサンプルファイル 
    42 
    5 ** 段落 
    6 !行頭から文章を始めると、1行1段落になります。 
    7 !次の行です。 
    8 行頭から文章を始めると、1行1段落になります。 
    9 次の行です。 
    10  
    11 ** 引用 
    12 ! 行頭に1つ以上のスペースを入れると、引用になります。 
    13 ! 次の行です。 
    14  行頭に1つ以上のスペースを入れると、引用になります。 
    15  次の行です。 
    16  
    17 ** WikiName 
    18 ! 表記: 
    19 !   [[Test:FormatSample]] 
    20 !   [[FileDoesNotExist]] 
    21 - [[Test:フォーマットサンプル]] 
    22 箇条書きの下位レベルの文章 
    23 - [[ThisNameDoesNotExist]] 
    24  
    25  
    26 ** 外部リンク 
    27 ! 表記: 
    28 !   [[http://www.sumibi.org/|Sumibi.org]] 
    29 !   http://www.sumibi.org/ 
    30 !   http://farm2.static.flickr.com/1041/611353730_691b8e1771_m.jpg 
    31 - [[http://www.sumibi.org/|Sumibi.org]]へのリンク 
    32 - http://www.sumibi.org/ 
    33 - http://farm2.static.flickr.com/1041/611353730_691b8e1771_m.jpg 
    34 ** 画像 
    35 ! 表記: 
    36 !   ##(img ../img/sasami_face48.png) 
    37 - ささみのアイコン 
    38   ##(img ../img/sasami_face48.png) 
    39 ! 表記: 
    40 !   ##(img http://farm2.static.flickr.com/1041/611353730_691b8e1771_m.jpg) 
    41 - 途中で寝ちゃいました... 
    42   ##(img http://farm2.static.flickr.com/1041/611353730_691b8e1771_m.jpg) 
    43  
    44 ** 見出し 
    45  
    46 ! 表記: 
    47 !* 1番目 
    48 !** 2番目 
    49 !*** 3番目 
    50 * 1番目 
    51 ** 2番目 
    52 *** 3番目 
    53  
    54  
    55 ** 箇条書き 
    56 ! 表記: 
    57 !- 1番目 
    58 !-- 2番目 
    59 !--- 3番目 
    60 - 1番目 
    61 -- 2番目 
    62 --- 3番目 
    63  
    64 ! 表記: 
    65 !# 1番目 
    66 !## 2番目 
    67 !### 3番目 
    68 # 1番目 
    69 ## 2番目 
    70 ### 3番目 
    71  
    72 ! 表記: 
    73 !---- 
    74 ---- 
    75  
  • lang/gauche/oldtype/branches/stable/src/Makefile

    r7811 r8262  
    1919svninfo: 
    2020        svn --xml info ${OTSAMPLE} > info.xml 
    21         ./oldtype_svninfo shell < info.xml 
    22  
    23 t: 
    24         ./oldtype_svninfo shell < /tmp/t.xml 
     21        gosh -I ../Kahua/oldtype ./oldtype_svninfo shell < info.xml