]> Dogcows Code - chaz/homebank2ledger/commitdiff
Version 0.006
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Tue, 3 Sep 2019 02:03:40 +0000 (20:03 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Tue, 3 Sep 2019 02:03:40 +0000 (20:03 -0600)
14 files changed:
Changes
META.json
META.yml
Makefile.PL
README
bin/homebank2ledger
lib/App/HomeBank2Ledger.pm
lib/App/HomeBank2Ledger/Formatter.pm
lib/App/HomeBank2Ledger/Formatter/Beancount.pm
lib/App/HomeBank2Ledger/Formatter/Ledger.pm
lib/App/HomeBank2Ledger/Ledger.pm
lib/App/HomeBank2Ledger/Util.pm
lib/File/HomeBank.pm
t/00-report-prereqs.dd

diff --git a/Changes b/Changes
index 3a74157d2e44700b5e321ab4170e665b071aa7d4..d98cd365080f28d3d584db3672b1fb03c6ffafff 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for App-HomeBank2Ledger.
 
+0.006     2019-09-02 20:02:53-06:00 MST7MDT
+  * Add fatpack release.
+
 0.005     2019-08-17 16:26:33-06:00 MST7MDT
   * Add --budget option for converting HomeBank budget to Ledger.
   * Support quoting commodities when needed.
index 15836eefe093d305de4cbc8ce90d407ea5193670..54f089dabefea69fa7d942595e32ef4f784598d2 100644 (file)
--- a/META.json
+++ b/META.json
@@ -32,6 +32,7 @@
          "requires" : {
             "Dist::Zilla" : "5",
             "Dist::Zilla::Plugin::ConsistentVersionTest" : "0",
+            "Dist::Zilla::Plugin::Run::Release" : "0",
             "Dist::Zilla::PluginBundle::Author::CCM" : "0",
             "Dist::Zilla::PluginBundle::Filter" : "0",
             "Pod::Coverage::TrustPod" : "0",
    "provides" : {
       "App::HomeBank2Ledger" : {
          "file" : "lib/App/HomeBank2Ledger.pm",
-         "version" : "0.005"
+         "version" : "0.006"
       },
       "App::HomeBank2Ledger::Formatter" : {
          "file" : "lib/App/HomeBank2Ledger/Formatter.pm",
-         "version" : "0.005"
+         "version" : "0.006"
       },
       "App::HomeBank2Ledger::Formatter::Beancount" : {
          "file" : "lib/App/HomeBank2Ledger/Formatter/Beancount.pm",
-         "version" : "0.005"
+         "version" : "0.006"
       },
       "App::HomeBank2Ledger::Formatter::Ledger" : {
          "file" : "lib/App/HomeBank2Ledger/Formatter/Ledger.pm",
-         "version" : "0.005"
+         "version" : "0.006"
       },
       "App::HomeBank2Ledger::Ledger" : {
          "file" : "lib/App/HomeBank2Ledger/Ledger.pm",
-         "version" : "0.005"
+         "version" : "0.006"
       },
       "App::HomeBank2Ledger::Util" : {
          "file" : "lib/App/HomeBank2Ledger/Util.pm",
-         "version" : "0.005"
+         "version" : "0.006"
       },
       "File::HomeBank" : {
          "file" : "lib/File/HomeBank.pm",
-         "version" : "0.005"
+         "version" : "0.006"
       }
    },
    "release_status" : "stable",
          "web" : "https://github.com/chazmcgarvey/homebank2ledger"
       }
    },
-   "version" : "0.005",
+   "version" : "0.006",
    "x_authority" : "cpan:CCM",
    "x_generated_by_perl" : "v5.28.0",
    "x_serialization_backend" : "Cpanel::JSON::XS version 4.08"
index cc85c06c163c0531964f7085bd5a90754d0c5c95..8cf88e757bcb936325252fc2b8300c284db7b67b 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -27,25 +27,25 @@ no_index:
 provides:
   App::HomeBank2Ledger:
     file: lib/App/HomeBank2Ledger.pm
-    version: '0.005'
+    version: '0.006'
   App::HomeBank2Ledger::Formatter:
     file: lib/App/HomeBank2Ledger/Formatter.pm
-    version: '0.005'
+    version: '0.006'
   App::HomeBank2Ledger::Formatter::Beancount:
     file: lib/App/HomeBank2Ledger/Formatter/Beancount.pm
-    version: '0.005'
+    version: '0.006'
   App::HomeBank2Ledger::Formatter::Ledger:
     file: lib/App/HomeBank2Ledger/Formatter/Ledger.pm
-    version: '0.005'
+    version: '0.006'
   App::HomeBank2Ledger::Ledger:
     file: lib/App/HomeBank2Ledger/Ledger.pm
-    version: '0.005'
+    version: '0.006'
   App::HomeBank2Ledger::Util:
     file: lib/App/HomeBank2Ledger/Util.pm
