From 34a9fd6d40537d20b9d2d56a1dabaa403d835803 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Mon, 21 Sep 2020 08:10:06 +0200 Subject: [PATCH] Added metadata for bitbar --- ping.1m+.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ping.1m+.py b/ping.1m+.py index f8e92ec..2d96472 100755 --- a/ping.1m+.py +++ b/ping.1m+.py @@ -2,6 +2,14 @@ # -*- coding: utf-8 -*- """ Simulates httping for `argos `""" +# httping +# v1.0 +# Tobias Schmidl +# schtobia +# Short description of what your plugin does. +# +# python,requests +# https://github.com/schtobia/argos-httping/blob/master/ping.1m+.py import sys #for redirecting print to stderr import datetime #for the whole ms → s and vice versa stuff @@ -14,19 +22,17 @@ __license__ = "MIT" __version__ = "0.0.1" __maintainer__ = "Tobias Schmidl" -# in seconds -max_ping = datetime.timedelta(milliseconds = 1000) -targets = ["https://www.google.de", "https://www.bing.com", "https://www.wikipedia.org" ] +max_ping = datetime.timedelta(milliseconds = 1000) # in seconds +targets = ["https://www.google.de", "https://www.bing.com", "https://www.wikipedia.org"] max_ping_in_ms = max_ping.total_seconds() * 1000 class Themes: + # Themes are from http://colorbrewer2.org/ purple_green = ["#762a83", "#9970ab","#c2a5cf","#a6dba0","#5aae61","#1b7837"] red_green = ["#d73027", "#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"] -# shellcheck disable=SC2034 original = ["#acacac","#ff0101","#cc673b","#ce8458","#6bbb15","#0ed812"] -# Configuration selected_colors = red_green def colorize(response_time):