bogen.org

Now with occasional clarity

Baseball, Swinging, and Cheering

It’s been a long time since I’ve uploaded a video of either of the kids so I decided to rectify that situation tonight. Enjoy some of their most recent antics.

Written by

May 15th, 2012 at 10:07 pm

Gallery2 to Zenphoto Migration

Recently I migrated my photo album from Gallery2 to Zenphoto. It wasn’t an easy process because there is no good out-of-the-box tool written for the migration. So, I mashed together some bits and pieces that others had published online, added some of my own perl glue, and came up with the following Frankenstein script that did 85-90% of the work for me. Because I’d switched from putting descriptions in the summary field to the title field at some point during my run with Gallery2, I had to hand-import some information. In addition, if you’ve used any of Gallery2′s tags (to add a link to a field or bold some text or something) this script won’t fix it. You can probably pretty easily fix all those problems with a few regexes in strategic places below, but I only had a few in my own installation, so it wasn’t worth the time to build that into this script.

There are a couple of gotchas involved with the script, especially if you have multiple albums in Gallery2 that all have the same name or if you’re importing something beyond JPEGS and albums. Reading through the code is definitely worth your time.

When I ran the script, it was against version 2.3.something of Gallery2 and 1.4.3 of zenphoto.

In the spirit of open source and sharing, the script I used is below. I hope that someone else finds it useful.



#!/usr/bin/perl
use strict;

##############################################################################
# Define variables

#
# $host is the hostname of your database, probably localhost.
#
my $host = "ZEN_PHOTO_DB_HOST";
my $user = "ZEN_PHOTO_USER";
my $password = "ZEN_PHOTO_USER_PASSWORD";

#
# $gallery2_db is the name of your Gallery2 database. Change as needed.
#
my $gallery2_db = "gallery2";

#
# This is the prefix in front of your gallery2 database tables. Change as
# needed.
#
my $gallery2_db_prefix = "g2_";

#
# $zenphoto_db is the name of your zenphoto dataabase. Change as needed.
#
my $zenphoto_db = "zenphoto";

#
# THis is the prefix in front of your zenphoto database tables. Change as needed.
#
my $zenphoto_db_prefix = "zp_";

#
# $phototitle determines what the zenphoto title will be based upon
# "title" will use the Gallery2 title of a photo
# "summary" will use the Gallery2 summary of a photo
#
my $phototitle = "title";
##############################################################################

#
# You shouldn't need to change anything below this line, but knowing how
# this world works, your setup might be just different enough that this script
# won't work for you out of the box. If that's the case, you'll definitely
# have to change something below this line, but what, exactly, needs to be changed
# is an exercise for the user.
#

use DBI();

#
# I had two different databases for my data, so I needed two different database
# handles. However, I created one user that had priveleges on both databases,
# so I only needed one username/password combination. Your setup might be
# simpler or more complex and, hence, you might need to adjust these to
# fit your needs.
#
my $dbh_gallery2 = DBI->connect("DBI:mysql:database=$gallery2_db;host=$host",
$user, $password, {'RaiseError' => 1});
my $dbh_zp = DBI->connect("DBI:mysql:database=$zenphoto_db;host=$host",
$user, $password, { RaiseError => 1, AutoCommit => 1 }) ||
die("Could not connect to zenphoto: $!\n");
my $counter = 0;

