What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Web services plugin [DEV/BETA]

Pages: (7): « First [ 1 ] 2 3 4 5 » Last »
Web services plugin [DEV/BETA]
Author: Message:
Yousef
Full Member
***

Avatar
(previously known as Juzzi)

Posts: 487
Reputation: 19
35 / Male / Flag
Joined: Jul 2004
O.P. Wink  Web services plugin [DEV/BETA]
Well, after I saw Sprinkles' idea about web services, I started coding.
The idea of this plugin is to easily share information from the net with your contacts. For example, by typing "/xparse quote einstein" some quotes of einstein will be sended automatically.
Inspired by TB's talkers I decided to make it a very flexible plugin. People can make scripts to handle different websites. The plugin creates a Microsoft XML Domdocument object from a given url, and then the script can filter out the necessary information. Instead of talkers, I call these scripts 'parsers'. At the moment I created 4 different parsers:
  • News parser, grabs the latest news headers from cnn
  • Quote parser, grabs the Quotes of the Day from quotationspage.com, or searches for quotes when an argument is supplied
  • Family guy quote parser, send random quotes from 'The family guy' to your contacts
  • Msgweb news parser, quite useless maybe, but it gets the latest news from my website
  • Azlyrics.com parser, search for lyrics
  • dictionary.com, get the meaning of a word...
  • Parser for http://www.timeanddate.com/worldclock/ to get the current time in all big cities

For now I didn't make a dll yet, so I can't upload a plugin version, but here is a screenshot of the config window. It clearly illustrates the use of the plugin:

[Image: attachment.php?pid=377804]

I'd like to know
  • what you think of this idea.
  • what features you'd like to see in the final version.
  • what parsers you think would be useful.
  • who's interested in developing parsers
  • what would be a good name for the plugin ;)

For the scripters, here is the source of the quote parser (quote.vbs)
code:
sub info() 'purpose: give the config screen all the parser info
    engine.description = "Share more than 20,000 famous quotes with your contacts"
    engine.help = "This parser gets the quotes from http://www.quotationspage.com. When you don't supply a parameter the parser will show you the quotes of the day. Otherwise it'll do a search for the supplied text."
    engine.syntax = "<search (optional)>"
end sub

sub run()
    if trim(engine.argument) <> "" then
        url = "http://www.quotationspage.com/search.php3?homesearch=" & trim(engine.argument)
    else
        url = "http://www.quotationspage.com/qotd.html"
    end if
    engine.getXML cstr(url), "parse", true
end sub

'There is a regularity in the source code of the website:
'all quotes are between <dt> tags
'all authors are between <dd> tags, and are shown bold (with a <b> tag)
'with this information we can make the follow code:
'note that the xml object is data.xml

sub parse(xml) 'purpose: filter the xmlobject
    i = 0
    for each item in xml.getElementsByTagName("dt")
        if str = "" then
            str = item.Text & vbcrlf & "---" & xml.getElementsByTagName("dd").item(i).getElementsByTagName("b").item(0).text
        else
            str = str & vbcrlf & vbcrlf & item.Text & vbcrlf & "---" & xml.getElementsByTagName("dd").item(i).getElementsByTagName("b").item(0).text
        end if
        i = i + 1
    next
    engine.output cstr(str)
end sub

As you can see it ain't that much code to handle a single website...

Let me hear what you think

edit: Installer link:
http://shoutbox.menthix.net/attachment.php?pid=379120

API Tutorial link:
http://www.msgweb.nl/en/MEWS/tutorial.php


.png File Attachment: screen1.PNG (23.06 KB)
This file has been downloaded 970 time(s).

This post was edited on 02-13-2005 at 07:58 PM by Yousef.
Developer of BuddyFuse: Google Talk, Twitter and Hyves in Windows Live Messenger
Ex-Microsoft intern and Windows Live Developer MVP in 2007 & 2008
02-09-2005 10:18 PM
Profile E-Mail PM Web Find Quote Report
jameslives
Full Member
***

