UNIX 系 OS を対象に説明してます。
Windows にインストールする場合は適当に読み替えてください。
また、ディレクトリ構成は一例であり、必ずしもこの設定にする必要があるわけではありません。
% tar zxvf wbget-0.90.tar.gz % tar zxvf glog05762.tgz
wbget-0.90
ディレクトリと glog-0.5.76p2
に展開されます。
必要ならば glog.el
のパッチもあててください。
# mkdir /usr/local/share/emacs/site-lisp/glog # cp trh-0.90/lisp/*.el /usr/local/share/emacs/site-lisp/glog # cp glog-0.5.76p2/lisp/*.el /usr/local/share/emacs/site-lisp/glog個人のホームディレクトリ下にインストールするつもりであれば、
~/.emacsrc
に、
(if (file-directory-p (expand-file-name "~/elisp")) (setq load-path (cons (expand-file-name "~/elisp") load-path)))などのように設定して
~/elisp
を Emacs の load-path に加えた上で、次のようにします。
% mkdir ~/elisp % mkdir ~/elisp/glog % cp /usr/local/share/emacs/site-lisp/subdirs.el ~/elisp % cp trh-0.90/lisp/*.el ~/elisp/glog % cp glog-0.5.76p2/lisp/*.el ~/elisp/glog
% mv wbget-0.90 ~/trh
~/.glogrc
をホームディレクトリにコピーします。% cp glog-0.5.76p2/lisp/.glogrc ~WBML 形式の設定を追加します。
; WBML (or (assoc 'wbml glog-bbs-list) (nconc glog-bbs-list (list (list 'wbml "Web BBS" "<\\?xml [^>]+>[ \n]*<!DOCTYPE wbml " (function view-wbml-mode) "glog_wbm" (function glog-wbml-version)) )))TrH のディレクトリをログディレクトリとして指定します。
;; LOGファイルをvisitするカレントのディレクトリ.(nilでカレント) (setq glog-log-directory (expand-file-name "~/trh/bbs/")) ;; 発言ファイルを書き出す際のカレントディレクトリ名.(nilでカレント) (setq glog-post-directory (expand-file-name "~/trh/post/"))wbget で -dualout オプション等を指定し、日付によるファイル名をつけた場合は、次の設定も加えておくと便利です。
;; ログファイル名の初期設定:例 980101.log のようになる (defun my-glog-default-log-file () (let ((date (current-time-string)) (date-alist '(("Jan" 1) ("Feb" 2) ("Mar" 3) ("Apr" 4) ("May" 5) ("Jun" 6) ("Jul" 8) ("Aug" 8) ("Sep" 9) ("Oct" 10) ("Nov" 11) ("Dec" 12)))) (format "%02d%02d%02d.wbml" (string-to-number (substring date 22 24)) (car (cdr (assoc (substring date 4 7) date-alist))) (string-to-number (substring date 8 10))))) (if (or (not (boundp 'glog-last-view-file-name)) (not glog-last-view-file-name)) (setq glog-last-view-file-name (concat glog-log-directory (my-glog-default-log-file))))
~/.emacsrc
に glog の設定を追加します。
;; WBML (setq glog-wbml-post-handle "掲示板で使うハンドル") (setq glog-wbml-post-mail "掲示板で使うメールアドレス") (setq glog-wbml-post-url "掲示板で使うホームページURL") (setq glog-wbml-post-passwd "掲示板で使うパスワード") ;; GLOG (autoload 'glog "glog" "View BBS log mode." t) (autoload 'glog-view-file-mode "glog" "view file as BBS log." t) (autoload 'glog-view-buffer-mode "glog" "view buffer as BBS log." t) (autoload 'glog-batch-view "glog" "like viewer." t)