Skip to content

Extracts details from Mpesa monthly statements to struct, that can be exported to db, sql, ets or to file.

License

Notifications You must be signed in to change notification settings

r-coh/mpesa_statements_scrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StatementsReader

Extract transactions from Mpesa Statement pdfs. Extract to sql_tables, ets tables, csv, json. Synthesis for preset metadata.

Usage

To perform an export, make sure a couple of dependecies are installed.

  1. pdftotext - installed with pip install pdftotext
  2. erlang - make sure erlang is installed sudo apt-get install esl-erlang
  3. elixir - installed with with sudo apt-get install elixir Visit https://www.erlang-solutions.com/downloads/ for the latest erlang/elixir version.

To build a commandline executable.

  1. Fetch the dependecies mix deps.get
  2. Build executable mix escript.build
  3. A new executable named xpesa_parser should be available in the currect directory.

To install this executable to your system.

  1. copy the executable to a directory in your $PATH
  2. make sure the executable is executable chmod +x xpesa_parser

To extract mpesa statements

  1. Download Mpesa Pdf statements, and add them to a folder.
  2. Run the executable issuing password and path to the folder with mpesa statements xpesa_parser <path to folder> -p password -o <path to output folder>
  3. The output folder will contain the extracted transactions, in json format(default) or in an SQL if specified with --sql option while riunning the executable. xpesa_parser --help will show the available options.

Installation

If available in Hex, the package can be installed by adding statements_reader to your list of dependencies in mix.exs:

def deps do
  [
    {:statements_reader, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/statements_reader.

About

Extracts details from Mpesa monthly statements to struct, that can be exported to db, sql, ets or to file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages