Universal Data Fetcher - Weather monitor, minus the weather
Started by mark76uk


Rate this topic
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


4 posts in this topic
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
02-20-2003, 07:38 PM -
#1
This builds on original suggestions by Shapeshifter. It's a statuesque kinda idea which could benefit from having an entire seperate section in the forum!

I agree strongly with this proposal, which is why I've created this big post. No work tomorrow, so here goes Wink It's my belief that this could be *the* plugin for True Launch Bar. To be able to suck in *any* data and have it represented on the desktop would be an awesome addition - increasing the power of True Launch Bar by a large factor.



***Reading files and interaction with other programs***
shapeshifter Wrote:So here's my idea,along the same lines: essentially, take the weather monitor model and expand it. The provider file would define variables extracted from practically any unformated text file format (TXT, HTML, INI, etc).
I agree, the ability to read local files as well as websites would be useful. TLB could then report the output of any text-file-generation-capable tool like Perfect Keyboard macros, Winamp plugins or The Bat email program. Aswell, perhaps stuff like filesize and whether a file exists could be useful.

If the plugin could run external programs before grabbing data, then they could be enlisted to process and prepare data for TLB display. This would go a long way to adding flexibility. Even something as simple as running a batch script to join several files may one day solve someone a big headache.

See this example from the interface of Personal Hit List (a Winamp plugin.)

[Image: personalhitlist_runbeforepublish.gif]



***The need for a Macro Language***
A simple macro language would bring a strong benefit to the plugin. Anyone who doesn't know what a macro is, see this snapshot of a Log Monitor configuration screen:-

Here, files are being copied with a name that includes the current time and date. This is a macro, where %SysDate% represents the time and date.. like in Weather Monitor %Conditions% represents "Sunny", "Cloudy", etc
[Image: logmonitor_useofmacros.gif]

shapeshifter Wrote:These variables could be text or images, and you could change one into the other - turning "Sunny" into "sunny.gif" for example.

This could most easily be done with a macro. Here is an example skin file:-
Code:
Icon = %Conditions%.gif

Another good example would be to solve the current problem of Weather Monitor showing a blazing sun icon, day or night. Here is a simple intelligent skin.
Code:
[default icons]
IF (%_CurrentTime_Hour_24% > 19) OR (%_CurrentTime_Hour_24% < 6)
{
  Sun = clearmoon.png
  Clouds = cloudymoon.png
  Lightning = stormynight.png
}
ELSE
{
  Sun = sunnyday.png
  Clouds = cloudyday.png
  Lightning = stormyday.png
}
Size = 20 20
IconPos = 2 0
ShowTemperature = 1
TemperaturePos = 0 16
NumbersPic = small\numbers.png
FPic = small\d.png
CPic = small\d.png
It follows then, just with the information available from weatherunderground.com, that a more complex skin could be written, incorporating the phases of the moon, real life sunrise and sunset times, etc.

Of course, I'm just talking about that same old Weather Monitor stuff!! Using macro programming, any type of data that anyone wants on their desktop could be grabbed from a website and intricately represented.



***An interface to each skin***
shapeshifter Wrote:The skin file would then specify a provider file along with a default path to the text file (either web or local). Clicking the ">>" button would take you to that path either in the default web browser or file explorer, as appropriate, where you could browse to find your specific file, if necesary.

Ideally, the layout of the skin interface (what you see when you do 'right click > properties' over any plugin) could be defined in the skin. This way, everything you have suggested would be allowed for. What I mean, is that different types of input, like drop-down-menus, paths to files, text areas and radio buttons could be defined like in a HTML form. The skin would also give these elements default settings or text, and link them to feedback variables like %pathToFile% or %customTextHeading% - referenced by the skin itself.

Take this example from Perfect Keyboard, which I used to create a macro program for adding music clips to my website. A few lines of simple code cause Perfect Keyboard to generate the ideal interface for my purpose:-

Code:
<form_item>("songForm","Artist name","EDIT","","songFormArtist")
<form_item>("songForm","Song title","EDIT","","songFormTitle")
<form_item>("songForm","Song category","LIST","Acoustic > Bittersweet|Acoustic > Bright|Acoustic > Chilled|Alternative > Bittersweet|Alternative > Bright|Alternative > Direct|Alternative > Epic|Alternative > Stormy|Alternative > Volatile|Electronic > Bright|Electronic > Dark","songFormCategory")
<form_item>("songForm","","LINE","","")
<form_item>("songForm","MP3 download","LIST","As below|mp3.com/artistname|www.artistname.com","songFormDownload")
<form_item>("songForm","","EDIT","","songFormDownloadInput")
<form_item>("songForm","","LINE","","")
<form_item>("songForm","Artist info","LIST","As below|www.artistname.com","songFormInfo")
<form_item>("songForm","","EDIT","","songFormInfoInput")
<form_item>("songForm","","LINE","","")

[Image: perfectkeyboard_macrodefinedinterface.gif]

shapeshifter Wrote:The skin file should also define a default set of variables to be displayed, but you could change them if desired

