Gnus development mailing list
 help / color / mirror / Atom feed
From: Jesper Harder <harder@ifa.au.dk>
Subject: gnus-group-fetch-charter
Date: Wed, 21 Aug 2002 06:51:03 +0200	[thread overview]
Message-ID: <m3ptwchl1k.fsf@defun.localdomain> (raw)

I thought it would be nice to have a convenient way to get the charter
for a group (like gnus-group-fetch-faq for FAQ's).  

This works for some of the regional hierarchies (it's not so easy to do
for the Big8 and alt).

(defun gnus-group-fetch-charter (group)
  "Fetch the charter for the current group."
  (interactive
   (list (gnus-group-group-name)))
  (unless group
    (error "No group name given"))
  (let ((name (gnus-group-real-name group))
	url hierarchy)
    (when (string-match "\\(^[^\\.]+\\)\\..*" name)
      (setq hierarchy (match-string 1 name))
      (cond ((string= hierarchy "no")
	     (setq url (concat "http://no.news-admin.org/charter/" name ".txt")))
	    ((string= hierarchy "dk")
	     (setq url (concat "http://www.usenet.dk/grupper.pl?get=" name)))
	    ((string= hierarchy "england")
	     (setq url (concat "http://england.news-admin.org/charters/" name)))
	    ((string= hierarchy "fr")
	     (setq url (concat "http://www.usenet-fr.net/fur/chartes/" name ".html")))
	    ((string= hierarchy "europa")
	     (setq url (concat "http://www.europa.usenet.eu.org/chartas/charta-en-" 
			       (gnus-replace-in-string name "europa\\." "") ".html")))
	    ((string= hierarchy "nl")
	     (setq url (concat "http://www.xs4all.nl/~sister/usenet/charters/" name)))
	    ((string= hierarchy "aus")
	     (setq url (concat "http://aus.news-admin.org/groupinfo.php/" name)))
	    ((string= hierarchy "pl")
	     (setq url (concat "http://www.usenet.pl/opisy/" name)))
	    ((string= hierarchy "ch")
	     (setq url (concat "http://www.use-net.ch/Usenet/charter.html#" name)))
	    ((string= hierarchy "at")
	     (setq url (concat "http://www.usenet.at/chartas/" name "/charta")))
	    ((string= hierarchy "uk")
	     (setq url (concat "http://www.usenet.org.uk/" name ".html")))
	    ((string= hierarchy "wales")
	     (setq url (concat "http://www.wales-usenet.org/english/groups/" name ".html")))
	    ((string= hierarchy "dfw")
	     (setq url (concat "http://www.cirr.com/dfw/charters/" name ".html")))
	    ((string= hierarchy "se")
	     (setq url (concat "http://www.usenet-se.net/Reglementen/" 
			       (gnus-replace-in-string name "\\." "_") ".html")))
	    ((string= hierarchy "milw")
	     (setq url (concat "http://usenet.mil.wi.us/" 
			       (gnus-replace-in-string name "milw\\." "") "-charter")))
	    ((string= hierarchy "ca")
	     (setq url (concat "http://www.sbay.org/ca/charter-" name ".html")))
	    ((string= hierarchy "netins")
	     (setq url (concat "http://www.netins.net/usenet/charter/" 
			       (gnus-replace-in-string name "\\." "-") "-charter.html"))))
      (when url (browse-url url)))))




             reply	other threads:[~2002-08-21  4:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-21  4:51 Jesper Harder [this message]
2002-08-23 13:26 ` gnus-group-fetch-charter Reiner Steib
2002-08-24  3:08   ` gnus-group-fetch-charter Jesper Harder
2002-08-24 15:27     ` gnus-group-fetch-charter Kai Großjohann
2002-08-26 21:11       ` gnus-group-fetch-charter Jesper Harder
2002-08-30 16:43         ` gnus-group-fetch-charter Reiner Steib
2002-08-30 20:45           ` gnus-group-fetch-charter Simon Josefsson
2002-08-25 18:20     ` gnus-group-fetch-charter Reiner Steib
2002-08-26 21:28       ` gnus-group-fetch-charter Jesper Harder
2002-12-29 22:31 ` gnus-group-fetch-charter Lars Magne Ingebrigtsen
2002-12-29 22:51   ` gnus-group-fetch-charter Kai Großjohann
2002-12-29 23:02     ` gnus-group-fetch-charter Lars Magne Ingebrigtsen
2002-12-29 23:00   ` gnus-group-fetch-charter Jesper Harder
2002-12-29 23:13     ` gnus-group-fetch-charter Lars Magne Ingebrigtsen
2003-01-02 21:26       ` gnus-group-fetch-charter Jesper Harder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3ptwchl1k.fsf@defun.localdomain \
    --to=harder@ifa.au.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).