Warning: fopen(/home/people/c/capriotj/MyWeb/data/w/tracking.xml) [function.fopen]: failed to open stream: Permission denied in /home/people/c/capriotj/MyWeb/tools/tracking.php on line 32

Warning: fseek(): supplied argument is not a valid stream resource in /home/people/c/capriotj/MyWeb/tools/tracking.php on line 33

Warning: fwrite(): supplied argument is not a valid stream resource in /home/people/c/capriotj/MyWeb/tools/tracking.php on line 35

Warning: fclose(): supplied argument is not a valid stream resource in /home/people/c/capriotj/MyWeb/tools/tracking.php on line 37
Jason Capriotti
Go Back

RateBeerXML

Introduction

RateBeerXML is a tool created to convert RateBeer ratings into an XML file for use by nerds like me. The original version was in the form of a .NET executable. However, I realized that greater user acceptance would occur if it was a simple online web page.

Now, download your XML file with this easy-to-use form! Follow these simple instructions:

  1. Visit the My Account page while logged in to your RateBeer account.
  2. Click the "Compile My Ratings" link on the right-hand side
  3. Select a sorting option of your choice
  4. IMPORTANT: Select "Delimited ASCII" as the display method
  5. Click submit, and then the "this file" link on the next page
  6. Now copy the URL (address) of this page and paste it into the box below.
    It should resemble this: http://www.ratebeer.com/RatingFiles/Ratings2_8608.txt
  7. Select your download options, click Convert, and you're done!



View XML Converter PHP Code
Note: I can't figure out why IE is not displaying this in the browser. I set Content-Type to "text/plain", and that is making it throw up the download box.

What's the Point?

I've had an interest in playing around with XML and XSLT lately, and decided my beer ratings would be a fun and readily available set of data to use. Check out this page to see what I am talking about.

Problems?

Problems using the converter? I have no control over the "compile my ratings" text produced by the RateBeer website, nor do I have control over unhandled sequences of characters that may appear in your rating comments. I make every attempt to handle every case, but something may split through.

If there are problems, email me at the address on the front page, or BeerMail JCapriotti. I am going to create a problem submission form when I have some time. I don't want to link my email address here due to spam bots.

About RateBeer

RateBeer is widely recognized as the most accurate and most-visited source for beer information. RateBeer is an independent world site for craft beer enthusiasts and is dedicated to serving the entire craft beer community through beer education, promotion and outreach.

Click for RateBeer!

Old Program Usage

To use this program, you must download your beer ratings following the "|" delimited format. Right now, the application is only available as a .NET console application, with source code available in C#. If you send me an email I'll consider porting it to other platforms.

Since it is .NET, you must download the .NET framework, if you don't already have it (I think Windows XP comes with it). You can also download it here: http://www.microsoft.com/downloads/details.aspx?familyid=d7158dee-a83f-4e21-b05a-009d06457787&displaylang=en.

XML files can be created in two formats, with beer information saved in XML elements (i.e. <Beer><Name>Fullers Vintage Ale</Name></Beer>) or attributes (i.e. <Beer Name="Fullers Vintage Ale" />).

Type "RateBeerXML" with no parameters for more usage guidelines.

RateBeerXML [/E | /A] [/C] inputfile outputfile

/E Formats the XML file with information stored as elements.
/A Formats the XML file with information stored as attributes.

/C Add rating comments to output.


Note that the default behavior is to format the XML using attributes for beer
information.

Download

Current Version - 1.1

Version 1.0

Release Notes

General Comments / Information

  • Works only with "|" delimited files, as produced by the "Compile My Ratings" feature of RateBeer.
  • May (will) act strange if comments contains a " | " string. I have not tested this case, but it may still work since comments are ignored.
  • Ampersands (&) are properly handled in brewer names, beer names, and comments. Less than symbol (<) is handled in comments.
  • Exported data contains at least special codes: "&quot;" and "&#39;". These are converted to a double quote (") and single quote (') respectively.

Version 1.1

  • Added support for rating comments and dates. Comment exporting is optional.
  • Date is ISO 8601 compliant.
  • Shortened command-line parameters ("attributes" became "A", "elements" became "E")

Version 1.0

  • Rating comments and dates are not imported.

Go Back