npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ovh-bill-importer

v1.2.0

Published

Download and organize all your ovh.com / OVHcloud bills

Downloads

5

Readme

ovh-bill-importer

NPM Version

This code download all invoices from you OVH account and store them as an easy to use directory scruture, with a summary tsv file.

This tsv file can be open in any tabler to extract VAT for your accountancy.

This script use the npm packages @ovh-api/api and @ovh-api/me

setup

npm install -g ovh-bill-importer

or use npx

npx ovh-bill-importer --help

ChangeLog

  • V 1.2.0 replace Bluebird by Nativebird, fix --api parameter
  • V 1.1.1 add --max-age with time-range like 4m for 4 month, 1y for 1 year, 10d for 10 days.
  • V 1.1.0 add --api with type in (eu, ca, us).
  • V 1.0.6 fix regression in incremental execution.
  • V 1.0.5 properly handle error whene downloading invoices.
  • V 1.0.4 properly recover on too many request error.
  • V 1.0.3 properly handle API connexion errors.

Usage

$ ovh-bill-importer --help
Usage: index [options]

Options:
  -V, --version               output the version number
  -u, --utc                   use UTC times, by defaut use localhost timezone
  -d, --dest <path>           destination directory
  -s, --split <type>          hierarchy model year/month/none default is month (default: "month")
  -c, --concurrency <number>  max concurent download
  --token <tokenfile>         save and reuse the certificat by storing them in a file
  -m, --max-age <timeYMD>     max time back you want to download, end with Y/M/D (Year/Month/Day) (default: "1Y")
  -h, --help                  output usage information

formats -s

  • month create a directory per month ie: 2019/01
  • year create a directory per year ie: 2019/01
  • none do not create any directory just place all invoice in the same directory

utc / locale -u

If utc flag is enabled, convert add date as UTC. If not the script will use your current timezone.

destination -d

Provide a local path to save all invoice, a directory containing the nic-handle will be create into this destination to avoid mixing invoice from different accounts.

concurrency -c

Download multiple invoice un parallel, Do not ask for much concurrency, or Ovh will block your IP.

sample

npm install -g ovh-bill-importer
ovh-bill-importer --dest=bill --split=month --concurrency=3 --token=token.json

ovh-vps-config-failover on vps

Tree


The destination directory may look like that:

```bash
nichandle-ovh
 - summary.tsv
 - 2019
    - 01
        - 2019-01-01_FR123406_12.99EUR.pdf
        - 2019-01-05_FR123407_2.99EUR.pdf
    - 02
        - 2019-02-05_FR123461_2.99EUR.pdf
    - 03
        - 2019-03-15_FR123801_299.99EUR.pdf
        - 2019-03-25_FR123802_2.99EUR.pdf
```