ledger2beancount is a Perl script and relies on the following modules:
Date::Calc
DateTime::Format::Strptime
enum
File::BaseDir
Getopt::Long::Descriptive
List::MoreUtils
Regexp::Common
String::Interpolate
YAML::XS
You can install the required Perl modules with cpanminus:
cpanm --installdeps .
If you use Debian, you can install the dependencies with this command:
sudo apt install libdate-calc-perl libdatetime-format-strptime-perl \
libenum-perl libfile-basedir-perl libgetopt-long-descriptive-perl \
liblist-moreutils-perl libregexp-common-perl \
libstring-interpolate-perl libyaml-libyaml-perl
ledger2beancount itself consists of one script. You can clone the
repository and run the script directly or copy it to $HOME/bin
or
a similar location:
git clone https://github.com/beancount/ledger2beancount/
cd ledger2beancount
./bin/ledger2beancount examples/simple.ledger
ledger2beancount is available on AUR.
ledger2beancount is available in Debian.
You can create a Docker image for ledger2beancount using the Dockerfile
that's part of ledger2beancount's Git repository:
git clone https://github.com/beancount/ledger2beancount/
cd ledger2beancount
DOCKER_BUILDKIT=1 docker image build -t <IMAGENAME> .
Now you can run ledger2beancount like this:
docker run --rm -v <HOSTDIR>:/usr/ledger2beancount/docker:rw <IMAGENAME> docker/<LEDGER FILE>
You can install Perl and cpanm
from Homebrew:
brew install perl
brew install cpanminus
You can install Strawberry Perl on Windows
and use cpanm
as described above to install the required Perl modules.
ledger2beancount is not packaged for Windows but you can clone this Git
repository and run the script.
ledger2beancount is available for pkgsrc which is used on NetBSD and other operating systems.
ledger2beancount is available in Ubuntu.