aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMatthew Marchese <maffblaster@gentoo.org>2022-02-12 10:23:35 -0800
committerMatthew Marchese <maffblaster@gentoo.org>2022-02-12 10:23:35 -0800
commitf190bf19b69a1e771b09e63964928ae223547dec (patch)
treed652908436faf3dd276a040fbef6e74d2876b160 /bin
parentRemove "pinned" Heartbleed wiki article. (diff)
downloadwww-f190bf19b69a1e771b09e63964928ae223547dec.tar.gz
www-f190bf19b69a1e771b09e63964928ae223547dec.tar.bz2
www-f190bf19b69a1e771b09e63964928ae223547dec.zip
Reduce wiki.xml items by 90 percent (from 50 to 5).
Only 5 items are displayed on the frontpage. Also better define arguments in the wiki URI API query thing. Signed-off-by: Matthew Marchese <maffblaster@gentoo.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/update-wiki.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/update-wiki.sh b/bin/update-wiki.sh
index 1d13235..7566a8e 100755
--- a/bin/update-wiki.sh
+++ b/bin/update-wiki.sh
@@ -1,6 +1,9 @@
#!/bin/bash
echo -n 'Updating wiki information...'
-wget -T 60 'https://wiki.gentoo.org/index.php?title=Special:NewPages&feed=rss&hidebots=1&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=' -O _data/wiki.xml.tmp 2>/dev/null
+# Arguments in the wiki.gentoo.org link below:
+# namespace=0 is the main namespace
+# limit=5 is how many new pages are returned in the query; this was reduced from the default value of 50 since only the most recent 5 entries are displayed on the frontpage
+wget -T 60 'https://wiki.gentoo.org/index.php?title=Special:NewPages&feed=rss&hidebots=1&hideredirs=1&limit=6&offset=&namespace=0&username=&tagfilter=' -O _data/wiki.xml.tmp 2>/dev/null
[ $? -eq 0 ] && mv _data/wiki.xml.tmp _data/wiki.xml
echo 'done.'