Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Jul 5, 2022. It is now read-only.
/fbihtaxPublic archive

CLI tool to help manage tax payments in FBiH (Bosnia and Herzegovina Federation) written in Rust. - Moved tohttps://sr.ht/~esensar/fbihtax/

License

NotificationsYou must be signed in to change notification settings

esensar/fbihtax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WORK IN PROGRESS - basic version available, used personally, but not thoroghly tested

Simple CLI tool to help manage tax payments in FBiH (Bosnia and Herzegovina Federation) written in Rust.

Currently PDF output requirespdftk to be installed, otherwisefdf orjson outputs can be used.

Installation

From binaries

Check out releases for built binaries. Script is also available for installation, but it requires root access. Script will also installpdftk version required to properly run this tool.

$ sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/esensar/fbihtax/main/scripts/install.sh)"

or

$ sudo sh -c "$(wget -qO- https://raw.githubusercontent.com/esensar/fbihtax/main/scripts/install.sh)"

or

$ sudo sh -c "$(fetch -o - https://raw.githubusercontent.com/esensar/fbihtax/main/scripts/install.sh)"

Archlinux

AUR packages are available for ArchLinux.

From source

Clone the repository and installfbihtax withcargo:

$ cargo install --path .

Note: This requirespdftk to be installed manually.

Usage

This is preferrably used automatically on some server, but it can also be used manually if needed. For automatic example check outfbihtax-example-project which can also be used as a template.

For more information usefbihtax --help.

Generating AMS form

This tool supports multiple formats for AMS form (PDF being the most interesting probably). To generate simple PDF run:

$ fbihtax ams --income 1000.00 --output-format pdf

Above command requirespdftk to be installed and available on path. If not available on path, path to the tool can be provided in configuration.

For more customizationfdf,xfdf orjson formats can be generated. To use custom fonts in the resulting PDF:

$ fbihtax ams --income 1000.00 --output-format xfdf$ pdftk amscache.pdf fill_form amsform.xfdf output amsform.pdf replacement_font "Your Font Family Here"

Above command requires pdftk-java version above v3.3.0 since replacement_font was not available before

Check outfbihtax ams --help for more options.

Generating tax breakdown

This tool can provide a basic tax breakdown to make it easier to calculate tax payments.

$ fbihtax tax-breakdown --income 1000.00

This will generatetaxbreakdown.json in current directory. Check outfbihtax tax-breakdown --help for more options.

Generating GPD form

This tool can also generate GPD form (yearly tax report). It relies on database build by generating AMS forms using this tool. If some data is missing from the database it can be manually added usingfbihtax db set of commands. It is also possible to provide extra GIP (yearly tax report provided by employer) to combine properly with data in db.

$ fbihtax gpd --year 2021 --output-format pdf

Just like for AMS commands, this command can output different formats, which can be useful to add custom fonts to the PDF:

$ fbihtax gpd --year 2021 --output-format xfdf$ pdftk gpdcache.pdf fill_form gpdform.xfdf output gpdform.pdf replacement_font "Your Font Family Here"

Above command requires pdftk-java version above v3.3.0 since replacement_font was not available before

Check outfbihtax gpd --help for more options andfbihtax db --help for more options regarding database management.

Configuration

This tool looks for configuration in.fbihtax.json file in current working directory. Besides that main configuration, optionally separate user and client configuration JSON files can be provided.

For all options, check outexample configuration.User andclient configuration JSON files are also present inexamples directory.

To provide user and client configurations, use--user-config file_name.json and--client-config file_name.json.

License

MIT

About

CLI tool to help manage tax payments in FBiH (Bosnia and Herzegovina Federation) written in Rust. - Moved tohttps://sr.ht/~esensar/fbihtax/

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp