This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Eggdrop RSS Syndication (rss-synd) v0.5b1

Support & discussion of released scripts, and announcements of new releases.
Post Reply
k
kenh83
Halfop
Posts: 61
Joined: Wed Sep 08, 2010 11:22 am

Post by kenh83 »

"Auto-Feed" not working?!

So the script doesnt seem to auto announce for me.. Here are my settings:

Code: Select all

#
# Start of Settings
#

namespace eval ::rss-synd {
	variable rss
	variable default

	set rss(googleusa) {
		"url"		"http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&topic=n&output=rss"
		"database"	"googleusa.db"
		"output"	"\00312G\00304o\00308o\00312g\00309l\00304e\00307:\00312USA\00307 -\00314 @@item!title@@ \00307->\00314 \[maketiny @@item!link@@\]"
		"trigger"	"!@@feedid@@"
	}

	set rss(googleworld) {
        	"url"           "http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&topic=w&output=rss"
	        "database"      "googleworld.db"
        	"output"        "\00312G\00304o\00308o\00312g\00309l\00304e\00307:\00304WORLD\00307 -\00314 @@item!title@@ \00307->\00314 \[maketiny @@item!link@@\]"
	        "trigger"       "!@@feedid@@"
	}

	set rss(bbc) { 
		"url" 			"http://news.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml" 
		"database" 		"bbc.db" 
		"output"        "\00311\\\[\00307@@channel!title@@@@title@@\00311\\\] -\00314 @@item!title@@ \00311->\00314 \[maketiny @@item!link@@\]"
		"trigger" 		"!@@feedid@@"
	} 
	set rss(wired) { 
		"url" 			"http://www.wired.com/news_drop/netcenter/netcenter.rdf" 
		"database" 		"wired.db" 
		"output"        "\00311\\\[\00307@@channel!title@@@@title@@\00311\\\] -\00314 @@item!title@@ \00311->\00314 \[maketiny @@item!link@@\]"
		"trigger" 		"!@@feedid@@"
	} 
	set rss(imdb) { 
		"url" 			"http://rss.imdb.com/news/" 
		"database" 		"imdb.db" 
		"output"        "\00311\\\[\00307@@channel!title@@@@title@@\00311\\\] -\00314 @@item!title@@ \00311->\00314 \[maketiny @@item!link@@\]"
		"trigger" 		"!@@feedid@@"
	} 
	set rss(ubu) {
		"url"			"http://www.ubuntu.com/usn/rss.xml"
		"database"		"ubuntu.db"
        "output"        "\00311\\\[\00307@@channel!title@@@@title@@\00311\\\] -\00314 @@item!title@@ \00311->\00314 \[maketiny @@item!link@@\]"
        "trigger"       "!@@feedid@@"
	}
	set rss(deb) {
		"url"			"http://www.us.debian.org/security/dsa-long"
		"database"		"deb.db"
        "output"	 	"\00311\\\[\00307@@channel!title@@@@title@@\00311\\\] -\00314 @@item!title@@ \00311->\00314 \[maketiny @@item!link@@\]"
        "trigger"       "!@@feedid@@"
	}

	set rss(Reuters) { 
		"url"         	"http://feeds.reuters.com/reuters/topNews" 
		"database"     	"reuters.db" 
		"output" 		"\00311\\\[\00307@@channel!title@@@@title@@\00311\\\] -\00314 @@item!title@@ \00311->\00314 \[maketiny @@item!link@@\]"
		"trigger"      	"!@@feedid@@" 
	}
	
	set rss(slashdot) {
		"url"			"http://rss.slashdot.org/Slashdot/slashdot"
		"database"		"slashdot.db"
        "output" 		"\00311\\\[\00307@@channel!title@@@@title@@\00311\\\] -\00314 @@item!title@@ \00311->\00314 \[maketiny @@item!link@@\]"
        "trigger"       "!@@feedid@@"
	}

	set rss(digg) {
		"url" 			"http://services.digg.com/2.0/story.getTopNews?type=rss"
		"database"		"digg.db"
		"output" 		"\00311\\\[\00307@@channel!title@@@@title@@\00311\\\] -\00314 @@item!title@@ \00311->\00314 \[maketiny @@item!link@@\]"
		"trigger"       "!@@feedid@@"
	}