-    version: '0.005'
+    version: '0.006'
   File::HomeBank:
     file: lib/File/HomeBank.pm
-    version: '0.005'
+    version: '0.006'
 requires:
   Carp: '0'
   Exporter: '0'
@@ -65,7 +65,7 @@ resources:
   bugtracker: https://github.com/chazmcgarvey/homebank2ledger/issues
   homepage: https://github.com/chazmcgarvey/homebank2ledger
   repository: https://github.com/chazmcgarvey/homebank2ledger.git
-version: '0.005'
+version: '0.006'
 x_authority: cpan:CCM
 x_generated_by_perl: v5.28.0
 x_serialization_backend: 'YAML::Tiny version 1.73'
index 83b1aa4b389c5860a1e32cbd0c943968707c41d1..b1cfb50cd8fd700679c9d5ac047c9e4cc1d584fb 100644 (file)
@@ -41,7 +41,7 @@ my %WriteMakefileArgs = (
     "IPC::Open3" => 0,
     "Test::More" => 0
   },
-  "VERSION" => "0.005",
+  "VERSION" => "0.006",
   "test" => {
     "TESTS" => "t/*.t"
   }
diff --git a/README b/README
index 220932963ff1569b29cd1e8ec123acc6b4a8059a..7f25f535e94c214e62a353885e7f627bea7f7085 100644 (file)
--- a/README
+++ b/README
@@ -4,7 +4,7 @@ NAME
 
 VERSION
 
-    version 0.005
+    version 0.006
 
 SYNOPSIS
 
@@ -58,6 +58,45 @@ DESCRIPTION
     continue to maintain your accounts in HomeBank and use this script to
     also take advantage of the reports Ledger offers.
 
+INSTALL
+
+    There are several ways to install homebank2ledger to your system.
+
+ using cpanm
+
+    You can install homebank2ledger using cpanm. If you have a local perl
+    (plenv, perlbrew, etc.), you can just do:
+
+        cpanm App::Homebank2Ledger
+
+    to install the homebank2ledger executable and its dependencies. The
+    executable will be installed to your perl's bin path, like
+    ~/perl5/perlbrew/bin/homebank2ledger.
+
+    If you're installing to your system perl, you can do:
+
+        cpanm --sudo App::Homebank2Ledger
+
+    to install the homebank2ledger executable to a system directory, like
+    /usr/local/bin/homebank2ledger (depending on your perl).
+
+ Downloading just the executable
+
+    You may also choose to download homebank2ledger as a single executable,
+    like this:
+
+        curl -OL https://raw.githubusercontent.com/chazmcgarvey/homebank2ledger/solo/homebank2ledger
+        chmod +x homebank2ledger
+
+ For developers
+
+    If you're a developer and want to hack on the source, clone the
+    repository and pull the dependencies:
+
+        git clone https://github.com/chazmcgarvey/homebank2ledger.git
+        cd homebank2ledger
+        make bootstrap      # installs dependencies; requires cpanm
+
 OPTIONS
 
  --version
index 933243fceaac13ad6f816d9c2668ffdede530d6c..ce1c6057e038387413ec7ae5aafe5f390192d926 100644 (file)
@@ -3,12 +3,14 @@
 # PODNAME: homebank2ledger
 
 
+# FATPACK - Do not remove this line.
+
 use warnings;
 use strict;
 
 use App::HomeBank2Ledger;
 
-our $VERSION = '0.005'; # VERSION
+our $VERSION = '0.006'; # VERSION
 
 App::HomeBank2Ledger->main(@ARGV);
 
@@ -24,7 +26,7 @@ homebank2ledger - A tool to convert HomeBank files to Ledger format
 
 =head1 VERSION
 
-version 0.005
+version 0.006
 
 =head1 SYNOPSIS
 
@@ -37,13 +39,13 @@ version 0.005
 
 =head1 DESCRIPTION
 
-C<homebank2ledger> converts L<HomeBank|http://homebank.free.fr/> files to a format usable by
+F<homebank2ledger> converts L<HomeBank|http://homebank.free.fr/> files to a format usable by
 L<Ledger|https://www.ledger-cli.org/>. It can also convert directly to the similar
 L<Beancount|http://furius.ca/beancount/> format.
 
 This software is B<EXPERIMENTAL>, in early development. Its interface may change without notice.
 
-I wrote C<homebank2ledger> because I have been maintaining my own personal finances using HomeBank
+I wrote F<homebank2ledger> because I have been maintaining my own personal finances using HomeBank
 (which is awesome) and I wanted to investigate using plain text accounting programs. It works well
 enough for my data, but you may be using HomeBank features that I don't so there may be cases this
 doesn't handle well or at all. Feel free to file a bug report. This script does NOT try to modify
