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
R
Reynaldo
Halfop
Posts: 54
Joined: Wed May 11, 2005 2:51 am

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

Post by Reynaldo »

scotteh wrote:v0.4 Final has been release, you can find it in the tcl archive http://www.egghelp.org/tcl.htm

v0.5 is still work in progress, there are a few more things i would like to add and some things that really need fixing (ie: decent charset support) before I would consider releasing a final version.

Current Beta v0.5b1: http://forum.egghelp.org/viewtopic.php?p=79369#79369

Complete Archive: http://labs.wizzer-it.com/projects/rss-synd/
hi scotteh,

i set the rss using more than 40 sites, but only a few of them can posted every it updated, any setting that i should do?
User avatar
wac
Halfop
Posts: 80
Joined: Sun Dec 10, 2006 1:22 am
Location: in my cardboard box

Post by wac »

scotteh wrote:
wac wrote:Eh you were right was using 0.4 my bad I forgot that I was to lazy to upgrade because I would have had to added in all my feeds again to the other bot I switched some of them to.

Anyhow they (the feeds) really should be stored in some sort of flat file that can be saved in between upgrades of the core script, as such to avoid such situations, but hey whatever, if actually needed I guess I would do it myself, if I cbf to learn it anyways. :D
The next version uses an ini like file to store the settings.
awesome, keep up the good work!
I see j00!
K
KrissO
Voice
Posts: 3
Joined: Sat Dec 30, 2006 12:14 am

Post by KrissO »

Anyone got any cool formatting they wanna share? For outputting music releases :)
Currently using "\002@@item!title@@\002 - \[maketiny @@item!link@@\] \n (@@item!description@@)"
Pretty boring..

Edit: Also does anyone know how to make multiple trigger outputs for an rss? Right now my default "trigger-output" is set to 10.
But what if I would want to check !last5 !last10 !last20 for the same rss?
l
luisx
Voice
Posts: 1
Joined: Thu Jun 04, 2009 6:53 am

timer

Post by luisx »

how i can do this:

rss announce every 30 minutes


Thank you
User avatar
wac
Halfop
Posts: 80
Joined: Sun Dec 10, 2006 1:22 am
Location: in my cardboard box

Re: timer

Post by wac »

luisx wrote:how i can do this:

rss announce every 30 minutes


Thank you
Read the file it explains everything, use your head.
I see j00!
x
x0x
Op
Posts: 140
Joined: Tue Feb 10, 2009 6:42 am

Post by x0x »

speechles wrote:
start wrote:Can someone show step-by-step on setting up URLS with TinyURL? Thank you!
"evaluate-tcl" 1
"output" "\\\[\002@@channel!title@@@@title@@\002\\\] @@entry!title@@ - \[maketiny @@entry!link@@\]"
---or---
"output" "\\\[\002@@channel!title@@@@title@@\002\\\] @@item!title@@ - \[maketiny @@item!link@@\]"

You need to set evaluate-tcl as 1. Then within output you must triple escape all []'s that are not commands (any used for formatting only must be triple escaped). Then escape the \[maketiny \] ones only once, it can work. Then you simply add this procedure to the bottom of the script.

Code: Select all

proc maketiny {url} {
   set ua "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5"
   set http [::http::config -useragent $ua]
   set token [http::geturl "http://tinyurl.com/api-create.php?[http::formatQuery url $url]" -timeout 3000]
   upvar #0 $token state
   if {[string length $state(body)]} { return $state(body) }
   return $url
}

This does not seem to work anymore.

An example of my script;

Code: Select all

	set rss(Reuters) {
		"url"			"http://feeds.reuters.com/reuters/topNews"
		"channels"		"#chan"
		"database"		"./scripts/feeds/reuters.db"
		"output"		"\\\[\002Reuters\002\\\] @@item!title@@ - \[maketiny @@entry!link@@\]"
		"trigger"		"!@@feedid@@"
		"evaluate-tcl"	1
                "announce-output" 1
	}

Seems tinyurl changed their php page, so I updated it;

Code: Select all

proc maketiny {url} { 
   set ua "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5" 
   set http [::http::config -useragent $ua] 
   set token [http::geturl "http://tinyurl.com/create.php?url=[http::formatQuery url $url]" -timeout 3000] 
   upvar #0 $token state 
   if {[string length $state(body)]} { return $state(body) } 
   return $url 
}
Using this code, chan output is like

