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]

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 949 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
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Web services plugin [DEV/BETA] - by Yousef on 02-09-2005 at 10:18 PM
RE: Web services plugin [DEV] - by jameslives on 02-10-2005 at 01:37 PM
RE: Web services plugin [DEV] - by user27089 on 02-10-2005 at 01:39 PM
RE: Web services plugin [DEV] - by SilentRevolution on 02-10-2005 at 02:03 PM
RE: Web services plugin [DEV] - by Yousef on 02-10-2005 at 02:27 PM
RE: Web services plugin [DEV] - by Dempsey on 02-10-2005 at 03:00 PM
RE: Web services plugin [DEV] - by Yousef on 02-10-2005 at 03:04 PM
RE: Web services plugin [DEV] - by user27089 on 02-10-2005 at 03:05 PM
RE: Web services plugin [DEV] - by jameslives on 02-10-2005 at 03:06 PM
RE: Web services plugin [DEV] - by Dempsey on 02-10-2005 at 03:10 PM
RE: Web services plugin [DEV] - by Yousef on 02-10-2005 at 03:13 PM
RE: Web services plugin [DEV] - by Dempsey on 02-10-2005 at 03:17 PM
RE: Web services plugin [DEV] - by Yousef on 02-10-2005 at 03:23 PM
RE: Web services plugin [DEV] - by user27089 on 02-10-2005 at 03:24 PM
RE: Web services plugin [DEV] - by Yousef on 02-10-2005 at 03:26 PM
RE: Web services plugin [DEV] - by sprinkles on 02-10-2005 at 11:17 PM
RE: Web services plugin [DEV] - by (CyBeRDuDe) on 02-11-2005 at 09:28 AM
RE: Web services plugin [DEV] - by John Anderton on 02-11-2005 at 10:19 AM
RE: Web services plugin [DEV] - by user27089 on 02-11-2005 at 10:20 AM
RE: Web services plugin [DEV] - by Dempsey on 02-11-2005 at 10:26 AM
RE: Web services plugin [DEV] - by user27089 on 02-11-2005 at 10:29 AM
RE: RE: Web services plugin [DEV] - by Yousef on 02-11-2005 at 11:06 AM
RE: Web services plugin [DEV] - by Dempsey on 02-11-2005 at 11:13 AM
RE: Web services plugin [DEV] - by user27089 on 02-11-2005 at 11:25 AM
RE: Web services plugin [DEV] - by Yousef on 02-11-2005 at 12:09 PM
RE: Web services plugin [DEV] - by user27089 on 02-11-2005 at 12:10 PM
RE: Web services plugin [DEV] - by Yousef on 02-11-2005 at 12:15 PM
RE: Web services plugin [DEV] - by user27089 on 02-11-2005 at 12:19 PM
RE: Web services plugin [DEV] - by Dempsey on 02-11-2005 at 12:28 PM
RE: Web services plugin [DEV] - by Yousef on 02-11-2005 at 12:35 PM
RE: Web services plugin [DEV] - by sprinkles on 02-11-2005 at 01:06 PM
RE: Web services plugin [DEV] - by Dempsey on 02-11-2005 at 02:41 PM
RE: Web services plugin [DEV] - by Yousef on 02-11-2005 at 03:17 PM
RE: Web services plugin [DEV] - by jameslives on 02-12-2005 at 10:02 AM
RE: Web services plugin [DEV] - by Yousef on 02-12-2005 at 12:30 PM
RE: Web services plugin [DEV] - by Eljay on 02-12-2005 at 12:44 PM
RE: Web services plugin [DEV] - by user27089 on 02-12-2005 at 03:04 PM
RE: Web services plugin [DEV] - by crank on 02-12-2005 at 03:37 PM
RE: Web services plugin [DEV] - by Yousef on 02-12-2005 at 03:50 PM
RE: Web services plugin [DEV] - by TGG on 02-12-2005 at 07:11 PM
RE: Web services plugin [DEV] - by jameslives on 02-13-2005 at 12:58 PM
RE: Web services plugin [DEV] - by Yousef on 02-13-2005 at 01:05 PM
RE: Web services plugin [DEV] - by Eljay on 02-13-2005 at 01:16 PM
RE: Web services plugin [DEV/BETA] - by Yousef on 02-13-2005 at 07:57 PM
RE: Web services plugin [DEV/BETA] - by leito on 02-13-2005 at 08:27 PM
RE: Web services plugin [DEV/BETA] - by Yousef on 02-13-2005 at 09:18 PM
RE: Web services plugin [DEV/BETA] - by OWNd742 on 02-13-2005 at 10:11 PM
RE: Web services plugin [DEV/BETA] - by Tochjo on 02-13-2005 at 10:34 PM
RE: Web services plugin [DEV/BETA] - by OWNd742 on 02-13-2005 at 10:47 PM
RE: Web services plugin [DEV/BETA] - by Concord Dawn on 02-13-2005 at 11:59 PM
RE: Web services plugin [DEV/BETA] - by (CyBeRDuDe) on 02-14-2005 at 12:43 AM
RE: Web services plugin [DEV/BETA] - by Yousef on 02-14-2005 at 06:30 AM
RE: Web services plugin [DEV/BETA] - by xsRush on 02-14-2005 at 10:08 AM
RE: Web services plugin [DEV/BETA] - by KeyStorm on 02-14-2005 at 10:17 AM
RE: Web services plugin [DEV/BETA] - by Yousef on 02-14-2005 at 04:10 PM
RE: Web services plugin [DEV/BETA] - by jameslives on 02-14-2005 at 04:28 PM
RE: Web services plugin [DEV/BETA] - by Concord Dawn on 02-14-2005 at 04:32 PM
RE: Web services plugin [DEV/BETA] - by Yousef on 02-15-2005 at 07:20 PM
RE: Web services plugin [DEV/BETA] - by jameslives on 02-16-2005 at 04:44 PM
RE: Web services plugin [DEV/BETA] - by TGG on 02-16-2005 at 05:22 PM
RE: Web services plugin [DEV/BETA] - by Yousef on 02-16-2005 at 05:35 PM
RE: Web services plugin [DEV/BETA] - by riahc4 on 02-16-2005 at 11:38 PM
RE: Web services plugin [DEV/BETA] - by Yousef on 02-17-2005 at 06:18 AM
RE: Web services plugin [DEV/BETA] - by Sypher on 02-18-2005 at 11:54 AM
RE: Web services plugin [DEV/BETA] - by Yousef on 02-18-2005 at 02:06 PM
RE: RE: Web services plugin [DEV/BETA] - by Sypher on 02-18-2005 at 03:33 PM
RE: Web services plugin [DEV/BETA] - by Dempsey on 02-18-2005 at 02:10 PM


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