@@ -80,6 +82,43 @@ You can migrate the data you have in HomeBank so you can start maintaining your
 Or if you don't plan to switch completely off of HomeBank, you can continue to maintain your
 accounts in HomeBank and use this script to also take advantage of the reports Ledger offers.
 
+=head1 INSTALL
+
+There are several ways to install F<homebank2ledger> to your system.
+
+=head2 using cpanm
+
+You can install F<homebank2ledger> using L<cpanm>. If you have a local perl (plenv, perlbrew, etc.),
+you can just do:
+
+    cpanm App::Homebank2Ledger
+
+to install the F<homebank2ledger> executable and its dependencies. The executable will be installed
+to your perl's bin path, like F<~/perl5/perlbrew/bin/homebank2ledger>.
+
+If you're installing to your system perl, you can do:
+
+    cpanm --sudo App::Homebank2Ledger
+
+to install the F<homebank2ledger> executable to a system directory, like
+F</usr/local/bin/homebank2ledger> (depending on your perl).
+
+=head2 Downloading just the executable
+
+You may also choose to download F<homebank2ledger> as a single executable, like this:
+
+    curl -OL https://raw.githubusercontent.com/chazmcgarvey/homebank2ledger/solo/homebank2ledger
+    chmod +x homebank2ledger
+
+=head2 For developers
+
+If you're a developer and want to hack on the source, clone the repository and pull the
+dependencies:
+
+    git clone https://github.com/chazmcgarvey/homebank2ledger.git
+    cd homebank2ledger
+    make bootstrap      # installs dependencies; requires cpanm
+
 =head1 OPTIONS
 
 =head2 --version
@@ -178,7 +217,7 @@ Date must be in the form "YYYY-MM-DD". Defaults to the date of the first transac
 
 =head2 --rename-account STR
 
-Specifies a mapping for renaming accounts in the output. By default C<homebank2ledger> tries to come
+Specifies a mapping for renaming accounts in the output. By default F<homebank2ledger> tries to come
 up with sensible account names (based on your HomeBank accounts and categories) that fit into five
 root accounts:
 
index 9d6ce603793ba95a58bddc6b08de47b6c97f012e..cc69d4e4b20444f83829e808e83d061104030cc9 100644 (file)
@@ -11,7 +11,7 @@ use File::HomeBank;
 use Getopt::Long 2.38 qw(GetOptionsFromArray);
 use Pod::Usage;
 
