Every Friday, I get emailed a big spreadsheet of dinner menus for the next week. And every Friday, I spend 25 minutes copying, pasting and typing out times to get these menus into daily events for ‘Lunch’ and ‘Dinner’ on a website powered by the Mambo CMS.
Actually, of course, I got bored of that after the first two weeks and lashed together a PHP form to cut out most of the effort; that reduced the task to about 5 minutes’ worth. But that’s still 5 minutes of my life I’ll loose each week…until now.
Enter Python, specifically python-excelerator and xls2list. Amazingly, it turns out some clever people have already done the hard work of getting Python to read .xls files, so all I had to do was write a parser to fish out the menus.
After some fiddling around, it seems to do the job on test data from the last few weeks. So now all I need to do is wire it up to a special email address at one end and make it output the menus into the Mambo backend database at the other.