Skip to main content

hetzner-fix-report

Fixes Hetzner CSV reports by cleaning the CSV and merging project name from PDF.

Installation

Preliminary libraries

Debian, Ubuntu, etc

sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python-dev

Fedora, Red Hat, etc

sudo yum install gcc-c++ pkgconfig poppler-cpp-devel python-devel redhat-rpm-config

Arch, etc

sudo pacman -S poppler

Python package

This project is hosted on PyPI and can therefore be installed easily through pip:

pip install hetzner_fix_report

Dependending on your setup you may need to add --user after the install.

Usage

Single report

Use the command line interface to combine a csv and pdf file:

hetzner-fix-report Hetzner_2020-01-05_RXXXXXXXXXX.csv Hetzner_2020-01-05_RXXXXXXXXXX.pdf

Or shorten it using brace expansion:

hetzner-fix-report Hetzner_2020-01-05_RXXXXXXXXXX.{csv,pdf}

If you want to save the enriched csv output, use either the -o parameter as explained in the program's help or redirect output to a file using >.

Batchwise processing

When in a directory that holds multiple csv and pdf files the following shell script should call the tool and save its output within a newly created subdirectory:

mkdir -p fix
for csv in *.csv; do pdf=${csv%%.*}.pdf; hetzner-fix-report -o "fix/$csv" "$csv" "$pdf"; done

Original & enriched format

Hetzner's original CSV reports have the problem of being unprecise and not machine readable. This is especially noticeable in the long multiline comment column that may is mostly human readable. Currently the PDF report contains additional information about the entry's (server/backup) associated project. Since this information is not contained within the CSV reports I wanted to fix this. The enriched format has the following keys and examplary values:

Key Example New
id 2520725 ✔
name my-server ✔
project My Project ✔
type cx31
quantity 1
usage_hours 42 ✔
price 8.9
price_netto 4.9
price_max 2.49 ✔
day_from 2020-06-01
day_to 2020-06-30
is_backup False ✔
is_server True ✔
is_ceph False ✔

Metadata

Release files for hetzner-fix-report 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hetzner-fix-report 0.11.0
File Size Uploaded Provenance
hetzner_fix_report-0.11.0.tar.gz 10.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hetzner-fix-report 0.11.0
File Interpreter ABI Platform
hetzner_fix_report-0.11.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / hetzner_fix_report-0.11.0.tar.gz

Download URL hetzner_fix_report-0.11.0.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e083746c12ac8913acd5abf26b55d724db28c7f87c616c23b9a1789509909245
BLAKE2b-256 checksum
How to use checksums
d29b3d6cf60f27935b6edcabf37d70035b9094da43af84e36e192ff23054c3a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Release files / hetzner_fix_report-0.11.0-py3-none-any.whl

Download URL hetzner_fix_report-0.11.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f4a311a6c9ba8dc2efaec6f39ac1d55df4d48671813a2117ae93fdf9e2bb407
BLAKE2b-256 checksum
How to use checksums
58bd81afbae7b3c973de6056714d0cf808ef174bbfb16f4e1474c030cc8e351c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Security for hetzner-fix-report 0.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page