Code Monkey home page Code Monkey logo

kimsufi-availability's Introduction

Kimsufi availability

Kimsufi servers are very interesting but extremely difficult to obtain. This script parses the OVH API and sends you a mail when a server is available.

Usage

Usage:
  kimsufi.py [options]
  kimsufi.py <model>... [options]

Options:
  -h, --help     Show this help.
  -v, --version  Show version.
  -m, --mail     Send a mail when a server is available.

Examples:
  kimsufi.py
  kimsufi.py KS-1 KS-3
  kimsufi.py KS-1 --mail

Output example

$ python kimsufi.py KS-1

KS-1
====
Gravelines : 1H-high
Strasbourg : unavailable
Roubaix : unavailable
Beauharnois : unavailable

=======
RESULT : 1 server is available on Kimsufi
=======

Installation

The script works on Python 2.x and 3.x. It's just a simple script, so no setup.py is offer :

$ git clone https://github.com/ncrocfer/kimsufi-availability.git
$ cd kimsufi-availability
$ pip install -r requirements.txt
$ python kimsufi.py

Mail configuration

A mail can be sent with the --mail option. You can configure it with a config.json file :

$ cp config.json.sample config.json
$ vim config.json
{
    "email": {
            "host": "...",
            "port": 587,
            "username": "...",
            "password": "...",
            "mail_from": "...",
            "mail_to": "..."
    }
}

Using Cron

You can create a cron job to send you a mail periodically. For example :

* * * * * python kimsufi.py KS-1 --mail

License

This script is under the Beerware license.

kimsufi-availability's People

Contributors

yagop avatar ncrocfer avatar

Stargazers

khepri avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.