diff options
author | cos <cos> | 2012-05-14 12:46:33 +0200 |
---|---|---|
committer | cos <cos> | 2012-12-17 21:12:07 +0100 |
commit | 299c3b127fb36820244fde8a1008d0685d26898e (patch) | |
tree | 34587b1d0d21462e8a335d8ebe2e81b2bc103cd6 | |
parent | 19180c698d7a008c298424177706305319df94b8 (diff) | |
download | mat-299c3b127fb36820244fde8a1008d0685d26898e.zip |
Made printf statements easier to read.
-rwxr-xr-x | mat | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -239,7 +239,7 @@ sub cmd_showplan { my @ids = $db->selectrow_array($sql); if ($ids[0]) { - printf "%9s %-10s %3s [%s] %s, %s\n", $dt->ymd(), $ids[1], $ids[0], + printf "%9s %-10s %3s|%s %s, %s\n", $dt->ymd(), $ids[1], $ids[0], substr(get_plan_state($dt->ymd()), 0, 1), get_recipe_name($ids[0]), get_recipe_uri($ids[0]); } @@ -457,7 +457,8 @@ sub cmd_shoppinglist { my $ingredientcol = $db->selectcol_arrayref("SELECT name FROM ingredients WHERE id=".$content.";"); # print $content, " ", @$ingredientcol[0], "\n"; # print $$contents{$content}{unit}, $content, " ", @$ingredientcol[0], "\n"; - print $$contents{$content}{quantity}, " ", $$contents{$content}{unit}, " ", @$ingredientcol[0], "\n"; + printf "%4s %-8s %s\n", $$contents{$content}{quantity}, + $$contents{$content}{unit}, @$ingredientcol[0]; # print keys(%$contents), "\n"; } } |