It's baaack. :)
I have finally brought the plugin in line with the new version of the site (mostly just updating a few of the regular expressions). I will be adding new features soon, but this version will work well enough for now.
Here is the summary of the tag changes:
- Removed
MTBlogSharesTotalBonds
- Removed
MTBlogSharesTotalProjected
- Removed
MTBlogSharesTotalReal (long ago replaced by MTBlogSharesWorth)
- Added
MTBlogSharesCashBalance for total cash balance
- Added
MTBlogSharesTotalMarket for total market orders
- Added
MTBlogSharesTotalIdeas for total ideas commodities
Please refer to the documentation in the original MTBlogShares until I can write up something newer while I start adding features in the coming weeks.
Posted by rayners
| Comments (8)
| TrackBack
I've been pretty fascinated by what's going on at BlogShares lately, so I figured I'd write a little plugin I could use to access my blog's current value.
And here it is. It's not much of a plugin so far, it's mostly just a little hack to download the tracking page for the current (or a given) blog and throw a couple of perl patterns at the results to pull out the data.
Download one of the following files, unpack it, and place blogshares.pl in your plugins/ directory.
It provides the following tags:
- MTBlogShares
- container tag
- takes one optional argument, blog_url, to specify the url to check at BlogShares, which defaults to the url of the current blog
- MTBlogSharesPrice
- The blog's current stock price
- MTBlogSharesPE
- The blog's current P/E ratio
Usage Example:
<MTBlogShares>
Price: <MTBlogSharesPrice><br />
P/E Ratio: <MTBlogSharesPE><br />
</MTBlogShares>
Minor Update: (2003-04-02 13:54)
- Changed the behavior of MTBlogShares. If there is a problem contacting the BlogShares site, MTBlogShares now returns an empty string instead of erroring out. That should fix most people's problems with the plugin and the state of the site at the moment.
Update: (2003-04-04 13:46)
- I added a new container tag, MTBlogSharesUser, that can be used to access data for your account (instead of for your site). It takes one required argument, id, for your user id at BlogShares.
- Within MTBlogSharesUser, you can use the MTBlogSharesTotalPortfolio to access the total vaue of your portfolio.
- I may add other tags this weekend (including what stocks you own, etc), but that's a bit more of a hassle when you're just download a webpage. Hopefully Seyed and I can get the XML spec worked out this weekend, which would a) speed the use of the plugin up some, and b) give me very easy access to the data (instead of having to toss some regular expressions at an HTML page). Cross your fingers.
Usage Example
<MTBlogSharesUser id="1615">
My portfolio is worth $<MTBlogSharesTotalPortfolio>
</MTBlogSharesUser>
Update: (2003-04-20 00:25)
- Changes at BlogShares caused this plugin to break. I fixed it.
- I hope to be including support for some of the new features that Seyed has added recently.
Update: (2003-04-20 02:23)
- I added the following tags to the plugin by request :
- MTBlogSharesAvailable
- MTBlogSharesOutgoingLinkValue
- MTBlogSharesMarketShare
- Working on adding a share owners list to the plugin, but it is proving more difficult than I expected.
Update: (2003-04-22 15:37)
- I fixed the problem with the total portfolio tag. Seems Seyed went ahead and put some crazy things on the BlogShares pages, like commas in the dollar amounts. :)
Update: (2003-04-25 02:56)
- Finally added shares owners to the plugin. To access them use the following tags:
- MTBlogSharesOwners: container tag for the share owners
- MTBlogSharesOwner: the share owner's name
- MTBlogSharesOwned: the number of shares owned
Usage Example:
<MTBlogShares>
<MTBlogSharesOwners>
<MTBlogSharesOwner> owns <MTBlogSharesOwned> shares<br />
</MTBlogSharesOwners>
</MTBlogShares>
Update: (2003-05-01 13:04)
- The changes to the site broke the plugin again. I am working to fix the problem.
Big Update: (2003-05-01 13:18)
- The changes have been incorporated into the plugin. Everything should be working again. If not, please let me know. I'll look into adding some new features when I get home later tonight. But, for now, I need to get back to actual paying work. ;-)
Another Big Update: (2003-05-01 23:52)
- To celebrate the site going out of beta, I've implemented the following general tags for MTBlogShares:
- MTBlogSharesTotalBonds
- MTBlogSharesTotalProjected
- MTBlogSharesTotalReal
- And I've added a new container tag: MTBlogSharesUserRSS. it acts much like MTBlogSharesUser, except that it uses the portfolio RSS feed instead of the user page. If you do not have the XML::RSS perl module available, it and the following tags will not be available.
- MTBlogSharesUserStocks, which is a container tag for the other tags
- MTBlogSharesUserStockName
- MTBlogSharesUserStockNumber
- MTBlogSharesUserStockLink
- The plugin does not currently extract all the information that it possibly could, so if you have a specific request, please let me know and I'll incorporate it into a future version.
Update: (2003-05-06 16:11)
- I added another tag: MTBlogSharesUserStockSiteLink. It's just like MTBlogSharesUserStockLink, except that it returns a link to the actual site (which has been requested / hacked in a number of places already today). Enjoy! :)
Update: (2003-05-09 21:50)
- Updated to account for changes at the site. MTBlogSharesAvailable and MTBlogSharesTotalBonds should work now.
Update: (2003-05-15 10:39)
- For anyone who downloaded the plugin over the last few days, you may want to download it again. Thanks to me being a tad absent-minded lately, you either got a slightly older version if you downloaded it a couple days ago, or you got a broken version if you downloaded it yesterday. The version available now is working and has been verified by myself. I sincerely apologize for any problems I may have caused.
- In other news, the reason that recent copy was broken was because of a new feature I am implementing: MTBlogSharesOwnerSiteLink. For anyone that owns stock in your site, it will return the URL of their home page, if they have one listed in their Blogshares account.
Update: (2003-06-04 00:10)
- Seyed changed the site again. Amazingly enough, the URLs it uses haven't changed.
- MTBlogSharesTotalReal and MTBlogSharesTotalProjected are now considered deprecated. MTBlogSharesWorth replaces them.
- ( drum roll, please ) I have added three important new tags:
- MTBlogSharesOwnerIfSite: if the stock owner has a site
- MTBlogSharesOwnerSiteName: name of the stock owner's site
- MTBlogSharesOwnerSiteLink: url of the stock owner's site
- These three new tags make use of MT::PluginData to cache home page data, so that is now considered a requirement for the plugin.
Update: (2003-06-06 13:54)
- Fixed a bug that occured when the blog's outgoing link value was less than $100. Thanks to Ryan for letting me know.
Posted by rayners
| Comments (63)
| TrackBack