From: Charles McGarvey Date: Sat, 17 Aug 2019 22:04:35 +0000 (-0600) Subject: simplify header in output X-Git-Tag: v0.005~2 X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=5047b75a7e4c5df848f343c46d732643c27f8882;p=chaz%2Fhomebank2ledger simplify header in output --- diff --git a/lib/App/HomeBank2Ledger/Formatter/Beancount.pm b/lib/App/HomeBank2Ledger/Formatter/Beancount.pm index d62ce70..a72a64e 100644 --- a/lib/App/HomeBank2Ledger/Formatter/Beancount.pm +++ b/lib/App/HomeBank2Ledger/Formatter/Beancount.pm @@ -50,7 +50,8 @@ sub format { Get formatted header. For example, - ; Converted from finances.xhb using homebank2ledger 0.001 + ; Name: My Finances + ; File: path/to/finances.xhb =cut @@ -62,9 +63,9 @@ sub format_header { if (my $name = $self->name) { push @out, "; Name: $name"; } - - my $file = $self->file; - push @out, "; Converted from ${file} using homebank2ledger ${VERSION}"; + if (my $file = $self->file) { + push @out, "; File: $file"; + } push @out, ''; diff --git a/lib/App/HomeBank2Ledger/Formatter/Ledger.pm b/lib/App/HomeBank2Ledger/Formatter/Ledger.pm index 71d9020..3a5a713 100644 --- a/lib/App/HomeBank2Ledger/Formatter/Ledger.pm +++ b/lib/App/HomeBank2Ledger/Formatter/Ledger.pm @@ -49,7 +49,8 @@ sub format { Get formatted header. For example, - ; Converted from finances.xhb using homebank2ledger 0.001 + ; Name: My Finances + ; File: path/to/finances.xhb =cut @@ -61,9 +62,9 @@ sub format_header { if (my $name = $self->name) { push @out, "; Name: $name"; } - - my $file = $self->file; - push @out, "; Converted from ${file} using homebank2ledger ${VERSION}"; + if (my $file = $self->file) { + push @out, "; File: $file"; + } push @out, '';