From 63011f7a53d0d38aec74cd25d8c86ae863b4d50f Mon Sep 17 00:00:00 2001 From: Alexandr Date: Thu, 18 Jan 2018 14:24:33 +0100 Subject: [PATCH] move webparts into assets --- .gitignore | 3 ++- add.php => assets/add.php | 0 index.html => assets/index.html | 3 ++- updater.php => assets/updater.php | 0 updater.py | 9 +++++---- webhook/index.php | 8 ++++++-- 6 files changed, 15 insertions(+), 8 deletions(-) rename add.php => assets/add.php (100%) rename index.html => assets/index.html (97%) rename updater.php => assets/updater.php (100%) mode change 100644 => 100755 updater.py diff --git a/.gitignore b/.gitignore index 2e9ec51..276310e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ settings.ini -.vscode/* \ No newline at end of file +.vscode/* +assets/* diff --git a/add.php b/assets/add.php similarity index 100% rename from add.php rename to assets/add.php diff --git a/index.html b/assets/index.html similarity index 97% rename from index.html rename to assets/index.html index 1558d17..891acdc 100644 --- a/index.html +++ b/assets/index.html @@ -6,6 +6,7 @@ +hui

Rutracker notifyer

I will notify you when interesting for you topic will be updated.

@@ -14,4 +15,4 @@
- \ No newline at end of file + diff --git a/updater.php b/assets/updater.php similarity index 100% rename from updater.php rename to assets/updater.php diff --git a/updater.py b/updater.py old mode 100644 new mode 100755 index 0f11407..9bdfb21 --- a/updater.py +++ b/updater.py @@ -1,4 +1,4 @@ - +#!/usr/bin/python3 # TODO - config file. import pymysql.cursors import urllib.request, json @@ -9,18 +9,19 @@ from urllib.parse import urlencode parser = ConfigParser() -parser.read('settings.ini') +parser.read('/home/ab/repos/tracker_watcher/settings.ini') mysql_user = parser.get('mysql', 'mysql_user') mysql_host = parser.get('mysql', 'mysql_host') mysql_db = parser.get('mysql', 'mysql_db') mysql_pass = parser.get('mysql', 'mysql_pass') -interval = '1 HOUR' -#interval = '1 MINUTE' +#interval = '1 HOUR' +interval = '20 MINUTE' # Connect to the database connection = pymysql.connect(host=mysql_host, user=mysql_user, db=mysql_db, + passwd=mysql_pass, cursorclass=pymysql.cursors.DictCursor) # If u_date which already stored older than fresh u_date diff --git a/webhook/index.php b/webhook/index.php index 884f34e..a830618 100644 --- a/webhook/index.php +++ b/webhook/index.php @@ -1,7 +1,11 @@ \ No newline at end of file +?>