This file is indexed.

/usr/share/emacs/site-lisp/w3m/shimbun/sb-nikkansports.el is in w3m-el-snapshot 1.4.569+0.20170110-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
;;; sb-nikkansports.el --- shimbun backend for www.nikkansports.com -*- coding: iso-2022-7bit; -*-

;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008
;; MIYOSHI Masanori <miyoshi@meadowy.org>

;; Author: MIYOSHI Masanori <miyoshi@meadowy.org>
;;         Katsumi Yamaoka <yamaoka@jpl.org>
;; Keywords: news

;; This file is a part of shimbun.

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING.  If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

;;; Commentary:

;; Original code was nnshimbun.el written by
;; TSUCHIYA Masatoshi <tsuchiya@namazu.org>.

;;; Code:

(require 'shimbun)

(luna-define-class shimbun-nikkansports
		   (shimbun-japanese-newspaper shimbun) ())

(defvar shimbun-nikkansports-url "http://www.nikkansports.com/")

(defvar shimbun-nikkansports-server-name "$BF|4)%9%]!<%D(B")

(defvar shimbun-nikkansports-group-table
  '(("flash" "$B:G?7%K%e!<%9(B" "flash/flash-news.html")
    ("baseball" "$BLn5e(B" "baseball/news/backnumber-baseball.html")
    ("baseball.highschool" "$B9b9;Ln5e(B"
     "baseball/highschool/news/backnumber-highschool.html")
    ("baseball.amateur" "$BBg3X!&<R2q?MLn5e(B"
     "baseball/amateur/news/backnumber-amateur.html")
    ("baseball.mlb" "$B#M#L#B(B" "baseball/mlb/news/backnumber-mlb.html")
    ("soccer" "$B%5%C%+!<(B" "soccer/news/backnumber-soccer.html")
    ("soccer.japan" "$B%5%C%+!<F|K\BeI=(B"
     "soccer/japan/news/backnumber-japan.html")
    ("soccer.world" "$B3$30%5%C%+!<(B" "soccer/world/news/backnumber-world.html")
    ("sports" "$B%9%]!<%D(B" "sports/news/backnumber-sports.html")
    ("sumo" "$BBgAjKP(B" "sports/sumo/news/backnumber-sumo.html")
    ("nba" "$B#N#B#A(B" "sports/nba/news/backnumber-nba.html")
    ("nfl" "$B#N#F#L(B" "sports/nfl/news/backnumber-nfl.html")
    ("nhl" "$B#N#H#L(B" "sports/nhl/news/backnumber-nhl.html")
    ("rugby" "$B%i%0%S!<(B" "sports/rugby/news/backnumber-rugby.html")
    ("golf" "$B%4%k%U(B" "sports/golf/news/backnumber-golf.html")
    ("motor" "$B%b!<%?!<%9%]!<%D(B" "sports/motor/news/backnumber-motor.html")
    ("battle" "$B3JF.5;(B" "battle/news/backnumber-battle.html")
    ("race" "$B6%GO(B" "race/news/backnumber-race.html")
    ("race.kka" "$B6%NX!&6%Dz!&%*!<%H(B" "race/kka/news/backnumber-kka.html")
    ("entertainment" "$B7]G=(B" "entertainment/news/backnumber-entertainment.html")
    ("cinema" "$B%7%M%^(B" "entertainment/cinema/news/backnumber-cinema.html")
    ("general" "$B<R2q(B" "general/news/backnumber-general.html")))

(defvar shimbun-nikkansports-content-start
  "<[\t\n ]*![\t\n ]*-+[\t\n ]*\\++[\t\n ]*\
$B%K%e!<%9K\J8(B[\t\n ]*\\++[\t\n ]*-+[\t\n ]*>[\t\n ]*\
\\(?:\\(?:<[\t\n ]*/?[\t\n ]*[ads][^>]+>\
\\|<[\t\n ]*h[0-9]+[\t\n ]*>[^<]+<[\t\n ]*/[\t\n ]*h[0-9]+[\t\n ]*>\\)\
\[\t\n ]*\\)*")

