* random-indymedia.cgi
@ 2002-10-28 7:07 Thien-Thi Nguyen
2002-10-28 14:35 ` random-indymedia.cgi news
0 siblings, 1 reply; 3+ messages in thread
From: Thien-Thi Nguyen @ 2002-10-28 7:07 UTC (permalink / raw)
Cc: guile-user
munge PATH to taste.
thi
____________________________________
#!/bin/sh
# -*- scheme -*-
PATH=/home/ttn/local/bin:/usr/local/bin:$PATH
exec guile -s $0 "$@"
!#
;;; random-indymedia.cgi
;; Copyright (C) 2002 Thien-Thi Nguyen
;; This program is provided under the terms of the GNU GPL, version 2.
;; See http://www.fsf.org/copyleft/gpl.html for details.
(define *indymedia* `(,@(map (lambda (stem)
(format #f "http://~A.indymedia.org" stem))
'(adelaide
alberta
argentina
arizona
athens
atlanta
austin
austria
baltimore
barcelona
belgium
bolivia
boston
brasil
brazil
brisbane
bristol
buffalo
cfl
chapelhill
chiapas
chicago
chile
climate
colombia
cyprus
dc
docs
ecuador
eugene
euskalherria
germany
global
hamilton
houston
india
ireland
italy
ithaca
jakarta
jerusalem
la
lists
madison
madrid
maine
maritimes
melbourne
mexico
milwaukee
mke
montreal
mumbai
newjersey
newmexico
nigeria
nyc
nycap
ontario
ottawa
portland
prague
print
process
pt
quebec
radio
richmond
rochester
rockymountain
russia
sandiego
santacruz
satellite
seatlle
seattle
sf
southafrica
stlouis
sweden
switzerland
sydney
tech
thessaloniki
thunderbay
twincities
uk
urbana
uruguay
utah
vancouver
vermont
victoria
volunteer
windsor
www))
,@(map (lambda (stem)
(format #f "http://~A" stem))
'(www.indymedia.org.il
www.indymedia.org.nz
www.indymedia.org.uk
brisbane.indymedia.org.au
indymedia.org.il))))
(use-modules ((ttn html-data) :renamer (symbol-prefix-proc '-))
((ttn flatten) :select (flatten)))
(define (pick-one ls)
(list-ref ls (random (length ls))))
(set! *random-state* (seed->random-state (current-time)))
(let ((suggested (pick-one *indymedia*)))
(flatten (cons "Content-type: text/html\n\n"
(-html (-head (-title suggested)
(-refresh "0" suggested))
(-body (-href suggested suggested))))))
;;; random-indymedia.cgi ends here
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: random-indymedia.cgi
2002-10-28 7:07 random-indymedia.cgi Thien-Thi Nguyen
@ 2002-10-28 14:35 ` news
2002-10-28 14:48 ` random-indymedia.cgi Thien-Thi Nguyen
0 siblings, 1 reply; 3+ messages in thread
From: news @ 2002-10-28 14:35 UTC (permalink / raw)
Thien-Thi Nguyen <ttn@giblet.glug.org> writes:
> munge PATH to taste.
>
> thi
>
>
> ____________________________________
> #!/bin/sh
> # -*- scheme -*-
> PATH=/home/ttn/local/bin:/usr/local/bin:$PATH
> exec guile -s $0 "$@"
> !#
> ;;; random-indymedia.cgi
Cool. Do you have this running publicly anywhere? On the wikid
demo maybe?
Chris
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: random-indymedia.cgi
2002-10-28 14:35 ` random-indymedia.cgi news
@ 2002-10-28 14:48 ` Thien-Thi Nguyen
0 siblings, 0 replies; 3+ messages in thread
From: Thien-Thi Nguyen @ 2002-10-28 14:48 UTC (permalink / raw)
Cc: guile-user
From: (Chris Beggy ) news@kippona.com
Date: Mon, 28 Oct 2002 09:35:28 -0500
Do you have this running publicly anywhere?
yes (which is the motivation for posting it). see first link on:
http://www.glug.org/
it's also now linked from the <<random>> page in the demo wiki.
thi
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-10-28 14:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-28 7:07 random-indymedia.cgi Thien-Thi Nguyen
2002-10-28 14:35 ` random-indymedia.cgi news
2002-10-28 14:48 ` random-indymedia.cgi Thien-Thi Nguyen
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 read-only IMAP folder(s) and NNTP newsgroup(s).