	#set rss(test2) {
	#	"url"			"http://milw0rm.com/rss.php"
	#	"channels"		"#test"
	#	"database"		"./scripts/feeds/test2.db"
	#	"trigger"		"!@@feedid@@"
	#}

	# The default settings, If any setting isn't set for an individual feed
	#   it'll use the defaults listed here.
	#
	# WARNING: You can change the options here, but DO NOT REMOVE THEM, doing
	#   so will create errors.
	set default {
		"announce-output"	1
		"trigger-output"	2
		"remove-empty"		1
		"trigger-type"		0:2
		"announce-type"		0
		"max-depth"		5
		"evaluate-tcl"		1
		"update-interval"	1
		"output-order"		0
		"timeout"		60000
		"channels"		"#test"
		"trigger"		"!rss @@feedid@@"
		"output"		"\\\[\002@@channel!title@@@@title@@\002\\\] @@item!title@@ - \[maketiny @@item!link@@\]"
		"user-agent"		"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"
	}
}
Also, whats with this:

Code: Select all

[05:34] RSS Warning: couldn't open "bbc.db": no such file or directory.
[05:34] RSS Warning: couldn't open "wired.db": no such file or directory.
[05:34] RSS Warning: couldn't open "deb.db": no such file or directory.
I've tried just to do, 'touch filename.db' to no avail, gives out a different error saying its not a proper file:

Code: Select all

[05:23] RSS Error: Invalid feed database file format (googleusa.db)!
This script should be able to create these files automatically if they do not exist, I do not understand what the problem is.

Most concerning though, is that the feed is not being announced in the channel -- Some are, some aren't. Its rather annoying, to be honest.
r
romprod
Halfop
Posts: 49
Joined: Fri Oct 19, 2001 8:00 pm

Post by romprod »

Ditto, I'm having exactly the same problem, the feed is hardly being auto announced and it's certainly not checking at the set interval.
k
kenh83
Halfop
Posts: 61
Joined: Wed Sep 08, 2010 11:22 am

Post by kenh83 »

http://code.google.com/p/rss-synd/ has been updated as of 5 or 6 days ago, seems a new coder, HM2K is taking over the project.

He can be found on EFNet in #HM2K .. and he's also suggested to use the "Issues" portion of the google code project to submit problems and bugs there.

I'm not sure of his activity here on this forum so that is why I've provided the google code project page.

I've started using 'his' current version, which is 0.5b7, however nothing major has changed and the problem still exists.
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

kenh83 wrote:http://code.google.com/p/rss-synd/ has been updated as of 5 or 6 days ago, seems a new coder, HM2K is taking over the project.

He can be found on EFNet in #HM2K .. and he's also suggested to use the "Issues" portion of the google code project to submit problems and bugs there.

I'm not sure of his activity here on this forum so that is why I've provided the google code project page.

I've started using 'his' current version, which is 0.5b7, however nothing major has changed and the problem still exists.
Does this mean that he will start selling it?
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
k
kenh83
Halfop
Posts: 61
Joined: Wed Sep 08, 2010 11:22 am

Post by kenh83 »

Why would he start selling it? Just because its on google code project pages?
User avatar
hm2k
Halfop
Posts: 57
Joined: Mon Sep 11, 2006 7:27 am
Location: UK

Post by hm2k »

There appears to be a little confusion so let me clear things up:

* After discussing the rss-synd project with it's original author (Andrew Scott) I have joined the project.
* I have not taken over the project, but I intend on leading it
* The script is not for sale, it will still be released under the same license
* I have yet to make any major changes
* The changes I have made are mostly cosmetic
* The current version is still beta, so you'll have to allow more time before its declared stable
* I intend on making further changes when I have a little more time in the next few weeks
* Your feedback is important, without it I would be unable to identify and confirm issues
* You can follow and submit issues here: http://code.google.com/p/rss-synd/issues/list

