Dominos Pizza Script
So Dominos has this neat thing where you can order online, and then track your order as it is being prepared in the store. Some guy figured out that they publish this information as an XML script, and then took it upon himself to code a Python script that outputs information about your order to the terminal. Pretty cool stuff.
While that script was cool, I kinda wished he had coded it in Ruby instead, so I decided I’d port it to Ruby. While the code is very similar, I made changes that fit my style more and took better advantage of the data that Dominos provides us with.
The XML library I used isn’t as pretty as Python’s (though I’m sure there is a more robust Ruby library), so that part of my code isn’t as elegant. You can find part of the data structure I’m working with down at the bottom, in case you’d like to add your own changes.
Or just take a look at it here.
you@yourmachine ~ $ ruby dominos.rb 9785551234
Order received at store #3189. The manager today is Danillo.
Your order: 1 small(10") hand tossed pizza(s)
4:27pm: Your order is being made.
4:31pm: Your order is in the oven.
4:37pm: Your order is done and awaiting delivery.
4:40pm: Your order is on the way. Edna is your driver.
If you’re working on this project, you too have probably noticed that there are no example XML files to take a look at, so I took the liberty of posting some examples here and here. I hope these help!
If you really want me to, I’d be more than willing to create a Google Code repository for the project.
06-06-08: The script was suprisingly popular, with a couple hundred downloads on the release date. It was posed on Reddit here, and it got a positive review on the ruby-talk mailing list. Although the script is pretty self explainatory, you can find the documentation here.
Hello, I'm Dana Merrick and I'm currently studying Classical Mathematics at Trinity College. This is just filler text because people perfer to read filler in English over Latin.
Down here is more filler text, this time in a grey box. That's pretty cool. Do you spell it "grey" or "gray?" I think I switch between them more or less randomly.
The class of this is called "quiet." Shhhh! Don't be too lound over here. This is where you put information that you don't want to stand out, like your social security number.
But I'm not going to talk about it down here. This is a place reserved for my blogroll or something. Who the hell created the name "blogroll" anyway. Fruit Roll-Ups are awesome.