+2000-08-19 TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp>
+
+ * nnshimbun.el (nnshimbun-type-definition): Follow changes of ZDNet.
+ (nnshimbun-make-text-or-html-contents): Ditto.
+ (nnshimbun-make-html-contents): Ditto.
+
2000-08-18 TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp>
Akihiro Arisawa <ari@atesoft.advantest.co.jp>
(index-url . nnshimbun-url)
(from-address . "zdnn@softbank.co.jp")
(make-contents . nnshimbun-make-html-contents)
- (contents-start . "<!--BODY-->")
- (contents-end . "<!--BODYEND-->"))
+ (contents-start . "\\(<!--BODY-->\\|[0-9]+\e$BG/\e(B[0-9]+\e$B7n\e(B[0-9]+\e$BF|\e(B[^<]*</font></td>[ \t\r\f\n]*</tr>[ \t\r\f\n]*</table>[ \t\r\f\n]*\\(</p>\\)?\\)")
+ (contents-end . "\\(<!--BODYEND-->\\|<div align=\"right\">\\|<\\(b\\|strong\\)>\\[</\\2>[^<]*<\\2>ZDNet/\\(JAPAN\\|USA\\)\\]\\(<[^>]+>\\)?</\\2>\\)"))
("mew"
(url . "http://www.mew.org/archive/")
(groups ,@(mapcar #'car nnshimbun-mew-groups))
(defun nnshimbun-make-text-or-html-contents (header &optional x-face)
(let ((case-fold-search t) (html t) (start))
- (when (and (search-forward nnshimbun-contents-start nil t)
+ (when (and (re-search-forward nnshimbun-contents-start nil t)
(setq start (point))
- (search-forward nnshimbun-contents-end nil t))
+ (re-search-forward nnshimbun-contents-end nil t))
+ (delete-region (match-beginning 0) (point-max))
(delete-region (point-min) start)
- (delete-region (- (point) (length nnshimbun-contents-end)) (point-max))
(nnshimbun-shallow-rendering)
(setq html nil))
(goto-char (point-min))
(defun nnshimbun-make-html-contents (header &optional x-face)
(let (start)
- (when (and (search-forward nnshimbun-contents-start nil t)
+ (when (and (re-search-forward nnshimbun-contents-start nil t)
(setq start (point))
- (search-forward nnshimbun-contents-end nil t))
- (delete-region (point-min) start)
- (delete-region (- (point) (length nnshimbun-contents-end)) (point-max)))
+ (re-search-forward nnshimbun-contents-end nil t))
+ (delete-region (match-beginning 0) (point-max))
+ (delete-region (point-min) start))
(goto-char (point-min))
(nnshimbun-insert-header header)
(insert "Content-Type: text/html; charset=ISO-2022-JP\n"