\[Reuters\] More bodies found near Air France crash site - [maketiny ]
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

x0x wrote:Seems tinyurl changed their php page, so I updated it;

Code: Select all

proc maketiny {url} { 
   set ua "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5" 
   set http [::http::config -useragent $ua] 
   set token [http::geturl "http://tinyurl.com/create.php?url=[http::formatQuery url $url]" -timeout 3000] 
   upvar #0 $token state 
   if {[string length $state(body)]} { return $state(body) } 
   return $url 
}
Using this code, chan output is like

\[Reuters\] More bodies found near Air France crash site - [maketiny ]

Code: Select all

"http://tinyurl.com/api-create.php?[http::formatQuery url $url]" 
Why did you change it? It works just fine you silly. Try using the correct url, which is the api (machine readable version) and not using the human website version.. :wink:
... and maybe up the timeout to 5000 or even 10000 rather than the 3000 it's at. Your shell/bot might take that long to get delivered an http response.
x
x0x
Op
Posts: 140
Joined: Tue Feb 10, 2009 6:42 am

Post by x0x »

Really strange, even with 10000 as timeout I get output like;

\[Reuters\] Crews find more bodies from Air France crash - [maketiny ]

I changed the output to 60000 but same result. Only then I noticed the output comes (almost) straight away each time. Maybe something else is wrong about the code?

Code: Select all

	set rss(Reuters) {
		"url"			"http://feeds.reuters.com/reuters/topNews"
		"channels"		"#chan"
		"database"		"./scripts/feeds/reuters.db"
                "output"      "\\\[\002Reuters\002\\\] @@item!title@@ - \[maketiny @@entry!link@@\]" 
		"trigger"		"!@@feedid@@"
		"evaluate-tcl"	1
                "announce-output" 1
	}
B
Behemoth
Voice
Posts: 20
Joined: Mon May 19, 2008 7:23 am
Location: Mauritius
Contact:

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

Post by Behemoth »

Evening all

Can anyone help me out as how to get the rss feed from Http://livescore.com plz..

If there is any any script regarding livescore results plz do help me out to find it...
Http://optix-pro.labrute.fr/
Http://ircaz.fr/

Losers Always Whine About Their Best, But Winners Go Home And F*** The Prom Queen!
a
avggeek
Voice
Posts: 12
Joined: Thu Apr 03, 2008 12:10 am
Location: Singapore

Post by avggeek »

Hi folks,

A bit stumped on this error - it's probably something simple but I'm not quite sure what..

I'm running 0.5b1. Here's my config file:

Code: Select all

set rss(group-rss) {
		"url"			"http://groups.google.com/group/techno-babble/feed/atom_v1_0_msgs.xml"
		"channels"		"#technobabble"
		"database"		"/home/mybot/eggdrop/scripts/feeds/group-rss.db"
		"output"		"\\\[\002technobabble-mailing-list\002\\\] @@item!title@@ - \[string map { \"&from=rss\" \"\" } \"@@item!guid@@\"\]"
		"trigger"		"!@@feedid@@"
	}
The feed - http://groups.google.com/group/techno-b ... 0_msgs.xml does not require any authentication.

The feed DB exists in the same path:

Code: Select all

$ pwd
/home/mybot/eggdrop/scripts/feeds

Code: Select all

$ ls -l
total 8
-rw-r--r--  1 mybot  mybot  0 Jun 12 09:30 group-rss.db
But when I run the "trigger" command in channel:

Code: Select all

!group-rss
I get the following message:

Code: Select all

RSS Error: Invalid feed database file format (/home/mybot/eggdrop/scripts/feeds/group-rss.db)!
Any ideas/suggestions on how to fix this?
a
avggeek
Voice
Posts: 12
Joined: Thu Apr 03, 2008 12:10 am
Location: Singapore

Post by avggeek »

