dmitry-merzlyakov / nledger

.Net Ledger: Double-Entry Accounting System
Other
182 stars 51 forks source link
accounting cli csharp dotnet ledger plaintext-accounting

License GitHub release Gitter chat room

.Net Ledger: Double-Entry Accounting System

.Net Ledger (NLedger) is a complete .Net port of the Ledger, an excellent powerful command line accounting system. The main purpose of this project is to enable all Ledger features to .Net world.

NLedger command line utility (NLedger.cli) is highly compatible with the original Ledger. It supports all original features and command line options; the produced output is 100% identical to the original. Reliable compatibility level confirmed by 99.6% Ledger tests (except for a few that require deprecated features). Everything is done to ensure that users have the feeling of using a genuine Ledger.

NLedger is written in pure C# with no dependencies on any external libraries or any platform-specific features (with the exception of additional extensions that may depend on the connection libraries). This allows NLedger to work properly on any .Net compatible system and be embedded in any .Net application.

Quick Start

First, install Ledger by following the instructions in the Installation section of this document.

If you have just installed NLedger MSI on your Windows computer and want to know what to do next, you can try:

If you have just extracted the NLedger zip package to your local computer or built NLedger from source codes, you can try:

Features

NLedger faithfully reproduces all valuable Ledger capabilities. Basically, anything the Ledger can do, NLedger can. Here is a short list of the most important Ledger features:

And many other features, really. Ledger is very efficient tool with wide capabilities, so it is highly recommended to familiar with the original documentation, read other resources (http://plaintextaccounting.org) and keep yourself in loop with Ledger Community.

The Use of NLedger

So, if Ledger is so nice, why NLedger? Here is the answer or, in other words, the project mission :)

The first benefit of NLedger is bringing Ledger functionality to the Windows world. Even as a developer, I ran into difficulties running Ledger 3.1.1 on Windows 10, and it seems to me that for inexperienced users this will be an unsolvable problem.

I want everyone to be able to install NLedger with one click and use it exactly as described in the Ledger documentation. Ledger, but on any Windows - this was the first target.

The second benefit of NLedger is that it is a native .Net application. This gives unlimited possibilities for expanding it with additional functions and integration with other products on the .Net platform. It was the second reason why it was decided to port Ledger to .Net.

Project Vision and Development Progress

The ultimate overall goal of this project is to have a fully functional Ledger on .Net platform in the form of a command line utility plus provide a way to give seamless access to the same functions for external .Net applications.

Installation

NLedger can run on any system that supports .Net (either .Net Framework or .Net Core). However, the testing framework and helper tools use PowerShell, so you can only run Ledger tests if you also have PowerShell installed on your system. If you also want to use the Python extension, you should have Python on your machine.

System Requirements

PowerShell is optional, you can still use NLedger if it is not installed, but the ability to run PowerShell scripts makes your life easier.

Build and Install from source code

(Windows, Linux, OSX) Execute the following commands:

git clone https://github.com/dmitry-merzlyakov/nledger
cd nledger
pwsh -file ./Contrib/nledger-tools.ps1 python-connect
pwsh -file ./get-nledger-up.ps1 -install

On Windows, depending on your Powershell version, the last commands may look like:

powershell -ExecutionPolicy RemoteSigned -File ./Contrib/nledger-tools.ps1 python-connect
powershell -ExecutionPolicy RemoteSigned -File ./get-nledger-up.ps1 -install

The command python-connect is needed if you want to run Python-related unit tests. It can be skipped otherwise.

Install from NLedger Installation Package

(Windows only)

Note: the installer will request elevated permissions to call NGen.

Install from Binary Package

(Windows only)

OR (for impatient people):

NLedger NuGet package

NLedger is available as NuGet packages. Read more how to develop with NLedger here.

NLedger Python Module

NLedger Python module provides Ledger features in a Python interpreter session. It can be used as stand-alone software; it does not require installing NLedger. The latest package can be downloaded from Releases. You can find more information in .Net Ledger Documentation or in the module Readme file.

Documentation

As mentioned, the main source of information on how to use this application are Ledger-related resources and the community. Therefore:

Contribution

NLedger is currently in active development and some enhancements are still coming. You can check the planes in Roadmap. However, code quality is a primary focus, so any bug fixing requests and/or fixing changes will be processed in the first order. Therefore, if you want to help this project:

How to inform about found defects

  1. First of all, please check project Issues on GitHub and Known Issues in CHANGELOG. The issue you found might be already recorded.
  2. Check that the issue is reproducible and describe it.
  3. Ideally, locate the defect and create Ledger test file that exposes the problem. This file should properly pass test with the original Ledger and fail with NLedger.

Credits

Special thanks to John Wiegley for the nicest accounting tool I've ever seen. I really like it very much and it was a great pleasure for me to analyze its code in the smallest detail. Thought it was quite big challenge for me (GDB left the corns on my hands :)) I've got an invaluable experience. Thank you!

I would like to express my gratitude to the creators of the PythonNet library, who have worked hard to solve complex problems of interacting with Python and provided the developers with an effective tool.

My personal thanks to the people who contributed to the development of the project:

Contact

Licensing

The code is licensed under 3-clause FreeBSD license.

(c) 2017-2023 Dmitry Merzlyakov