Changed package structure
This commit is contained in:
parent
81ade4df38
commit
18e0cf1990
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,4 +3,3 @@ test/
|
||||
*__pycache__*
|
||||
build/
|
||||
regina.egg-info/
|
||||
regina/test/
|
||||
|
@ -1,4 +1,2 @@
|
||||
"""Gather analytics from nginx access logs and visualize them through generated images and a generated html"""
|
||||
# __package__ = 'regina'
|
||||
|
||||
from regina import database
|
||||
"""Gather analytics from nginx access logs and visualize them through generated plots and a generated html"""
|
||||
from regina.database import Database
|
||||
|
1
regina/data_collection/__init__.py
Normal file
1
regina/data_collection/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
"""log parsing"""
|
13
regina/sql/city_ranking.sql
Normal file
13
regina/sql/city_ranking.sql
Normal file
@ -0,0 +1,13 @@
|
||||
-- unused
|
||||
SELECT ci.name,COUNT(v.visitor_id)
|
||||
FROM city as ci, visitor as v, ip_range as i
|
||||
WHERE ci.city_id = i.city_id
|
||||
AND i.ip_range_id = v.ip_range_id
|
||||
AND EXISTS(
|
||||
SELECT 1
|
||||
FROM request AS r
|
||||
WHERE r.visitor_id = v.visitor_id
|
||||
AND r.time BETWEEN {timestamps[0]} AND {timestamps[1]}
|
||||
)
|
||||
GROUP BY ci.name
|
||||
ORDER BY COUNT(v.visitor_id)
|
8
regina/sql/country.sql
Normal file
8
regina/sql/country.sql
Normal file
@ -0,0 +1,8 @@
|
||||
-- unused
|
||||
SELECT co.name,COUNT(v.visitor_id)
|
||||
FROM country as co, city as ci, visitor as v, ip_range as i
|
||||
WHERE co.country_id = ci.country_id
|
||||
AND ci.city_id = i.city_id
|
||||
AND i.ip_range_id = v.ip_range_id
|
||||
GROUP BY co.name
|
||||
ORDER BY COUNT(v.visitor_id)
|
Loading…
Reference in New Issue
Block a user