my $cursor = $dbh_gallery2->prepare("select
${gallery2_db_prefix}FileSystemEntity.g_id,
${gallery2_db_prefix}FileSystemEntity.g_pathComponent,
${gallery2_db_prefix}Item.g_${phototitle},
${gallery2_db_prefix}Item.g_description,
${gallery2_db_prefix}Item.g_keywords from
${gallery2_db_prefix}FileSystemEntity,
${gallery2_db_prefix}Item where
${gallery2_db_prefix}FileSystemEntity.g_id = ${gallery2_db_prefix}Item.g_id;") ||
die "Prepare error ($DBI::errstr)";

$cursor->execute() || die "Query error ($DBI::errstr)";
#
# Use backticks here becuase some of these are MySQL reserved words. Use
# backticks on everything because it can't hurt.
#
my $sql1 =
"UPDATE ${zenphoto_db_prefix}images SET `title` = ?, `desc` = ? WHERE
`filename` = ?";
my $sql2 =
"UPDATE ${zenphoto_db_prefix}albums SET `title` = ? , `desc`= ? WHERE
`folder` like ?";
my $sth1 = $dbh_zp->prepare($sql1);
my $sth2 = $dbh_zp->prepare($sql2);
my $rows_affected = 0;
while(defined(my $row = $cursor->fetch)) {
my $id = $row->[0];
my $filenm = $row->[1];
my $summary = $row->[2];
my $description = $row->[3];
$rows_affected = 0;

# If you're importing anything other than JPEGS, you'll need to modify the
# the regex below.
if ($filenm =~ /\.jpg/io)
{
$rows_affected = $sth1->execute($summary, $description, $filenm)
or die $sth1->errstr;
print "IMAGE $counter: gallery2 ID $id: $filenm --- $summary --- $description\n";
unless($rows_affected)
{
print("ERROR: Data for $filenm not saved in database.\n");
}
}
elsif($filenm)
{
#
# You need the wildcard here because the album that you're updating
# is (potentially) at the end of a long string of albums and you
# don't necessarily care about what comes before. Of course,
# if you have multiple nested albums with the same name this logic
# won't work for you. But I didn't have that problem, so it worked
# for me. Your options include renaming some albums in Gallery2
# before running this script or writing your own solution to
# the problem.
#
$filenm = '%'.$filenm;
$rows_affected = $sth2->execute($summary, $description, $filenm)
or die $sth2->errstr;
print "ALBUM $counter: gallery2 ID $id: $filenm --- $summary --- $description\n";
unless($rows_affected)
{
print("ERROR: Data for $filenm not saved in database.\n");
}
}
else
{
print "$counter: filename is NULL --- NOT INCLUDED!\n";
next;
}
$counter++;

}
$dbh_gallery2->disconnect();
$dbh_zp->disconnect();

Written by

May 7th, 2012 at 12:42 pm

Posted in Technology

Dinah’s Nicknames

Dinah has accumulated a number of nicknames so far. Some of them are more widely used within the family than others.

Garrison insists on calling her “Boze”. We’re not sure how to spell it, nor where it came from, but he uses it two hundred times a day or more. We’ll be lucky if she doesn’t grow up with that name. Sarah will occasionally use it while she’s talking to Garrison about Dinah but I’ve so far been refusing because I don’t like it.

Dinah’s other nicknames include:

Cranky Baby
We haven’t used this one for a while. When she was much younger she was often inconsolable for anyone who wasn’t Sarah. At those times she was definitely Cranky Baby.
Little D
This one gets some play around the house. She is the littlest member of the family whose name starts with the letter D so it’s not even terribly inaccurate.
Baby Time
This is her newest nickname. It came about from people wanting to spend time with the baby and since has evolved into a nickname. Garrison even used it the other day, which I wasn’t expecting, since it doesn’t quite lend itself to extended verbal mangling like the word “Boze” does.

Written by

May 3rd, 2012 at 12:46 pm

Posted in Life in Wisconsin

First Tooth!

Dinah’s first tooth made its appearance today. She was fairly cranky last night and rather than sleep from 21:00-05:00, as had become her custom, she was up several times during the night. Now that the tooth is out we know why. We can’t see much of the tooth yet (only the edge of it has come through the gum) but the sharp edge can definitely be felt when you put a finger in her mouth.

On another note, I finally copied some photos off our camera, so I’ve got pictures of our backyard play set below. Click on the photos for a larger view.

Finally, there are some new photos in the photo gallery of the kids.

Written by

May 1st, 2012 at 9:27 pm

Pictures, Happy Baby, Play Set

After a long dry spell, I finally got a number of new photos uploaded to the photo gallery.

Dinah is still her extremely happy baby self. She loves to smile at people and she’s still pretty quiet (probably because it’s hard to get a word in edgewise with her brother around). She’s starting to sit up on her own for longer periods though she’s still prone to falling over and bonking her head if she’s left alone for too long. She has been sleeping through the night more often than not of late which is great for Sarah and I. She goes to sleep around 21:00 or so every night and usually doesn’t wake up until 05:00-06:00 in the morning. We’ve started her on some solid foods but she hasn’t really shown a real appreciation of them yet.

In looking back at some old photos it’s clear that she’s getting a different experience than Garrison did at the same age. We did more stuff and went more places with Garrison when he was an infant because we didn’t have a toddler along with us to suck up all available time and energy. She’s spending more time at home and probably getting to do a few less interesting things.

Garrison is still his rambunctious, boundary-testing, three year-old self. He’s doing well with his swimming lessons and he’s been zipping all over the neighborhood on his balance bike that Santa got him for Christmas. He routinely rides his balance bike (what he calls his “tippy bike”) to day care and bike which is probably a half-mile or more each way. In fact, he’s doing so well with his bike that we’ve been considering getting him a bike with pedals and no training wheels to see how he does.

He’s also been eating more foods of late. In fact, he often surprises me when we go out to eat with what he’ll order. He’s ordered fish fry in the past, and pulled off the fried breading in order to eat the cod inside. He ordered grilled cheese the last time we went out which both Sarah and I were concerned that he wouldn’t eat since he usually doesn’t eat cheese at home. However, he promptly gobbled it down when it arrived. And, in all honesty, he’s been eating more cheese at home. He enjoyed some pepperjack cheese that we had recently, as well as some Colby cheese. All of that is a real change since even a couple of months ago he wouldn’t touch white cheese at all and would only occasionally eat “orange cheese”.

Last weekend, Garrison and I spent most of Saturday building a large play set in our back yard. It had become obvious to both Sarah and I that he needed a better outlet for his energy in the backyard and after seeing him exert himself freely on other play sets in the neighborhood we started searching for one of our own. We looked at used play sets and new play sets before deciding to buy a new one and put it together ourselves. It was delivered by a large lift truck and one guy, despite weighing over seven hundred pounds. Sarah did an extensive inventory and labeling of the parts (with Dinah’s help) once I got them all out of the shipping crate. All that labeling really helped once the assembly process started because it meant that I could look for the properly labeled part instead of having to spend time comparing similar parts to find the right one.

It probably took twelve-fourteen man-hours to uncrate, label, assemble, and clean-up but now the thing is complete. Garrison has already spent a good deal of time climbing all over it, pretending that it is a ship, and generally enjoying himself immensely, despite the fact that it’s been somewhat rainy, windy, and cold since we set it up.

This year was the first year that Garrison really got any sort of Easter experience (probably because it’s the first year that he’s been old enough to understand it). My mom was out for the week of the holiday and she helped get Garrison into the mood by practicing hiding eggs with him during the week. They also dyed eggs together the night before Easter, along with my sister, which Garrison really enjoyed. Since then, we’ve been trying to keep his overall Easter candy consumption down to a readable amount since he gets hyped on sugar pretty easily. So far, he’s managed to eat all of his chocolate bunny, some of his jelly beans, all of his Peeps, and a few of his chocolate eggs. Fortunately there isn’t another candy-centric holiday coming up for quite a while.

Written by

April 16th, 2012 at 12:20 pm

Do Not Borrow Trouble

The other night I went looking for the lyrics to Count This Penny‘s transcendent song, “Do Not Borrow Trouble” and I wasn’t able to find them. So, as a general service to others who might be looking for the same, the transcribed lyrics are below.

For those of you aren’t familiar with the genesis of this song, the Wisconsin Veterans Museum loaned a number of letters written by a Civil War soldier to Count This Penny for them to write two songs from the soldier’s perspective. The songs were released in early March as a limited release 45 and also as digital downloads. You might also enjoy this YouTube video that describes the creation of the songs.

Father, Mother ever dear
I’m your unworthy son
I seat myself to tell you of
The ground that we have won

We look for a fight at Shiloh
In the black heart of Secesh
There’s a hundred thousand soldiers here
And we can’t get no rest
And we can’t get no rest

Oh…

The waiting here will use us up
The hardtack’s hard to take
I’ll bear it like the others do
And whisper no complaint

We’re a mile from the Tennessee River
Where the peach trees bloom and sway
I’m way down South in in the land of cotton
That’s more than some can say
That’s more than some can say

Oh…

Please do not borrow trouble
I am well; I do not fear
And do not believe rumors
I am sure that you will hear

I seen old tight ass Stuart
And I asked him how he goes
He does not like the soldiering
No letters come from home
No letters come from home

Oh…

Father, Mother ever dear
I’m your unworthy son
I seat myself to tell you of
The ground that we have won
The ground that we have won

Please do not borrow trouble
I am well; I do not fear
And do not believe rumors
I am sure that you will hear

Written by

March 20th, 2012 at 7:05 pm

Posted in Music

We have mice?

Another one of Garrison’s journal entries from Honeybees. I can only assume that they read a story about a mouse named Moses.

Moses is trying to jump in the pool.
He is trying to collect fries and hamburgers.
He goes into his house when it’s cold.
Mommy, Papa, Nanny, and Grandpa all live there.
Moses is a good mouse.

Written by

February 22nd, 2012 at 12:05 pm

Posted in Life in Wisconsin

No.

Me: “Why do you say ‘No’ to me so much?”
Garrison: “When you say something wrong I say ‘No.’”

It struck me today that Dinah looks more than a little like Jack-Jack in Disney’s “The Incredibles”. She even has the same crazy curl of hair on top of her head.

Written by

January 27th, 2012 at 6:25 pm

Posted in Life in Wisconsin

Garrison’s Journal Entries

Garrison’s day care helps the kids keep “journals.” Primarily, these are little one page stories each child tells after reading a book or listening to a story. The teachers write down what the kids say and post it on a bulletin board for the parents to read. Below are a couple of samples from Garrison’s journal.

These are rainbows. I love rainbows.

On Thursday, the rainbows came to play.

The rainbows got hurt and pushed. They cried.

I helped them back so they wouldn’t cry anymore.

I didn’t push them down.

-=-=-=-=-=

My turkey’s name is Dinah Emberly. She slept in a nest with eggs.

There were 2 eggs. The eggs cracked and little eggs came out.

There were more little eggs in the little eggs.

The turkey ate some eggs. She liked them. I do too.

She went in the leaf pile to look for bunnies. She didn’t find them yet.

Then she went into the hostas to look for them and there they were.

There were 2 bunnies. The bunnies said, “Don’t find me.”

Dinah said, “I’m sorry.”

Written by

December 8th, 2011 at 5:38 pm

Posted in Life in Wisconsin

More Garrisonisms

Some other Garrisonisms that I forgot the other day..

Hopsabill
Hospital

Freezy
Refridgerator

Sword Fwight
Sword fight. I’m not quite sure why it has attracted the extra consonant, but it has.

Written by

December 7th, 2011 at 8:46 pm

Posted in Life in Wisconsin

Garrisonisms

A few translations from Garrison’s words into the English that the rest of us use. This cheat sheet may come in handy if you find yourself interfacing with him for any extended period of time.

Gra-Lumber Bar
Granola Bar
Miss-struction
Construction
Miss-ghetti
Spaghetti
Teh-Vee
TV
Mud Shoes
Croc-like plastic sandals
Flat egg
Fried egg with a broken yolk
I’m thinking about…
I’d like to…
Peanut Butter Quesadilla
Peanut butter on a rolled-up tortilla
Orange cheese
Orange cheddar cheese, not to be confused with (apparently inedible) white cheddar
My beer/cider beer
Apple juice or apple cider
Glass glass
A glass drinking glass, not to be confused with a sippy cup.
Happy Birthday to You!
Your birthday
Hang-ga-burr
Hamburger
Peanut Bomber
AJ Bombers, a local restaurant that delivers peanuts to tables via ceiling mounted “bombs”.
Different candy
The collective term for the candy he collected on Halloween this year.
Gummi Pill
His morning gummi multi-vitamin or evening gummi omega-3 vitamin
Compweeter
A computer

Written by

November 30th, 2011 at 5:55 pm

Posted in Life in Wisconsin

Chocolate chocolate

Me: Do you want a chocolate bar for dessert?
Garrison: No. I want chocolate chocolate.
Me: That’s what’s in a chocolate bar.
Garrison: No, it’s not.
Me: Then what’s in a chocolate bar if not chocolate chocolate?
Garrison: Peanut butter, peanut butter sandwich, and quesedilla juice.
Me: *dumbfounded look*
Garrison (firmly): I want chocolate chocolate, not a chocolate bar.

Written by

October 27th, 2011 at 6:18 pm

Posted in Life in Wisconsin

Pictures Added

After a long dry spell, I finally added some new Garrison pictures to the Photo Gallery.

Also, I’ll include a photo of Dalla helping us fold some laundry.

Dalla helping with the laundry.

Written by

October 10th, 2011 at 5:33 pm

Posted in Photos

Give it a little bell for power.

Tonight I put one of my surplus bicycle bells on one of Garrison’s tricycles.

“Why did you put the bell on my bike,” he asked.

“I thought you might like it,” I said. “Do you like it?”

“Yes, I do,” he said. “It makes me go faster.”

Written by

October 2nd, 2011 at 7:08 pm

Posted in Life in Wisconsin

Sirens

Sarah: “Where do you want to go tomorrow to look at carpet?”
Me:  “Sergenians?”
Garrison: “They’re closed for three months.”
Me: “Really? Why?”
Garrison: “Because the thunder was loud and they put the tomato sirens up on poles and they went off but I haven’t seen one for a while. Then we have to go to the basement and watch teh-vee.”

What makes it funny is that he meant tornado and not tomato.

Written by

September 17th, 2011 at 6:09 pm

Posted in Life in Wisconsin

Diddly Squat

Me: Mommy got diddly squat in the mail today.
Garrison: Can I try it?
Me: Go ask your mother.
Garrison (yelling while running to the other end of the house): Mommy, can I try your diddly squat?
Sarah (with a somewhat confused look on her face): Uhh..

Written by

September 1st, 2011 at 5:21 pm

Posted in Life in Wisconsin

Sambel Cap Jempol Sambel Asli

The Sambel Cap Jempol Company out of Jakarta, Indonesia, makes one of my favorite sauces at the moment. I picked up a bottle of their Sambel Asli at a local Asian grocer on a whim. Why? It was a big bottle (why must all hot sauces be sold in such teeny little bottles?); it didn’t cost very much; the texture and color looked appealing; the ingredients list was short; and I was intrigued by the idea of trying something from Indonesia. That first bottle disappeared before I could write a review so this actually a review of the second.

The sauce has good pepper flavor, not too much salt, and is thick with peppers (and not thickeners). It’s a shaking sauce, and not a pouring sauce, due to the thickness. Unlike some sauces you can use it both both Asian, Mexican, or Indian cuisine without getting clashing flavors. My biggest gripe with the sauce is the absolutely crummy cap on the bottle. The cap doesn’t seal tightly enough to keep liquid from leaking out, so if the bottle tips in the fridge you will have a mess to clean up. In addition, the sauce always gets stuck in the lid so you quickly end up with a messy bottle even if you keep it upright.

Should you buy this sauce? If you enjoy hot sauces, I would definitely recommend adding it to your arsenal. The heat isn’t for the faint of heart, but the flavor is good, the bottle size is right, and you can’t beat the price. Just watch out for the godawful cap.

Written by

June 24th, 2011 at 4:59 pm

Busha Browne’s Pukka Hot Pepper Sauce

Recently I came across Busha Browne’s Pukka Hot Pepper Sauce while spending some time in the Twin Cities. It looked interesting and came with warnings about using too much, so I bought one bottle. The bottle claims that the sauce is made from scotch bonnet peppers. The only evidence I have to support that claim is that those are the only peppers listed on the ingredients list. The sauce itself isn’t very hot, despite what some reviews online would like you to believe. I used just a bit initially, but quickly found myself shaking it all over my plate to the heat up to where I expected it to be. The flavor of the pepper is subdued, especially in comparison to Desert Pepper XXX. The biggest turn-off to the sauce is the extremely thick nature of it. Modified food starch claims a prominent place in the ingredients list and they certainly didn’t scrimp on it. You definitely don’t pour this out of the bottle; you shake the bottle to get the viscous sauce to move from one end of the bottle to the other.

Should you buy this? No. The flavor of the pepper is so subdued that you mostly get heat. The extremely thick nature of the sauce makes you wonder if they haven’t cut costs by reducing the peppers in the recipe and replacing their bulk with food starch. There are definitely better options out there.

Written by

June 24th, 2011 at 4:45 pm

Garrison at the Memorial Union

We ate lunch at the Memorial Union Terrace today (we were downtown on our bikes for Ride The Drive). While we were there, Garrison took a shine to one of the big chairs and we managed to get a good photo of the moment.
image

Written by

June 5th, 2011 at 2:28 pm

Another peaceful morning

When they were using a jackhammer to break up part of our basement floor a couple of weeks ago, they started early during the day, right when we were having breakfast. It didn’t take long for the breakfast table to clear out since the jackhammer was operating directly underneath it. In the interludes between percussion from the basement you can hear the normal sounds of carpenters working just on the other side of the plastic wall. Enjoy the peaceful sounds of breakfast at our house.

Written by

May 27th, 2011 at 3:17 pm