(defvar shimbun-nikkansports-content-end
  "\\(?:[\t\n ]*<[^>]+>\\)*[\t\n ]*\
<[\t\n ]*![\t\n ]*-+[\t\n ]*/[\t\n ]*\\++[\t\n ]*\
$B%K%e!<%9K\J8(B[\t\n ]*\\++[\t\n ]*-+[\t\n ]*>")

(defvar shimbun-nikkansports-expiration-days 17)

(defvar shimbun-nikkansports-x-face-alist
  '(("default" . "\
Face: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUDKpy11PIeeNv///+
 PA1z5AAAAP0lEQVQI12NgAAMOJgYG/n/2Fxj4a+0+MPDH2i4AEvYPgAQ3iLvvB5DYCyL0LzCsAgI
 kYm3u+yqGte9Td4G5AJiKHahMk6/LAAAAAElFTkSuQmCC")))

(luna-define-method shimbun-groups ((shimbun shimbun-nikkansports))
  (mapcar 'car shimbun-nikkansports-group-table))

(luna-define-method shimbun-current-group-name ((shimbun shimbun-nikkansports))
  (nth 1 (assoc (shimbun-current-group-internal shimbun)
		shimbun-nikkansports-group-table)))

(luna-define-method shimbun-index-url ((shimbun shimbun-nikkansports))
  (shimbun-expand-url (nth 2 (assoc (shimbun-current-group-internal shimbun)
				    shimbun-nikkansports-group-table))
		      shimbun-nikkansports-url))

(luna-define-method shimbun-get-headers ((shimbun shimbun-nikkansports)
					 &optional range)
  (shimbun-nikkansports-get-headers shimbun range))

(defun shimbun-nikkansports-get-headers (shimbun range)
  (let ((regexp
	 (eval-when-compile
	   (concat
	    "<a[\t ]+href=\""
	    ;; 1. url
	    "\\([^\"]+/"
	    ;; 2. serial number
	    "\\([^/]+"
	    ;; 3. year
	    "\\(20[0-9][0-9]\\)"
	    ;; 4. month
	    "\\([01][0-9]\\)"
	    ;; 5. day
	    "\\([0-3][0-9]\\)"
	    "[^.]+\\)\\.html\\)\">[\t ]*"
	    ;; 6. subject
	    "\\([^<]+\\)"
	    "[\t ]*</a>[^\n]+\\[[\t ]*[0-9]+$BF|(B[\t ]*"
	    ;; 7. time
	    "\\([012][0-9]:[0-5][0-9]\\)"
	    "[\t ]*\\]")))
	(group (shimbun-current-group-internal shimbun))
	(from (concat shimbun-nikkansports-server-name " ("
		      (shimbun-current-group-name shimbun) ")"))
	(case-fold-search t)
	headers)
    (setq group (mapconcat 'identity
			   (nreverse (split-string group "\\."))
			   "."))
    (while (re-search-forward regexp nil t)
      (push (shimbun-create-header
	     0 (match-string 6) from
	     (shimbun-make-date-string
	      (string-to-number (match-string 3))
	      (string-to-number (match-string 4))
	      (string-to-number (match-string 5))
	      (match-string 7))
	     (concat "<"
		     (mapconcat 'identity
				(save-match-data
				  (split-string (match-string 2) "-"))
				".")
		     "%" group ".nikkansports.com>")
	     "" 0 0 (match-string 1))
	    headers))
    (shimbun-sort-headers headers)))

(luna-define-method shimbun-clear-contents :around ((shimbun
						     shimbun-nikkansports)
						    header)
  (shimbun-strip-cr)
  (goto-char (point-min))
  (when (luna-call-next-method)
    (unless (shimbun-prefer-text-plain-internal shimbun)
      (shimbun-break-long-japanese-lines))
    t))

(provide 'sb-nikkansports)

;;; sb-nikkansports.el ends here