view myrss/myrss_update.sh @ 144:90f3021e3137

myrss2: FEEDS: Remove longform.org; add propublic.org
author paulo
date Tue, 28 May 2024 06:23:58 +0000
parents fce61e65e3ae
children
line source
1 #!/bin/sh
3 TIMESTAMP=$(date '+%FT%T%:z')
4 TIMEOUT=60
5 MAXPROCS=20
7 i=0
8 n=0
9 for URL in $(grep -v '^#' FEEDS)
10 do
11 FN=$((++i)).feedtmp
12 wget -q -T ${TIMEOUT} -U '' -O - ${URL} | xsltproc step1.xsl - | xsltproc step2.xsl - > ${FN} &
13 if (( $((++n)) > ${MAXPROCS} ))
14 then
15 wait
16 n=0
17 fi
18 done
20 wait
22 echo '<HTML>'
23 echo '<HEAD>'
24 echo "<TITLE>${TIMESTAMP}</TITLE>"
25 echo '<LINK REL="stylesheet" TYPE="text/css" HREF="index.css">'
26 echo '</HEAD>'
28 echo '<BODY>'
29 echo "<H1>${TIMESTAMP}</H1>"
31 for j in $(seq 1 ${i})
32 do
33 cat ${j}.feedtmp
34 done
36 echo '</BODY>'
37 echo '</HTML>'
39 rm *.feedtmp