summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcos <cos>2012-05-14 12:46:33 +0200
committercos <cos>2012-12-17 21:12:07 +0100
commit299c3b127fb36820244fde8a1008d0685d26898e (patch)
tree34587b1d0d21462e8a335d8ebe2e81b2bc103cd6
parent19180c698d7a008c298424177706305319df94b8 (diff)
downloadmat-299c3b127fb36820244fde8a1008d0685d26898e.zip
Made printf statements easier to read.
-rwxr-xr-xmat5
1 files changed, 3 insertions, 2 deletions
diff --git a/mat b/mat
index 6de3bd7..c9471fc 100755
--- a/mat
+++ b/mat
@@ -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";
}
}