Changeset 14934 for lang/gauche

Show
Ignore:
Timestamp:
06/30/08 23:42:59 (5 months ago)
Author:
kiyoka
Message:

Released 0.2.9

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

Legend:

Unmodified
Added
Removed
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/oldtype-mode.el

    r13943 r14934  
    2929;; 
    3030;; ChangeLog: 
     31;;   [0.0.6] 
     32;;     1. Improved URL to [URL|TITLE] conversion feature.  ( C-c C-c key ) 
     33;;        oldtype-mode.el fetches remote title page and insert TITLE. 
     34;; 
    3135;;   [0.0.5] 
    3236;;     1. Fixed bug: [return] key breaks japanese input method UI. 
     
    598602    (if (not found) 
    599603        (newline)))) 
     604 
     605 
     606;; 
     607;; [fetch command] 
     608;;   w3m -no-graph -halfdump -o ext_halfdump=1 -o strict_iso2022=0 -o fix_width_conv=1 URL 
     609;;       | awk '-F<' '/title_alt/ { print $2; }' | tail -1 | awk '-F"' '{ print $2; }' 
     610;; 
     611(defun oldtype-fetch-html-title (url) 
     612  (cond  
     613   ((string-match "http://" url) 
     614    (with-temp-buffer 
     615      (shell-command  
     616       (concat 
     617        (format "w3m -no-graph -halfdump -o ext_halfdump=1 -o strict_iso2022=0 -o fix_width_conv=1 \'%s\' |" url) 
     618        "awk \'-F\<\' \'/title_alt/ { print $2; }\' |" 
     619        "tail -1 |" 
     620        "awk \'-F\"\' \'{ printf(\"%s\", $2); }\'") 
     621       (current-buffer)) 
     622      (replace-string "[" "<" nil (point-min) (point-max)) 
     623      (replace-string "]" ">" nil (point-min) (point-max)) 
     624      (buffer-substring-no-properties (point-min) (point-max)))) 
     625   (t 
     626    "No Title"))) 
     627 
    600628 
    601629(defun oldtype-mode-hookfunc () 
     
    673701          (let* ((asin  (match-string 2)) 
    674702                 (url   (match-string 0)) 
    675                  (title (if (boundp 'w3m-version) 
    676                             (or (w3m-arrived-title url) 
    677                                 "NoTitle") 
    678                           "NoTitle"))) 
    679             (delete-region (match-beginning 1) (match-end 3)) 
    680             (goto-char (match-beginning 1)) 
     703                 (s     (match-beginning 1)) 
     704                 (e     (match-end 3)) 
     705                 (title (oldtype-fetch-html-title url))) 
     706            (delete-region s e) 
     707            (goto-char s) 
    681708            (insert (format "##(amazon %s)  %s" asin title)))) 
    682709         ;; http://www.youtube.com/watch ...  youtube-command 
     
    685712          (let* ((video (match-string 2)) 
    686713                 (url   (match-string 0)) 
    687                  (title (if (boundp 'w3m-version) 
    688                             (or (w3m-arrived-title url) 
    689                                 "NoTitle") 
    690                           "NoTitle"))) 
    691             (delete-region (match-beginning 1) (match-end 3)) 
    692             (goto-char (match-beginning 1)) 
     714                 (s     (match-beginning 1)) 
     715                 (e     (match-end 3)) 
     716                 (title (oldtype-fetch-html-title url))) 
     717            (delete-region s e) 
     718            (goto-char s) 
    693719            (insert (format "##(youtube %s)  %s" video title)))) 
    694720         ;; http://host/path/of/contents... anchor-keyword 
    695721         ((string-match      (concat "^" _url_file-pattern) str) 
    696722          (re-search-forward             _url_file-pattern (point-at-eol) t) 
    697           (if (boundp 'w3m-version) 
    698               (let* ((url   (match-string 1)) 
    699                      (title (or (w3m-arrived-title url) 
    700                                 "NoTitle"))) 
    701                 (delete-region (match-beginning 1) (match-end 1)) 
    702                 (goto-char (match-beginning 1)) 
    703                 (insert (format "[[%s|%s]]" url title))) 
    704             (message "OldType: Please install emacs-w3m."))) 
     723          (let* ((url   (match-string 1)) 
     724                 (s     (match-beginning 1)) 
     725                 (e     (match-end 1)) 
     726                 (title (oldtype-fetch-html-title url))) 
     727            (delete-region s e) 
     728            (goto-char s) 
     729            (insert (format "[[%s|%s]]" url title)))) 
    705730         (t 
    706731          (message "OldType: Please move cursor to [[URL|Name]]  or [[WikiName]] *.png  or  ##(... )  keywword.' ")))))) 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/oldtype.css

    r10965 r14934  
    201201 
    202202hr { 
     203        margin-left: 0; 
     204        text-align: left; 
    203205        border-color: #8888bb; 
    204206        border-style: dotted none none none; 
    205207        border-width: thin; 
    206         height: 0px; 
    207         width:  60em; 
     208        height: 1em; 
     209        width:  80%; 
    208210} 
    209211 
    210212div.footer { 
    211         padding-top: 0.5em; 
     213        padding-top: 1.5em; 
    212214        border-color: #8888bb; 
    213215        border-style: dotted none none none; 
     
    632634 
    633635 
    634 hr { 
    635         clear: both; 
    636 } 
    637636 
    638637 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/oldtype.kahua

    r14370 r14934  
    342342    (lambda (x) 
    343343      (not (or 
     344            (#/^----*$/ x) 
    344345            (#/^[ ]*$/ x) 
    345346            (#/^[ ]*##/ x)))) 
     
    394395                             (list index-page) 
    395396                             entry-pages)) 
    396          (build-date-utc (last 
    397                           (sort 
    398                            (map 
    399                             (lambda (e) 
    400                               (utc-of 
    401                                (get-latest-log 
    402                                 (timeline-of e)))) 
    403                             entry-pages))))) 
     397         (build-date-utc 
     398          (last 
     399           (sort 
     400            (map 
     401             (lambda (e) 
     402               (utc-of 
     403                (get-latest-log 
     404                 (timeline-of e)))) 
     405             entry-pages)))) 
     406         (build-date-utc 
     407          (- build-date-utc (* 60 5))))  ;; build date is 5 minutes ago from latest entry 
    404408    (rss/ (@/ (version "2.0") 
    405409              (xmlns:atom "http://www.w3.org/2005/Atom")) 
  • lang/gauche/oldtype/branches/stable/Kahua/oldtype/oldtype/version.kahua

    r14370 r14934  
    77 
    88;;--------------------------------------------------------- 
    9 (define *oldtype-version* "0.2.8") 
     9(define *oldtype-version* "0.2.9") 
  • lang/gauche/oldtype/branches/stable/command/blog

    r14312 r14934  
    3030           (lambda () 
    3131             (when (#/[.][0-9]+/ filename) 
    32                (display "----") (newline) 
    33                (display  
    34                 (string-append "* [[" (oldtype:otpath->wikiname filename) "]]"))) 
     32               (begin 
     33                 (display "----") (newline) 
     34                 (newline) 
     35                 (newline) 
     36                 (display  
     37                  (string-append "* [[" (oldtype:otpath->wikiname filename) "]]")))) 
    3538             (for-each print (port->string-list (current-input-port)))))) 
    3639       entrylist))))