Avatar

Posts: 232
Reputation: 3
Joined: Aug 2004
RE: Web services plugin [DEV]
this plugin would be great!
and what about a world clock?
could you put one on
[Image: jmzsigsmall3dd.gif]
02-10-2005 01:37 PM
Profile PM Find Quote Report
user27089
Disabled Account


Posts: 6321
Joined: Nov 2003
Status: Away
RE: Web services plugin [DEV]
That looks amazing, seriously... looks like lotsa code will be needed :p.
02-10-2005 01:39 PM
Profile PM Find Quote Report
SilentRevolution
New Member
*


Posts: 11
– / Male / –
Joined: Feb 2005
RE: Web services plugin [DEV]
looks pretty cool..i like it
02-10-2005 02:03 PM
Profile E-Mail PM Find Quote Report
Yousef
Full Member
***

Avatar
(previously known as Juzzi)

Posts: 487
Reputation: 19
35 / Male / Flag
Joined: Jul 2004
O.P. RE: Web services plugin [DEV]
thx for your reactions, I just made a parser for azlyrics.com and dictionary.com. I'll now work on the "parser api" documentation and then upload a test version ;)

edit:
quote:
Originally posted by jameslives
this plugin would be great!
and what about a world clock?
could you put one on
Just made one for http://www.timeanddate.com/worldclock/, it took me only five minutes with the 'api' :o).  Maybe quite useless to get it from a website, because you could get the times straight from your own computer I guess. But it will be a nice example parser.

This post was edited on 02-10-2005 at 02:39 PM by Yousef.
Developer of BuddyFuse: Google Talk, Twitter and Hyves in Windows Live Messenger
Ex-Microsoft intern and Windows Live Developer MVP in 2007 & 2008
02-10-2005 02:27 PM
Profile E-Mail PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: Web services plugin [DEV]
yea this looks great it looks like a lot of works gone into it.   Is there going to be some form of online database where people can upload there parsers for other people to access.  Then you could maybe have a 'Check for New Parses' button in the plugin.
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
02-10-2005 03:00 PM
Profile E-Mail PM Web Find Quote Report
Yousef
Full Member
***

Avatar
(previously known as Juzzi)

Posts: 487
Reputation: 19
35 / Male / Flag
Joined: Jul 2004
O.P. RE: Web services plugin [DEV]
I'll make a parser database at my website http://www.msgweb.nl
Developer of BuddyFuse: Google Talk, Twitter and Hyves in Windows Live Messenger
Ex-Microsoft intern and Windows Live Developer MVP in 2007 & 2008
02-10-2005 03:04 PM
Profile E-Mail PM Web Find Quote Report
user27089
Disabled Account


Posts: 6321
Joined: Nov 2003
Status: Away
RE: Web services plugin [DEV]
Sounds cool, how will people make the parsers?
02-10-2005 03:05 PM
Profile PM Find Quote Report
jameslives
Full Member
***

Avatar

Posts: 232
Reputation: 3
Joined: Aug 2004
RE: Web services plugin [DEV]
quote:
Originally posted by noelie


edit:
quote:
Originally posted by jameslives
this plugin would be great!
and what about a world clock?
could you put one on
Just made one for http://www.timeanddate.com/worldclock/, it took me only five minutes with the 'api' :o).  Maybe quite useless to get it from a website, because you could get the times straight from your own computer I guess. But it will be a nice example parser.

great!
I wonder what you could call it
[Image: jmzsigsmall3dd.gif]
02-10-2005 03:06 PM
Profile PM Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: Web services plugin [DEV]
quote:
Originally posted by traxor
Sounds cool, how will people make the parsers?
Well i dont think they'ree need a dedicated program as its seems to be just a simple script, but saying that i spose a little prog to help could make it even easier to make them
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
02-10-2005 03:10 PM
Profile E-Mail PM Web Find Quote Report
Pages: (7): « First [ 1 ] 2 3 4 5 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On