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 /Tryton. 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_currency = EUR
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.1.0.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.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file ofxstatement_paypal_2-3.1.0.tar.gz.

File metadata

  • Download URL: ofxstatement_paypal_2-3.1.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for ofxstatement_paypal_2-3.1.0.tar.gz
Algorithm Hash digest
SHA256 d4b0d410fe599e99baf55a072b18136d20df962be4baf1481ff5f702000547a9
MD5 f56f2d04350a854906aae6188e051aa8
BLAKE2b-256 482a3e5f973365cacbe007c931c9f407f05de90e4d377ee2b2033b2bf321bbf2

See more details on using hashes here.

File details

Details for the file ofxstatement_paypal_2-3.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ofxstatement_paypal_2-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e18e4bfcc13b11f49e6f802671f136166e7f9a4c93f0b970f8c30a72f60230f
MD5 647e812582e4d217883b0909f6e7be90
BLAKE2b-256 def0cf35dee5934daa15bb93a3ce8b9af7370c1fa83c0270258ce6bf2b1fa75b

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