Mercurial > hg > index.fcgi > www > www-1
view myrss/myrss_update.sh @ 140:ae6b4032a912
myrss2: FEEDS: Add jabberwocking.com, remove danielmiessler.com
author | paulo |
---|---|
date | Mon, 03 Jul 2023 04:40:23 +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