For the record: None of my scripts are for sale, however I do accept donations. So, if you like what I do, donate and I'll keep doing it.
r
romprod
Halfop
Posts: 49
Joined: Fri Oct 19, 2001 8:00 pm

Post by romprod »

Ah good OK, I was worried that I was the only one with this issue!
r
romprod
Halfop
Posts: 49
Joined: Fri Oct 19, 2001 8:00 pm

Post by romprod »

It seesm the script only picks up a new news article if it's the very first one in the rss feed.

http://newsrss.bbc.co.uk/rss/sportonlin ... ll/rss.xml
Has the articles randomly inserted all over the place.

http://www.telegraph.co.uk/sport/footba ... league/rss
Seems to be better but still has a few that are randomly inserted.

Does this make sense?
F
Fraud
Op
Posts: 101
Joined: Mon May 19, 2008 7:57 am

Post by Fraud »

Is it possible to add Channelmodes like +m-c to specific RSS Feed triggers?

If a user types, e.g.: !rss
the channel mode will be set, the RSS Feed will be posted and the modes will be unset.
Thanks
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I was checking the source code in version 0.4 to give you an answer and stumbled on this:

Code: Select all

foreach msg $msgs {
		foreach chan $targets {
			if {([catch {botonchan $chan}] == 0) || \
			    ([regexp -- {^[#&]} $chan] == 0)} {
				foreach line [split $msg "\n"] {
					if {($type == 1) || ($type == 3)} {
						putserv "NOTICE $chan :$line"
					} else {
						putserv "PRIVMSG $chan :$line"
					}
				}
			}
		}
	}
Questions to author:
1. Why do you loop so many times to check the destination?

2. You started using a namespace but then you seem to have changed your mind and call your functions on a 'static' manner. In this case, what's the point on having the namespace if you aren't fully using it?

3. I'm not very good with 'regexp' but what is that regexp -- {^[#&]} $chan] supposed to do in there? Filter the destination??
Once the game is over, the king and the pawn go back in the same box.
s
scotteh
Halfop
Posts: 50
Joined: Sun Jan 29, 2006 12:43 am

Post by scotteh »

1) Just sends individual messages to each destination.
2) Could you give me an example?
3) Checks the first character of the destination. That whole statements makes sure for each destination that it is either a channel of some sort and the bot is joined or it's a nick. Stops the bot sending messages to channels it's not on.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

1. Haven't checked how it works so, do you grab multiple RSS Feeds at a time and this way you keep track of who requested what and where?

If no, what the point with 3 loops just to figure out the destination. Why not store it in a variable with the requested RSS Feed or something?

2. A function inside a namespace can be easily called by another function inside the same namespace just like them wouldn't be inside one.

3. Why not stick with 'botonchan' then? Besides, if the '$chan' is not a valid channel it should bitch about it if I'm not mistaken.
Once the game is over, the king and the pawn go back in the same box.
s
scotteh
Halfop
Posts: 50
Joined: Sun Jan 29, 2006 12:43 am

Post by scotteh »

1) Yep, multiple feeds are fetched at the same time asynchronously. The feeds config is passed along to the rest of the functions.

Only one loop is and for destination and they're calculated each time because it's possible the bot has changed the channels it's on.

Probably would make more sense to move the destination loop to be the outer most loop, but it's much of a muchness.

2) You're refering to functions being called in the format of [namespace current]::function? I wouldn't call this static, it's just makes it more exact on whats being called and removes any ambiguity.

3) The regexp is used to find out if its a nickname. Taking this out would remove intended functionality.
r
romprod
Halfop
Posts: 49
Joined: Fri Oct 19, 2001 8:00 pm

Post by romprod »

Is it possible to fix the issue with it only reporting a new news feed when it's the first one in the RSS feed? For example it won't announce a new news article if it's been inserted further down into the RSS feed.
K
Kraziee
Voice
Posts: 2
Joined: Tue Jan 18, 2011 1:00 pm

Post by Kraziee »

Hello!
awesome script!
but it dosent auto announce, or it does but 5-10 hours to late:/

“update-interval” 2
“timeout” 60000
Post Reply