From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46200 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.gnus.general Subject: gnus-group-fetch-charter Date: Wed, 21 Aug 2002 06:51:03 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1029905598 20002 127.0.0.1 (21 Aug 2002 04:53:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 21 Aug 2002 04:53:18 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17hNUZ-0005CV-00 for ; Wed, 21 Aug 2002 06:53:16 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17hNUR-0002ry-00; Tue, 20 Aug 2002 23:53:07 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 20 Aug 2002 23:53:39 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id XAA27655 for ; Tue, 20 Aug 2002 23:53:29 -0500 (CDT) Original-Received: (qmail 2659 invoked by alias); 21 Aug 2002 04:52:47 -0000 Original-Received: (qmail 2654 invoked from network); 21 Aug 2002 04:52:47 -0000 Original-Received: from pfepa.post.tele.dk (193.162.153.2) by gnus.org with SMTP; 21 Aug 2002 04:52:47 -0000 Original-Received: from defun.localdomain (0xc3f952ca.esnxr1.ras.tele.dk [195.249.82.202]) by pfepa.post.tele.dk (Postfix) with ESMTP id 41AF24801C9 for ; Wed, 21 Aug 2002 06:52:30 +0200 (CEST) Original-To: ding@gnus.org Original-Lines: 55 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-redhat-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46200 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46200 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)))))