Skip to main content

Plugin for ofxstatement that support conversion from Paypal csv to OFX

Project description

ofxstatement-paypal

Paypal plugin for ofxstatement

This project provides a custom plugin for ofxstatement for Paypal. It is based on the work done by gerasiov (https://github.com/gerasiov/ofxstatement-paypal/).

ofxstatement_* is a tool to convert proprietary bank statement to OFX format, suitable for importing to GnuCash / Odoo. Plugin for ofxstatement parses a particular proprietary bank statement format and produces common data structure, that is then formatted into an OFX file.

Users of ofxstatement have developed several plugins for their banks. They are listed on main ofxstatement site. If your bank is missing, you can develop your own plugin.

This repository is a fork of the original project, afrter the original author did not respond to the pull request, we decided to create a new repository to maintain the project.

Installation

From PyPI repositories

pip3 install ofxstatement-paypal-2

From source

git clone https://github.com/Alfystar/ofxstatement-paypal-2.git
cd ofxstatement-paypal-2
pip install build
python3 -m build --sdist --wheel
pip install dist/ofxstatement_paypal_2-<version>.tar.gz # replace <version> with the version number

Configuration

You have to configure some parameter in your local environment to allow the conversion.

To edit the config file, run this command:

$ ofxstatement edit-config

It's open a vim editor with current configuration.

Now add plug-in configuration, here is example with the default configuration:

[Conf-Name]
plugin = paypal-convert
encoding = utf-8
dataformat = %%d/%%m/%%Y
default_account = Paypal Personal

Now, base on your country, edit:

  • Conf-Name: is a text string, you can name it as you wish. Is used to identify the configuration selected when you run ofxstatement convert -t <Conf-Name> input.csv output.ofx.
  • dataformat: open your PayPal CSV and see your specific data-format.
    • %%d/%%m/%%Y is Europe standard.
    • %%m/%%d/%%Y is USA standard.
    • etc...
  • default_account: is text string, add on the beginning of the OFX file, help some program, like Home Bank, to detect witch account is used and help in import phase.

Keep in mind you can have all the configuration you want, just add a new section with the same structure and change the name of the section.

Usage

From Paypal Web interface, download a CSV of Bank statements with the personalized report period you wish. (PayPal Login :arrow_right: History :arrow_right: Download :arrow_right: customized)

Bank statements guide

Finally, open terminal in the directory where you download the report and type:

$ ofxstatement convert -t <Conf-Name> input.csv output.ofx

Add Alias

To simplify the use of the plugin, we strongly recommend adding an alias to your system (if in a Linux environment or on an emulated terminal) by adding the alias of this command to your .bash_aliases:

Note: this alias use for confuguration name paypal, if you use another name, change it in the alias

$ printf '\n# Paypal CSV convert to OFX format\nalias ofxPaypal="ofxstatement convert -t paypal"\n' >> ~/.bash_aliases

After that, reload your terminal (close and then reopen) and the usage change to:

  $ ofxPaypal Paypal.csv Paypal.ofx

Note: If after reload alias are not loading, go in your .bashrc and check if follow line are present, if not, add it on the end:

  # Alias definitions.
  # You may want to put all your additions into a separate file like
  # ~/.bash_aliases, instead of adding them here directly.
  # See /usr/share/doc/bash-doc/examples in the bash-doc package.

  if [ -f ~/.bash_aliases ]; then
      . ~/.bash_aliases
  fi

How use OFX file after conversion

The ofx format stands for 'Open Financial Exchange', it can be used to transfer your accounting records from one database to another. Once you have the ofx file, you can use any program to manage your finances. Among the many available, a non-exhaustive list of open source products is:

  • HomeBank, continuously updated program, present everywhere except in smartphones, with many beautiful ideas and listening to the community. 100% compatibility

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ofxstatement_paypal_2-3.0.0rc2.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ofxstatement_paypal_2-3.0.0rc2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file ofxstatement_paypal_2-3.0.0rc2.tar.gz.

File metadata

File hashes

Hashes for ofxstatement_paypal_2-3.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 ae9d36e01fe9d14e90c6c53a67086ebbf91338b8fa3a4d34139577912a601391
MD5 8c364e226425a19777f4ca62a0beaaf6
BLAKE2b-256 dd768ef36244902bc310f881aaae61c06672d90f00c3a9015e4fc03342fb8067

See more details on using hashes here.

File details

Details for the file ofxstatement_paypal_2-3.0.0rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for ofxstatement_paypal_2-3.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 6b5ea98bdfcafaed839889d596f4b0f26b8a9f932cddc0b711c7c1c5da649582
MD5 a759713c617ef88e07f94b71a9bc3205
BLAKE2b-256 c5aea50b2292c4f4a8e6de86b76c505412c3dfdfc132d924dd0030386165fe71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page