__________________________________________________________
!! As of Sunday 8th of April 2012 This script has stopped working !!
!! As of Sunday 8th of April 2012 This script has stopped working !!
__________________________________________________________
Howdy all..
For all of you (perhaps not many) who are interested in science, and/or are running a science related chan. I complied a set of RSS feeds from physorg.com.
The original Code was skilfully fashioned using a cocktail of black and white magic during a full moon on the highest peak of the northern plains by Lord Napa the socket wizard of the north.
All I did was copy the original code, and paste it down to add another feed link.. tweaked colours and category heading... and sure I know this whole thing could have been squeezed into one body of code, but .. well you know me.. im not much of a coder, but its a worker. I also added a feed menu list that will be noticed.
Of course feel free to mess about with .. tho perhaps it might be nice to quote napa if your re-posting a modded version.
Anyway the commands are simple enough
!news - will notice the list of feeds.. the rest is self explanatory
will display 3 feeds, you can edit that yourself.. also you can add in any other rss. 2.0 from that site using the same code.. (there seems to be quite a good selection of feeds:
http://www.physorg.com/feeds/ )
Enjoy science fans
__________________________________________________________
!! As of Sunday 8th of April 2012 This script has stopped working !!
!! As of Sunday 8th of April 2012 This script has stopped working !!
__________________________________________________________
on *:text:!News:#:{
notice $nick Hi there $nick Here is the list of available news headline feeds: (!phynews = General Physics) - (!qmnews = Quantum Physics) - (!nanonews = Nanotechnology) - (!spacenews = General Space) - (!astronews = Astronomy) - (!chemnews = Chemistry) - (!bionews = Biology) - (!mathnews = Mathematics) - (!technews - Technology)
}
on $*:text:/^!phnews$/iS:#:{
if (!%f) { inc -u5 %f
if ($sock(physics)) sockclose physics
sockopen physics www.physorg.com 80
sockmark physics msg # 0,14 Physics News:
}
}
on *:sockopen:physics: {
sockwrite -nt physics GET /rss-feed/physics-news/ HTTP/1.1
sockwrite -nt physics Host: $+($sock(physics).addr,$str($crlf,2))
}
on *:sockread:physics: {
var %physics | sockread %physics
if (%phy = 5) { sockclose physics }
if ($regex(%physics,/<title>(.+)<\/title>/)) { inc -u5 %phy
if (%phy isnum 2-4) { hadd -m phy 1 $regml(1) }
}
if ($regex(%physics,/<link>(.+w{3}\.physorg\.com\/\S+)<\/link>/)) { inc -u5 %phyy
if (%phyy isnum 2-4) { $sock(physics).mark $hget(phy,1) 14 @ $regml(1)
}
}
}
on $*:text:/^!qmnews$/iS:#:{
if (!%f) { inc -u5 %f
if ($sock(physics2)) sockclose physics2
sockopen physics2 www.physorg.com 80
sockmark physics2 msg # 0,14 Quantum Physics News:
}
}
on *:sockopen:physics2: {
sockwrite -nt physics2 GET /rss-feed/physics-news/quantum-physics/ HTTP/1.1
sockwrite -nt physics2 Host: $+($sock(physics2).addr,$str($crlf,2))
}
on *:sockread:physics2: {
var %physics2 | sockread %physics2
if (%phy = 5) { sockclose physics2 }
if ($regex(%physics2,/<title>(.+)<\/title>/)) { inc -u5 %phy
if (%phy isnum 2-4) { hadd -m phy 1 $regml(1) }
}
if ($regex(%physics2,/<link>(.+w{3}\.physorg\.com\/\S+)<\/link>/)) { inc -u5 %phyy
if (%phyy isnum 2-4) { $sock(physics2).mark $hget(phy,1) 14 @ $regml(1)
}
}
}
on $*:text:/^!spacenews$/iS:#:{
if (!%f) { inc -u5 %f
if ($sock(physics3)) sockclose physics3
sockopen physics3 www.physorg.com 80
sockmark physics3 msg # 0,14 Space News:
}
}
on *:sockopen:physics3: {
sockwrite -nt physics3 GET /rss-feed/space-news/space-exploration/ HTTP/1.1
sockwrite -nt physics3 Host: $+($sock(physics3).addr,$str($crlf,2))
}
on *:sockread:physics3: {
var %physics3 | sockread %physics3
if (%phy = 5) { sockclose physics3 }
if ($regex(%physics3,/<title>(.+)<\/title>/)) { inc -u5 %phy
if (%phy isnum 2-4) { hadd -m phy 1 $regml(1) }
}
if ($regex(%physics3,/<link>(.+w{3}\.physorg\.com\/\S+)<\/link>/)) { inc -u5 %phyy
if (%phyy isnum 2-4) { $sock(physics3).mark $hget(phy,1) 14 @ $regml(1)
}
}
}
on $*:text:/^!technews$/iS:#:{
if (!%f) { inc -u5 %f
if ($sock(physics4)) sockclose physics4
sockopen physics4 www.physorg.com 80
sockmark physics4 msg # 0,14 Technology News:
}
}
on *:sockopen:physics4: {
sockwrite -nt physics4 GET /rss-feed/technology-news/ HTTP/1.1
sockwrite -nt physics4 Host: $+($sock(physics4).addr,$str($crlf,2))
}
on *:sockread:physics4: {
var %physics4 | sockread %physics4
if (%phy = 5) { sockclose physics4 }
if ($regex(%physics4,/<title>(.+)<\/title>/)) { inc -u5 %phy
if (%phy isnum 2-4) { hadd -m phy 1 $regml(1) }
}
if ($regex(%physics4,/<link>(.+w{3}\.physorg\.com\/\S+)<\/link>/)) { inc -u5 %phyy
if (%phyy isnum 2-4) { $sock(physics4).mark $hget(phy,1) 14 @ $regml(1)
}
}
}
on $*:text:/^!chemnews$/iS:#:{
if (!%f) { inc -u5 %f
if ($sock(physics5)) sockclose physics5
sockopen physics5 www.physorg.com 80
sockmark physics5 msg # 0,14 Chemistry News:
}
}
on *:sockopen:physics5: {
sockwrite -nt physics5 GET /rss-feed/chemistry-news/ HTTP/1.1
sockwrite -nt physics5 Host: $+($sock(physics5).addr,$str($crlf,2))
}
on *:sockread:physics5: {
var %physics5 | sockread %physics5
if (%phy = 5) { sockclose physics5 }
if ($regex(%physics5,/<title>(.+)<\/title>/)) { inc -u5 %phy
if (%phy isnum 2-4) { hadd -m phy 1 $regml(1) }
}
if ($regex(%physics5,/<link>(.+w{3}\.physorg\.com\/\S+)<\/link>/)) { inc -u5 %phyy
if (%phyy isnum 2-4) { $sock(physics5).mark $hget(phy,1) 14 @ $regml(1)
}
}
}
on $*:text:/^!bionews$/iS:#:{
if (!%f) { inc -u5 %f
if ($sock(physics6)) sockclose physics6
sockopen physics6 www.physorg.com 80
sockmark physics6 msg # 0,14 Biology News:
}
}
on *:sockopen:physics6: {
sockwrite -nt physics6 GET /rss-feed/biology-news/ HTTP/1.1
sockwrite -nt physics6 Host: $+($sock(physics6).addr,$str($crlf,2))
}
on *:sockread:physics6: {
var %physics6 | sockread %physics6
if (%phy = 5) { sockclose physics6 }
if ($regex(%physics6,/<title>(.+)<\/title>/)) { inc -u5 %phy
if (%phy isnum 2-4) { hadd -m phy 1 $regml(1) }
}
if ($regex(%physics6,/<link>(.+w{3}\.physorg\.com\/\S+)<\/link>/)) { inc -u5 %phyy
if (%phyy isnum 2-4) { $sock(physics6).mark $hget(phy,1) 14 @ $regml(1)
}
}
}
on $*:text:/^!mathnews$/iS:#:{
if (!%f) { inc -u5 %f
if ($sock(physics7)) sockclose physics7
sockopen physics7 www.physorg.com 80
sockmark physics7 msg # 0,14 Mathematics News:
}
}
on *:sockopen:physics7: {
sockwrite -nt physics7 GET /rss-feed/science-news/mathematics/ HTTP/1.1
sockwrite -nt physics7 Host: $+($sock(physics7).addr,$str($crlf,2))
}
on *:sockread:physics7: {
var %physics7 | sockread %physics7
if (%phy = 5) { sockclose physics7 }
if ($regex(%physics7,/<title>(.+)<\/title>/)) { inc -u5 %phy
if (%phy isnum 2-4) { hadd -m phy 1 $regml(1) }
}
if ($regex(%physics7,/<link>(.+w{3}\.physorg\.com\/\S+)<\/link>/)) { inc -u5 %phyy
if (%phyy isnum 2-4) { $sock(physics7).mark $hget(phy,1) 14 @ $regml(1)
}
}
}
on $*:text:/^!astronews$/iS:#:{
if (!%f) { inc -u5 %f
if ($sock(physics8)) sockclose physics8
sockopen physics8 www.physorg.com 80
sockmark physics8 msg # 0,14 Astronomy News:
}
}
on *:sockopen:physics8: {
sockwrite -nt physics8 GET /rss-feed/space-news/astronomy/ HTTP/1.1
sockwrite -nt physics8 Host: $+($sock(physics8).addr,$str($crlf,2))
}
on *:sockread:physics8: {
var %physics8 | sockread %physics8
if (%phy = 5) { sockclose physics8 }
if ($regex(%physics8,/<title>(.+)<\/title>/)) { inc -u5 %phy
if (%phy isnum 2-4) { hadd -m phy 1 $regml(1) }
}
if ($regex(%physics8,/<link>(.+w{3}\.physorg\.com\/\S+)<\/link>/)) { inc -u5 %phyy
if (%phyy isnum 2-4) { $sock(physics8).mark $hget(phy,1) 14 @ $regml(1)
}
}
}
on $*:text:/^!nanonews$/iS:#:{
if (!%f) { inc -u5 %f
if ($sock(physics9)) sockclose physics9
sockopen physics9 www.physorg.com 80
sockmark physics9 msg # 0,14 NanoTechology News
}
}
on *:sockopen:physics9: {
sockwrite -nt physics9 GET /rss-feed/nanotech-news/ HTTP/1.1
sockwrite -nt physics9 Host: $+($sock(physics9).addr,$str($crlf,2))
}
on *:sockread:physics9: {
var %physics9 | sockread %physics9
if (%phy = 5) { sockclose physics9 }
if ($regex(%physics9,/<title>(.+)<\/title>/)) { inc -u5 %phy
if (%phy isnum 2-4) { hadd -m phy 1 $regml(1) }
}
if ($regex(%physics9,/<link>(.+w{3}\.physorg\.com\/\S+)<\/link>/)) { inc -u5 %phyy
if (%phyy isnum 2-4) { $sock(physics9).mark $hget(phy,1) 14 @ $regml(1)
}
}
}
Cheers Napa