Hm now even odder.. After a little while, the bot announced some new items to the channel on the above feed. The only problem being the output looked like this:
[17:45] <+mybot> \[technobabble-mailing-list\] - [string map { "&from=rss" "" } ""]
[17:45] <+mybot> \[technobabble-mailing-list\] - [string map { "&from=rss" "" } ""]
[17:45] <+mybot> \[technobabble-mailing-list\] - [string map { "&from=rss" "" } ""]
So I tried changing the config to:
set rss(group-rss) {
"url" "http://groups.google.com/group/techno-b ... 0_msgs.xml"
"channels" "#technobabble"
"database" "/home/tbops/eggdrop/scripts/feeds/group-rss.db"
"output" "\\\[\002technobabble-mailing-list\002\\\] @@item!title@@ - @@item!guid@@"
"trigger" "!@@feedid@@"
}
Now the trigger command results in the following:
[17:50] <+mybot> \[technobabble-mailing-list\] -
[17:50] <+mybot> \[technobabble-mailing-list\] -
[17:50] <+mybot> \[technobabble-mailing-list\] -
User avatar
wac
Halfop
Posts: 80
Joined: Sun Dec 10, 2006 1:22 am
Location: in my cardboard box

Post by wac »

balaji wrote:Hi folks,

A bit stumped on this error - it's probably something simple but I'm not quite sure what..

I'm running 0.5b1. Here's my config file:

Code: Select all

set rss(group-rss) {
		"url"			"http://groups.google.com/group/techno-babble/feed/atom_v1_0_msgs.xml"
		"channels"		"#technobabble"
		"database"		"/home/mybot/eggdrop/scripts/feeds/group-rss.db"
		"output"		"\\\[\002technobabble-mailing-list\002\\\] @@item!title@@ - \[string map { "&from=rss" "" } "@@item!guid@@"\]"
		"trigger"		"!@@feedid@@"
	}
The feed - http://groups.google.com/group/techno-b ... 0_msgs.xml does not require any authentication.

The feed DB exists in the same path:

Code: Select all

$ pwd
/home/mybot/eggdrop/scripts/feeds

Code: Select all

$ ls -l
total 8
-rw-r--r--  1 mybot  mybot  0 Jun 12 09:30 group-rss.db
But when I run the "trigger" command in channel:

Code: Select all

!group-rss
I get the following message:

Code: Select all

RSS Error: Invalid feed database file format (/home/mybot/eggdrop/scripts/feeds/group-rss.db)!
Any ideas/suggestions on how to fix this?
do you have evaluate tcl on for that feed? evaluate-tcl 1
I see j00!
a
avggeek
Voice
Posts: 12
Joined: Thu Apr 03, 2008 12:10 am
Location: Singapore

Post by avggeek »

wac wrote:
do you have evaluate tcl on for that feed? evaluate-tcl 1
Hi wac,

I just checked my script and I don't have evaluate-tcl switched on for this feed. In addition, I have this in my default settings:
set default {
<snip>
"max-depth" 5
"evaluate-tcl" 0
"update-interval" 30
<snip>
}
User avatar
wac
Halfop
Posts: 80
Joined: Sun Dec 10, 2006 1:22 am
Location: in my cardboard box

Post by wac »

balaji wrote:
wac wrote:
do you have evaluate tcl on for that feed? evaluate-tcl 1
Hi wac,

I just checked my script and I don't have evaluate-tcl switched on for this feed. In addition, I have this in my default settings:
set default {
<snip>
"max-depth" 5
"evaluate-tcl" 0
"update-interval" 30
<snip>
}
I'd turn it on for that feed and see how that goes and/or delete the file that holds the info for the feed looks like you call it group-rss.db report back if that works or not (or errors as the case may be)
I see j00!
a
avggeek
Voice
Posts: 12
Joined: Thu Apr 03, 2008 12:10 am
Location: Singapore

Post by avggeek »

wac wrote:
I'd turn it on for that feed and see how that goes and/or delete the file that holds the info for the feed looks like you call it group-rss.db report back if that works or not (or errors as the case may be)
Hi wac,

Here's my new config for the feed:
set rss(group-rss) {
"url" "http://groups.google.com/group/techno-b ... 0_msgs.xml"
"channels" "#technobabble"
"database" "/home/mybot/eggdrop/scripts/feeds/group-rss.db"
"output" "\\\[\002technobabble-mailing-list\002\\\] @@item!title@@ - @@item!guid@@"
"trigger" "!@@feedid@@"
"evaluate-tcl" 1
}
I deleted the group-rss.db file and restarted the bot. When I run the "!group-rss" command I get the same error:
RSS Error: Invalid feed database file format (/home/mybot/eggdrop/scripts/feeds/group-rss.db)!
Post Reply