-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
40 lines (29 loc) · 1.12 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
This is a small web application created using Using Python, Celery, Flask, and SQLite, which will scan the local folders and get information about the files, size, age, etc. The web interface has 2 API endpoints:
- list of all files (@/files)
- information about single file. (@/file)
result should be displayed in JSON format
To run:
1. Modify the config file diskMonitorConfig.py to suit your environemnt
SCAN_LOCATIONS is a list containing all the directories or files that you want monitored for changes
DATABASE name of the sqlite database
TABLE Name of the table used within sqlite
1. Make sure rabbitmq is running
sudo /etc/init.d/rabbitmq-server start
2. Start the celery worker
celery -A notifyTask worker --loglevel=info
3. Start python console and type
from notifyTask import monitorDisk
monitorDisk.delay()
4. Run Flask
python webui.py
Visit http://127.0.0.1:5000/files in your browser
two endpoints
/files
Get : list of files
Parameters
format (= html or json)
/file
GET : lists the file attributes
Parameters
path (= path to file on disk)
format (= html or json)