-our $VERSION = '0.005'; # VERSION
+our $VERSION = '0.006'; # VERSION
 
 my %ACCOUNT_TYPES = (   # map HomeBank account types to Ledger accounts
     bank        => 'Assets:Bank',
@@ -446,7 +446,7 @@ App::HomeBank2Ledger - A tool to convert HomeBank files to Ledger format
 
 =head1 VERSION
 
-version 0.005
+version 0.006
 
 =head1 SYNOPSIS
 
index f5299436a9f55525cd1681f400a47ad4596c55a2..cc18be56999d11c8d279705724bd7ca42b98bbdb 100644 (file)
@@ -9,7 +9,7 @@ use Module::Load;
 use Module::Pluggable search_path   => [__PACKAGE__],
                       sub_name      => 'available_formatters';
 
-our $VERSION = '0.005'; # VERSION
+our $VERSION = '0.006'; # VERSION
 
 sub _croak { require Carp; Carp::croak(@_) }
 
@@ -59,7 +59,7 @@ App::HomeBank2Ledger::Formatter - Abstract class for formatting a ledger
 
 =head1 VERSION
 
-version 0.005
+version 0.006
 
 =head1 SYNOPSIS
 
index 2ec6a2c89437bc4b40b39909cce98356ecc12906..7e3f7852bba326f7213d7c592c4fe47938f6c659 100644 (file)
@@ -7,10 +7,11 @@ use warnings;
 use strict;
 
 use App::HomeBank2Ledger::Util qw(commify rtrim);
+use Scalar::Util qw(looks_like_number);
 
 use parent 'App::HomeBank2Ledger::Formatter';
 
-our $VERSION = '0.005'; # VERSION
+our $VERSION = '0.006'; # VERSION
 
 my %STATUS_SYMBOLS = (
     cleared => '*',
@@ -142,6 +143,13 @@ sub _format_transaction {
         $out[-1] .= ' '.join(' ', @tags);
     }
 
+    my $metadata = $transaction->{metadata} || {};
+    for my $key (sort keys %$metadata) {
+        my $value = looks_like_number($metadata->{$key}) ? $metadata->{$key}
+                                                         : $self->_format_string($metadata->{$key});
+        push @out, "    ; ${key}: ${value}";
+    }
+
     for my $posting (@postings) {
         my @line;
 
@@ -178,6 +186,13 @@ sub _format_transaction {
         }
 
         push @out, join('', @line);
+
+        my $metadata = $posting->{metadata} || {};
+        for my $key (sort keys %$metadata) {
+            my $value = looks_like_number($metadata->{$key}) ? $metadata->{$key}
+                                                             : $self->_format_string($metadata->{$key});
+            push @out, "      ; ${key}: ${value}";
+        }
     }
 
     push @out, '';
@@ -282,7 +297,7 @@ App::HomeBank2Ledger::Formatter::Beancount - Beancount formatter
 
 =head1 VERSION
 
-version 0.005
+version 0.006
 
 =head1 DESCRIPTION
 
index 4cf72cb895d169abaa1523139203374396c4270b..ebfa45628a02bb782c723a0a22bf30bb43a036d7 100644 (file)
@@ -10,7 +10,7 @@ use App::HomeBank2Ledger::Util qw(commify rtrim);
 
 use parent 'App::HomeBank2Ledger::Formatter';
 
-our $VERSION = '0.005'; # VERSION
+our $VERSION = '0.006'; # VERSION
 
 my %STATUS_SYMBOLS = (
     cleared => '*',
@@ -157,6 +157,12 @@ sub _format_transaction {
         $memo          && "  ; $memo",
     );
 
+    my $metadata = $transaction->{metadata} || {};
+    for my $key (sort keys %$metadata) {
+        my $value = $self->_format_string($metadata->{$key});
+        push @out, "    ; ${key}: ${value}";
+    }
+
     for my $posting (@postings) {
         my @line;
 
@@ -194,6 +200,12 @@ sub _format_transaction {
 
         push @out, join('', @line);
 
+        my $metadata = $posting->{metadata} || {};
+        for my $key (sort keys %$metadata) {
+            my $value = $self->_format_string($metadata->{$key});
+            push @out, "      ; ${key}: ${value}";
+        }
+
         if (my $posting_payee = $posting->{payee}) {
             $posting_payee = $self->_format_string($posting_payee);
             push @out, "      ; Payee: $posting_payee" if $posting_payee ne $payee;
@@ -255,7 +267,7 @@ App::HomeBank2Ledger::Formatter::Ledger - Ledger formatter
 
 =head1 VERSION
 
-version 0.005
+version 0.006
 
 =head1 DESCRIPTION
 
index f89063ff7f809b719e9f03bc2900b42be5a6953e..245e9b5ea697bf245c8b76c41004e68e89621446 100644 (file)
@@ -5,7 +5,7 @@ package App::HomeBank2Ledger::Ledger;
 use warnings;
 use strict;
 
-our $VERSION = '0.005'; # VERSION
+our $VERSION = '0.006'; # VERSION
 
 
 sub new {
@@ -63,7 +63,7 @@ App::HomeBank2Ledger::Ledger - Ledger data representation
 
 =head1 VERSION
 
-version 0.005
+version 0.006
 
 =head1 SYNOPSIS
 
index c4d00e0750a27bd39e8e7814bea454b4d470c5ea..3bf72b6eaed79914e0bc6bf7b91595703a9a5636 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 
 use Exporter qw(import);
 
-our $VERSION = '0.005'; # VERSION
+our $VERSION = '0.006'; # VERSION
 
 our @EXPORT_OK = qw(commify rtrim);
 
@@ -42,7 +42,7 @@ App::HomeBank2Ledger::Util - Miscellaneous utility functions
 
 =head1 VERSION
 
-version 0.005
+version 0.006
 
 =head1 FUNCTIONS
 
index 5a8da62ac7bad786abe7a8ce6eccd412b2f502eb..e33b9335731e7a568636b8c773eb162e2c9d8f6a 100644 (file)
@@ -12,7 +12,7 @@ use Time::Piece;
 use XML::Entities;
 use XML::Parser::Lite;
 
-our $VERSION = '0.005'; # VERSION
+our $VERSION = '0.006'; # VERSION
 
 our @EXPORT_OK = qw(parse_string parse_file);
 
@@ -491,7 +491,7 @@ File::HomeBank - Parse HomeBank files
 
 =head1 VERSION
 
-version 0.005
+version 0.006
 
 =head1 SYNOPSIS
 
index 0f6138bcc89f8c82f3ddfea43685898b7a5e6336..0b09b630446d5aaf76372f53093444508c133644 100644 (file)
@@ -8,6 +8,7 @@ do { my $x = {
                       'requires' => {
                                       'Dist::Zilla' => '5',
                                       'Dist::Zilla::Plugin::ConsistentVersionTest' => '0',
+                                      'Dist::Zilla::Plugin::Run::Release' => '0',
                                       'Dist::Zilla::PluginBundle::Author::CCM' => '0',
                                       'Dist::Zilla::PluginBundle::Filter' => '0',
                                       'Pod::Coverage::TrustPod' => '0',
This page took 0.042263 seconds and 4 git commands to generate.