• Welcome to the new forum! We upgraded our forum software with a host of new boards, capabilities and features. It is also more secure.
    Jump in and join the conversation! You can learn more about the upgrade and new features here.

Database hacking

altgeeky1

Apprentice
Joined
Apr 14, 2008
Messages
18
Reaction score
0
Hi,

I'm poking around the .bsm databases using a hex viewer.

My goal is to make my BeerSmith data available automatically so it can be used in my own scripts, RSS feed, etc.
I do not want to have to manually export things as reports or XML, over and over.

I can read database descriptions from a script. Your records are simply padded at offsets from each other, ex: grains.bsm.
What I CAN'T do is find the "quantity" for an item type... it's either not next to the item/description, or the values are not in numeric form or as pointers somewhere else....

Any chance I could get a C snippet which describes your format?
I wouldn't require any follow-up support, and this would save me a lot of time.
Opening the data up would be freedom for all, we could write viewers for iPhone, Android, web etc. and you might have fewer requests for that sort of thing.. although at the moment, I have to be clear and say I'm just looking to auto-generate RSS.

I'll take this offline if that's what you prefer.

thanks!
 
Hi,
  Yes, send me an email and I may be able to provide what you need.  Note however, that we plan to go to a purely XML format in the future which should resolve the shortcomings of the existing binary format.

Brad
 
Hi Brad,

I originally stated this as being able to read/decrypt the BeerSmith database, but a simpler explanation is:

1) From outside of BeerSmith (command line, etc) I want to do a database dump
2) With these results, I would post process in my own scripts (email reminders for ingredients, etc).

So if there were a command line tool which dumped BS database, that would be perfect! 
Do you have any standalone reader for the database?


I know that the next version will have XML database as the native format. Any idea when that is coming?
 
Hi,
  Unfortunately there is no underlying database in the current version - it actually has a bunch of binary structures (classes actually) that store the data and are essentially dumped in the output file.  I had to write a bunch of code to import this into the new version I'm working on (a few weeks worth of coding), but it would take a long time to describe it all for someone else to do it.  Frankly I don't think its worth it to deconstruct the binary version at this point.

  Could you not just export the BeerSmith files to BeerXML format and work with them from there?

  I'm actually in the cleanup phase on the new version now to get a test release out - hoping to get it into testing within a few weeks.  Once I have an idea of how the testing goes, I'll establish a release date for the final version - likely within a few months.

Brad
 
Back
Top