Allowing a "skinned interface" and macro programming, data grabbing plugins could be created with great "openess" to the end user. Using the weather example, a plugin author might create a new tab in the interface where a user could customize every weather symbol by setting the file path for each. These end user changes would be reflected in the desktop appearance of the skin via variables like %pathToSunnyIcon%. This approach eliminates the need for non-technical users to delve into their "program files" folder to do customizations.

In my wind direction skin for Weather Monitor, I could create an interface input for setting the path to a background map graphic. At present, anyone installing this skin *must* delve into "program files" to swap the map.

[Image: windindicator_earlyversion.gif]



***Skinning the output***

shapeshifter Wrote:The plugin's size, general layout and images (sunny.gif = \images\small\clear.gif) would be defined in the skin file, but the skin file could also (possibly) allow the user to change the height, width, or both to better fit their taskbar or toolbar.

The goal would be to have one skin layout to fit all taskbar/toolbar sizes.

I'm not sure how the resizing could be accomplished in any way much different to now. That is, by offering a skin which alters itself to one or more popular dimensions (16x16, 32x32, 32x16, etc.) However, other details such as background colour would be much easier to choose via a customized interface.

shapeshifter Wrote:Each value area would be defined as two sets of coordinates representing the top left and bottom right of the rectangle. Positive values would be relative to the upper left corner of the plugin, negative values would be relative to the plugin's lower right corner, and values preceded with a "c" (as in "c5" or"c-12") would be relative to the plugin's center point.

The skin author could specify "best fit" instead of a font size in the skin file. The user should have the option to turn variable labels (also defined in the skin file) on or off for any given value (for example, putting "Humidity: " in front of the value contained in the variable for humidity").

Another option would be to set the scrolling speed (0 to disable) for values that don't fit in the alloted space

These seem like good options. Skin configuration should also allow for placement of multiple icons of varying sizes. The present TLB skinning standard seems half way to accomplishing this. Obviously well thought out, Yuri Smile

shapeshifter Wrote:images should probably be resized or stretched to fit

Not so sure about that Smile Are you forgetting what a stretched bitmap looks like? Imagine if website images stretched to fit the width of your screen - tiny pixelly interface elements are not going to look pretty.

shapeshifter Wrote:It would also be very nice to have user-definable actions on left and right clicks (defaults, naturally, defined in the skin file).

Yes, this would add a great deal of interactivity. Allowing for simple button actions, like in the winamp plugin would be a great start.

Perhaps some type of graphing function could also be included? What I mean is that data is sampled periodically from a website (or whatever) and graphed over time. E.G. a graph of temperatures sampled over the past 12 hours, so I know if it will be icy for riding my bike to work in the morning.



***The possibilities***

shapeshifter Wrote:Using this framework, the possibilities are almost endless. A few examples off the top of my head: news and stock tickers, an atomic clock, a plugin to monitor web pages and let the user know when they've been updated, current winamp song title, somebody else's current winamp song title, a webcam feed, weather and traffic conditions, current IP, and the list goes on and on.
and maybe...
Bank account and credit card balance.
Live train times.

shapeshifter Wrote:So Yuri, what do you think? It sounds like a lot of work, but a lot of it's already implemented in weather monitor 1.2, and you'd essentially be creating hundreds of plugins at once. But more importantly, you'd be distributing the ability to make future plugins to us non-plugin programmer types.

It could be *the* TLB plugin.

/Mark Smile




(Time for coffee now, phew.)
shapeshifter
Senior Member
****


0
658 posts 24 threads Joined: Sep 2002
02-20-2003, 08:18 PM -
#2
Sounds like a winner Big Grin It's sure got my vote.
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
02-20-2003, 08:42 PM -
#3
I think maybe the title of this topic "Universal Data Fetcher" underestimates the full potential of this plugin. As you say yourself, Mr. Shapeshifter:-

shapeshifter Wrote:you'd essentially be creating hundreds of plugins at once. But more importantly, you'd be distributing the ability to make future plugins to us non-plugin programmer types.

Great plugins could be made if a skin could include clickable buttons, and programs could be run from those buttons.
Q Section
Weapons Я Us
*****


0
899 posts 100 threads Joined: Feb 2003
02-20-2003, 09:42 PM -
#4
Woweee kazoweee, Mark! Why hold back - just let us have all of it! Just joking - it sure is a great idea to exploit the WB like that. We wish we could contribute like that. Albert Einstein once said, "Imagination is more important than knowledge." Let us see what we can imagine.

Yuri - how about a new thread section for these ideas about the "Universal Data Fetcher"? And....if you need a Beta Tester for all this....we are game.

HMSS Q Section
HMSS Q Section
click here for 30+ ideas from a Special Plugin List
some examples=
UV Index Monitor, Allergy Monitor, TLB Version Monitor, Cinema Monitor
Visualise World Righteousness
Semper Ad Fundum
Working for the Secret Intelligence Service


Forum Jump:


Users browsing this thread: 2 Guest(s)