Changeset 8262 for lang/gauche
- Timestamp:
- 03/22/08 00:45:00 (5 years ago)
- Location:
- lang/gauche/oldtype/branches/stable
- Files:
-
- 10 modified
-
Kahua/oldtype/oldtype/format.scm (modified) (1 diff)
-
Kahua/oldtype/oldtype/oldtype-mode.el (modified) (5 diffs)
-
Kahua/oldtype/oldtype/oldtype.kahua (modified) (3 diffs)
-
Kahua/oldtype/oldtype/util.kahua (modified) (1 diff)
-
Kahua/oldtype/oldtype/util.scm (modified) (2 diffs)
-
Kahua/oldtype/oldtype/version.kahua (modified) (1 diff)
-
Makefile (modified) (1 diff)
-
bin/ot_RecentChanges (modified) (2 diffs)
-
edit/Test.ot (modified) (1 diff)
-
src/Makefile (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/format.scm
r7811 r8262 24 24 ;;; IN THE SOFTWARE. 25 25 ;;; 26 ;;; $Id: format.scm 2 90 2008-03-01 01:55:39Z kiyoka $26 ;;; $Id: format.scm 289 2008-03-01 01:50:33Z kiyoka $ 27 27 ;;; 28 28 ;;; Modified by kiyoka to implement OldType wiki formatter. -
lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/oldtype-mode.el
r7811 r8262 5 5 ;; Copyright (C) 2007 Kiyoka Nishiyama 6 6 ;; 7 ;; $Id: oldtype-mode.el 2 89 2008-03-01 01:50:33Z kiyoka $7 ;; $Id: oldtype-mode.el 242 2008-02-02 09:58:22Z kiyoka $ 8 8 ;; 9 9 ;; This file is part of oldtype-mode … … 29 29 ;; 30 30 ;; 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 ;; 31 35 ;; [0.0.3] 32 ;; 1. Added ##(amazon ASIN) command.36 ;; 1. Supported URL to ##(amazon ASIN) command conversion feature. ( C-c C-c key ) 33 37 ;; 34 38 ;; [0.0.2] 35 39 ;; 1. Added ##(todo),##(undo) command. 36 40 ;; 2. Added oldtype-openfile( wikiname ) function. 37 41 ;; 38 42 ;; [0.0.1] 39 43 ;; 1. first release 40 44 ;; 41 45 ;; 42 (defconst oldtype-version "0.0. 3")46 (defconst oldtype-version "0.0.4") 43 47 44 48 (defconst oldtype-wikiname-face 'oldtype-wikiname-face) … … 305 309 ;; 306 310 (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 307 324 (defun code-linep (pos) 308 325 (save-excursion … … 329 346 (_image-pattern 330 347 "\\(##[(]img[ ]+\\)\\([^)]+\\)\\([)]\\)") 348 (_various-webservice-pattern 349 "\\(##[(]\\(amazon\\|youtube\\)[ ]+\\)\\([^)]+\\)\\([)]\\)") 331 350 (_simple-command-pattern 332 351 "\\(##[(]\\(todo\\|done\\)[)]\\)")) … … 362 381 t) 363 382 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 364 408 ;; ##(todo), ##(done) ... 365 409 (,_simple-command-pattern -
lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/oldtype.kahua
r7811 r8262 11 11 (use oldtype.util) 12 12 (use oldtype.kahualib) 13 (use srfi-1) 13 14 (load "oldtype/version.kahua") 14 15 (load "oldtype/util.kahua") … … 152 153 (if (oldtype:is-editable wikiname) 153 154 (div/ (@/ (style "padding-left: 5em;") 154 (on Click (format "otEditStart( ~a );" lineno)))155 (onDblClick (format "otEditStart( ~a );" lineno))) 155 156 _rest) 156 157 (div/ (@/ (style "padding-left: 5em;")) … … 269 270 (oldtype:google-searchbox))) 270 271 (br/) 271 (h1/ wikiname )272 (h1/ wikiname " " (oldtype:hatena-bookmarks wikiname)) 272 273 barcode 273 274 (hr/) -
lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/util.kahua
r7811 r8262 330 330 (file-exists? 331 331 (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 108 108 ;; "2007-09-25T12:54:09.955196Z" 109 109 ;; 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)) 111 111 (define (oldtype:date-string->date-alist str) 112 112 (let* ((splitted (map string->number (string-split str #/[TZ.\-:]/))) … … 119 119 (second splitted) ;;month 120 120 (first splitted) ;;year 121 +9;;zone-offset121 0 ;;zone-offset 122 122 ))) 123 123 `( -
lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/version.kahua
r7811 r8262 7 7 8 8 ;;--------------------------------------------------------- 9 (define *oldtype-version* "0.1. 8")9 (define *oldtype-version* "0.1.9") -
lang/gauche/oldtype/branches/stable/Makefile
r7811 r8262 7 7 tar xfC ../stable.tar ../branches/stable 8 8 /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 1 1 #!/bin/bash 2 DISPLAY_LINES=30 2 3 3 4 . ${OT_HOME}/bin/lib.sh … … 24 25 echo "- CHANGED ${commit_date}: [[${name}]] by ([[${commit_author}]])" 25 26 fi 26 done | sort -r > ${OT_EDITHOME}/edit/!RecentChanges.ot.tmp27 done | sort -r | head -${DISPLAY_LINES} > ${OT_EDITHOME}/edit/!RecentChanges.ot.tmp 27 28 if [ -s ${OT_EDITHOME}/edit/!RecentChanges.ot.tmp ]; then 28 29 /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用のサンプルファイル 4 2 5 ** 段落6 !行頭から文章を始めると、1行1段落になります。7 !次の行です。8 行頭から文章を始めると、1行1段落になります。9 次の行です。10 11 ** 引用12 ! 行頭に1つ以上のスペースを入れると、引用になります。13 ! 次の行です。14 行頭に1つ以上のスペースを入れると、引用になります。15 次の行です。16 17 ** WikiName18 ! 表記: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.jpg31 - [[http://www.sumibi.org/|Sumibi.org]]へのリンク32 - http://www.sumibi.org/33 - http://farm2.static.flickr.com/1041/611353730_691b8e1771_m.jpg34 ** 画像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 19 19 svninfo: 20 20 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
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)