Git Product home page Git Product logo

zhang's Introduction

账 Zhang

a plain text double-accounting tool

GitHub Workflow Status Crates.io Coverage Status Crates.io (recent) docs.rs Crates.io

Online Demo Web: zhang online demo

due to security concern, we only provide the readonly file system, so some operation may not be supported in the demo.

Features

  • Independent Direcitve: all directives in zhang are independent, you can write them in any file with any order.
  • More Precise Control: features, like commodity decimal precision and datetime supported for directive, provide more control
  • Document Management Enhancement: zhang has a good document management feature to allow you collect and control document easiler and effective, like receipts.

Compatibility with beancount

beancount and zhang are both text based accounting tools, and they are some familiar.

But zhang deprecates some directives, like note, pad and push_tag, and aslo evolves some direcitves, like balance. So your beancount file may not be compatible with zhang, we will provide a tool to convert beancount format to zhang format, and vice versa.

Installation

With Docker

The image is available at kilerd/zhang, you shold persist the /data folder, which contains all your zhang accounting files.

NOTE: currently zhang only provide the snapshot version.

Example for docker compose:

version: '3'

volumes:
  zhang_data:
    driver: local

services:
  zhang:
    image: kilerd/zhang:snapshot
    ports:
      # For the web front-end, you may change the port
      - "8000:8000"
    volumes:
      - "zhang_data:/data"
      # Alternatively, you can mount a local folder
      # - "./zhang_data:/data"

Compatibility with beancount

zhang has its own file structure, which start with endpoint main.zhang. if you wanna start zhang with your beancount file, you may need to specify the endpoint of main file.

if you are using cli command:

zhang server /data --endpoint main.bean

if you are using docker run command:

docker run --name zhang -v "/local_beancount_data:/data" -p "18000:8000" kilerd/zhang:snapshot --endpoint main.bc

or with docker-compose file:

services:
  zhang:
    image: kilerd/zhang:snapshot
    command: --endpoint main.bean

From source

to compile the project, you'll need:

  • node 16: used for frontend react project
  • rust

then you need to build the frontend project first:

$ cd frontend
$ yarn & yarn build

then compile the backend service:

$ cd ..
$ cargo build --release

Development

Flamegraph

command is CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --root -- parse ./example-accounting

zhang's People

Contributors

dependabot[bot] avatar kilerd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.