Home AMX User Forum AMX General Discussion

Database Info Reteival

Greetings,

I have been promising my wife a means of recipe retreival from our Kitchen TP.

I am looking for a means of allowing Netlinx to access data from a common file that she can easily modify such as an Excel spreadsheet.

Could someone point me in a general direction to get started.

Thanks and Happy New Year!

Comments

  • ericmedleyericmedley Posts: 4,177
    Greetings,

    I have been promising my wife a means of recipe retreival from our Kitchen TP.

    I am looking for a means of allowing Netlinx to access data from a common file that she can easily modify such as an Excel spreadsheet.

    Could someone point me in a general direction to get started.

    Thanks and Happy New Year!
    almost sounds like a job for MYSQL. Create a database and use the XML file(s) it creates to call in the data onto the touch panels. The database woujld do a better job of kinda forcing y'all into keeping the data in the XML files consistent.
  • viningvining Posts: 4,368
    I did something similar last year and I think I used a FileZilla server on my office PC and sent up it's root directory on my C\ drive for the files I wanted to retrieve, but that was for a few text or CSV files written in a manner for me to parse in the master. I modified the FTP module to handle checking for changes and transferring files.

    Adding recipes to a data base sounds like a real chore and if you're going to enter a large amount into this data base MySQL would be a good choice. If you go this route try Xampp:
    http://www.apachefriends.org/en/xampp.html which is a free bundled download with an Apache server, MySQL, PHP, etc which should give you a good start.
  • dthorsondthorson Posts: 103
    You could also look into "i! Database Plus". I've had success with this in the past.

    In my case I used a PC running a WEB server to maintain the Access DB file and used AMX to pull data and display on TP. I did this for a global address book for ATC/VTC calls.
  • TurnipTruckTurnipTruck Posts: 1,485
    There must be a way of simply pointing Netlinx toward a database file in Access or Excel stored on a PC or even on the master's flash and then parsing out data to display. Setting up an additional server seems like overkill.
  • dthorsondthorson Posts: 103
    If you plan to maintain the Access file on a PC, that will work with i-Database. It doesn't have to be an actual server.

    But you do have to install IIS in the XP machine and create an application directory. Not too difficult.
  • Spire_JeffSpire_Jeff Posts: 1,917
    Well, you could create a CSV or XML formatted file and put it on the master. The issue is that no matter what format you use, you will have to write the code to deal with it. The reason you can view an Excel file on your PC is because the Excel program is interpreting the data stored in the Excel file, formatting it, and displaying it.

    You could find the format of an Excel file and develop a parser that pulls the data you want from the file for your use, but it would be much easier to either parse a text based format. The separate server gives you more power and flexibility... if you are familiar with their use and programming.

    Jeff
  • TurnipTruckTurnipTruck Posts: 1,485
    Thanks Jeff.

    I am aware that I will have to parse. I'm just trying to figure what would be the best format file for parsing and ultimately using in my application. The main requirement is that the data file be easily edited by the wife. That is why I have considered Access, Excel.

    Would I save as a .csv and parse out from there?
  • viningvining Posts: 4,368
    Unless you're going to have a minimal library I'd suggest doing some research on available recipes and existing formats.

    Here's one I found in XML here: http://www.happy-monkey.net/recipes/
     <?xml version="1.0" encoding="UTF-8" ?> 
      <!DOCTYPE recipe (View Source for full doctype...)> 
    - <recipe>
      <title>Hippie Pancakes</title> 
    - <recipeinfo>
      <blurb>Socially conscious breakfast food.</blurb> 
      <author>David Horton</author> 
      <yield>12 to 16 small pancakes, enough for two hippies</yield> 
      <preptime>10 minutes</preptime> 
      </recipeinfo>
    - <ingredientlist>
    - <ingredient>
      <quantity>1</quantity> 
      <unit>C.</unit> 
      <fooditem>unbleached wheat blend flour</fooditem> 
      </ingredient>
    - <ingredient>
      <quantity>2</quantity> 
      <unit>tsp.</unit> 
      <fooditem>baking powder</fooditem> 
      </ingredient>
    - <ingredient>
      <quantity>1</quantity> 
      <unit>tsp.</unit> 
      <fooditem>unrefined sugar</fooditem> 
      </ingredient>
    - <ingredient>
      <quantity>1/4</quantity> 
      <unit>tsp.</unit> 
      <fooditem>coarse kosher salt</fooditem> 
      </ingredient>
    - <ingredient>
      <quantity>1</quantity> 
      free-range egg 
      </ingredient>
    - <ingredient>
      <quantity>1 1/4</quantity> 
      <unit>C.</unit> 
      <fooditem>hormone-free milk</fooditem> 
      </ingredient>
    - <ingredient>
      <quantity>1</quantity> 
      <unit>tsp.</unit> 
      <fooditem>organic vegetable oil</fooditem> 
      </ingredient>
      </ingredientlist>
    - <preparation>
      Pre-heat griddle over medium heat. Combine dry ingredients in a 
      <equipment>mixing bowl</equipment> 
      . Stir in egg, milk and oil. Use a large spoon or gravy ladle to transfer pancake batter to the 
      <equipment>griddle</equipment> 
      . Pancakes are ready to flip when large bubbles can be seen on top. 
      </preparation>
      <serving>Top with fruit and berries or serve with traditional maple syrup.</serving> 
      <notes>All-purpose flour may be used instead of wheat blend, but decrease the milk by 1/4 C and cut the baking powder by 1/2 tsp. You may also replace the unrefined sugar with brown sugar and yes, regular eggs work too, but at this point you have completely sold out to The Man and may as well just hop in your beemer and drive to some trendy, over-priced, yuppie pancake house and get it over with.</notes> 
      </recipe>
    

    Otherwise to enter these recipes by hand in a made up format scripted for txt or CSV parsing file will soon turn your wife against you. That is, if she's the one manually entering all the recipes.
  • Spire_JeffSpire_Jeff Posts: 1,917
    I would definitely recommend using the XML format listed above. You will have to do the parsing by hand, but it isn't that difficult. The added benefit is the portable nature of the data. Based on a brief skim, it seems like you should be able to find a utility that will let your wife enter recipes in a nice GUI app and spit out the appropriate XML data. You just have to decide if you want to support individual recipe files, recipe books (collections of recipes), or a combination. If I had the time, I would lean towards recipe books and offer the ability to import individual recipes into one of the existing books. Each book would be it's own file.

    Jeff
Sign In or Register to comment.