<commit_before>uberspace-downtime-notify
=========================

A simple script which checks the twitter account of uberspace (or any other twitter account as well) for messages containing specific keywords.

To use this script, adopt the RELEVANT_HOSTS variable to fit your needs. If you can not delay emails locally (or want to deliver them to another user), change the NOTIFY_COMMAND, too.

A possible deployment would be in a cronjob on an uberspace account which launches the script once (or maybe twice) per day.

Example Deployment on a Uberspace Host
--------------------------------------

Clone this repository on the remote host, for example:

    git clone https://github.com/wichmannpas/uberspace-downtime-notify.git
    cd uberspace-downtime-notify

Specify the hosts relevant to you in the RELEVANT_HOSTS variable in the file `fetch.py`.

Configure a cronjob (i.e., `crontab -e`), for example this line to check all six hours:

    0  */6    *   *   *   $HOME/uberspace-downtime-notify/fetch.sh

Notification emails quoting the relevant Twitter thread will be sent to your primary email address of your Uberspace account (you can change this behaviour in the NOTIFY_COMMAND variable).

A hash of each sent message is stored in a file to notify you only once.


License
-------

Copyright 2016 <NAME>

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,<commit_msg>cronjob tries to execute a shellscript?<commit_after>uberspace-downtime-notify
=========================

A simple script which checks the twitter account of uberspace (or any other twitter account as well) for messages containing specific keywords.

To use this script, adopt the RELEVANT_HOSTS variable to fit your needs. If you can not delay emails locally (or want to deliver them to another user), change the NOTIFY_COMMAND, too.

A possible deployment would be in a cronjob on an uberspace account which launches the script once (or maybe twice) per day.

Example Deployment on a Uberspace Host
--------------------------------------

Clone this repository on the remote host, for example:

    git clone https://github.com/wichmannpas/uberspace-downtime-notify.git
    cd uberspace-downtime-notify

Specify the hosts relevant to you in the RELEVANT_HOSTS variable in the file `fetch.py`.

Configure a cronjob (i.e., `crontab -e`), for example this line to check all six hours:

    0  */6    *   *   *   $HOME/uberspace-downtime-notify/fetch.py

Notification emails quoting the relevant Twitter thread will be sent to your primary email address of your Uberspace account (you can change this behaviour in the NOTIFY_COMMAND variable).

A hash of each sent message is stored in a file to notify you only once.


License
-------

Copyright 2016 <NAME>

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
{'fraction_non_alphanumeric': 0.08955659276546091, 'fraction_numerical': 0.005834305717619603, 'mean_word_length': 3.488219895287958, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1904300', 'n_tokens_mistral': 922, 'n_tokens_neox': 871, 'n_words': 462}