On 08/05/2014 12:07, Sajan Parikh wrote:
You could on a cron write the output of the following command to a
file somewhere in your web root, then use your Javascript to read the
contents of that file.
root@mailman:/var/lib/mailman# ./bin/list_members discuss | wc -l
16
root@mailman:/var/lib/mailman#
Thanks.
I also found:
http://literalbarrage.org/blog/2011/11/14/export-mailman-subscriber-address-lists-without-sshshell-access/
And:
https://mail.python.org/pipermail/mailman-users/2010-October/070389.html
Is there some simple way to just get a counter of the number member
subscribed in a list?
I don't have shell access on the mailman server, me neither.
So I wrote:
wget -O - --post-data "adminpw=${adminpw}" \
"${listserv}/cgi-bin/mailman/admin/${listname}/members" > out
And started to hack with sed…
This gives some partial result:
sed -n '// {
s/<[^>]\+>//g ; s/[^0-9 ]\+//g p }' out | awk '{print $2}'
927
The output stored in "out" have some accentuated character not matching
the current locale of my bash session. So it seems complicated to
perform the match with sed only…
I've rewritten it in PHP for the web purpose. It is simpler to match number.
I share it here, in case of some interest:
https://gist.github.com/Sylvain303/e012b2a0beec0ffbb6f0
Regards,
Sylvain.
--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org