Jump to content

News, Weather, Stock Quotes in FileMaker [Finished-8]


This topic is 5690 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Solution / : News, Weather, Stock Quotes in FileMaker

Description: This is a FileMaker file that demonstrates how you can pull data from various XML sources on the web. Very ideal for building a portal type solution in FileMaker. It uses only FileMaker's built in XML capabilites (no plug-ins). This file is free and open source.

http://www.swconsulting.com/whatwedo/filemaker/index.asp

Working Under: 8

Solution Status: Finished

Pre-requisites: Connection to Internet

Author(s): Ben Goldstein

Date: 05/09/06

Credits: Steve Wilmes Consulting, Inc.

Instructions / Other Info:

Disclaimer:

FM Forums does not endorse or warrantee these files are fit for any particular purpose. Do not post or distribute files without written approval from the copyright owner. All files are deemed public domain unless otherwise indictated. Please backup every file that you intend to modify.

Link to comment
Share on other sites

  • Newbies

great stuff ben,

just wondering ... if i wanna pull non-xml data, how would i be able to do that ?

for example under this link :

http://moneycentral.msn.com/investor/research/profile.asp?Symbol=YHOO

i wanna pull the data of "StockScouter Rating" for stock YAHOO and publish it onto filemaker 8, how can i do it ?

what i want to do is to pull data from multiple sites and display it on 1 screen within filemaker ... have been cracking my head on this ...

appreciate if you could kindly shed some lights on this ...

many thanx

stonecold

Link to comment
Share on other sites

Think your best (only?) option is if you don't have xml to use one of the plug-ins (such as Troi's url grabber or New Millennium's MediaManager) to pull that page into a field. Then parse it out using FileMaker text functions (position, middle etc..) to grab just the stock scouter rating into a field on its own.

Link to comment
Share on other sites

I've done something like this, using Applescript and command line tools in Mac OS X, to get the raw source HTML of the page, then find and cut the pieces I needed (curl, grep, cut).

I imagine similar is available in Windows, but you may have to go get them. Do a search for "wget" in Google; and go get the shell plug-in at http://www.abstrakt.com/

It works well if you only need some pieces, especially if they are either uniquely identified, or in a particular location (and most things are, at least until they redesign the page). In this case you'd be looking for this chunk of data, which is unique on the page:

StockScouter Rating

5

The only tricky bit above is that the stock symbol is in the line. So you'd need to either include it in your search, or use wildcards (regular expressions) to ignore it.

That line could also be fairly easily found and parsed using Filemaker text functions. So all you'd need to do is get the source HTML and pull out that chunk.

Link to comment
Share on other sites

  • Newbies

thanx fenton for your input ...

i've downloaded shell from http://www.abstrakt.com/ ... this zip file consists of 3 files, a howto.pdf file, a shell.fp5 and a shell.fmx ... according to howto.pdf, the instruction is to copy this shell.fmx to extension folder of filemaker of which i've done ...

also, the shell does not have cut, grep etc command when i type "help" from within the shell.fp5 (i'm using fmp 8, so when i loaded shell.fp5, i converted it to fmp 8) ...

next, have downloaded the wget ... tried to retrieve a sample html from web and it did it's job ...

but how do i integrate the filemaker, shell & wget ? i suppose filemaker need to call the shell to execute some command from downloaded html (using wget) ... so how do i get filemaker to call the shell command ?

appreciate your advise ...

cheers

Edited by Guest
Link to comment
Share on other sites

Abstrakt's Shell is a FileMaker plug-in. So you'd use it within FM. It has an example file. You just type the command and get the result. I've not used "wget" on Windows, I just know it exists. Once installed, I think you'd just type its command into the field in the Shell example file, and you'd get the results in the result field.

I also don't know what the equivalent of "grep" or "cut" is on Windows, or whether it's pre-installed. But I think you could just use FM text functions to get that one piece of data you want, because the line it's on has unique words in it.

Ino, I don't know whether "wget" is available for Mac. It looks about the same as "curl", which is built-in, so I don't see that it's needed.

On a Mac you don't really need to use the Shell plug-in, as you can call command line via AppleScript, using: do shell script. It may be easier however to use the Shell plug-in, and write command line code directly into a FM field. Because when you use AS and do shell script you have to escape special characters for BOTH AS and Unix, sometimes a mishmash.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.