Code Monkey home page Code Monkey logo

p24-cli's Introduction

p24

p24 is command line interface for communication with privat24 marchant information api.

Note: before using p24 you need to register merchant in privat24 system.

Features

  • getting merchant card balance

  • getting merchant statements list for intervals greater than 90 days

  • piping

  • loading progress bar

  • rate limiting and retrying

  • export merchant statements list to a xml|xlsx encoding

  • export only needed fields by --format options

Installation

go

go install github.com/dimboknv/p24-cli@latest
p24-cli version

build from source

git clone https://github.com/dimboknv/p24-cli.git && cd p24-cli
make build
./bin/p24 version

docker image

git clone https://github.com/dimboknv/p24-cli.git && cd p24-cli
make docker 
docker run -it --rm p24 p24 version

Usage

Usage:
  p24 [OPTIONS] statements [statements-OPTIONS]

Application Options:
      --debug                   Is debug mode?

Help Options:
  -h, --help                    Show this help message

[statements command options]
          --id=                 Merchant id
          --pass=               Merchant password
          --card=               Merchant card number
          --timeout=            http request timeout (default: 90s)
          --sd=                 Start date of statements date range with "dd.mm.yyyy" layout
          --ed=                 End date of statements date range with "dd.mm.yyyy" layout
      -f, --format=             Export format todo (default:
                                Card|Appcode|TranDate|Amount|CardAmount|Rest|Terminal|Description|,)
      -e, --encoding=[xml|xlsx] Export encoding (default: xml)
      -o, --out=                Export statements list to a file with specified extname encoding. If
                                empty export to stdout with '-e' encoding

Piping

You can use p24 in pipeline:

p24 statements --id="id" --pass="pass" --card="card" --sd="01.01.2022" --ed="01.02.2022" --timeout=10s --encoding=xml | dasel -p xml

Docker

docker run --rm -it -v ${PWD}:/p24 p24 p24 statements --id="id" --pass="pass" --card="card" --sd="01.01.2022" --ed="01.02.2022" --timeout=10s --out=out.xlsx

p24-cli's People

Contributors

dimboknv avatar

Watchers

 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.