changed imports
This commit is contained in:
parent
5064df1f0e
commit
165e25dac0
@ -1,9 +1,9 @@
|
||||
import sqlite3 as sql
|
||||
from re import match
|
||||
from time import mktime
|
||||
from database import t_request, t_user, t_file, t_filegroup, database_tables, get_filegroup
|
||||
from sql_util import sanitize, sql_select, sql_exists, sql_insert, sql_tablesize
|
||||
from datetime import datetime as dt
|
||||
from .database import t_request, t_user, t_file, t_filegroup, database_tables, get_filegroup
|
||||
from .sql_util import sanitize, sql_select, sql_exists, sql_insert, sql_tablesize
|
||||
|
||||
"""
|
||||
collect information from the access log and put it into the database
|
||||
|
@ -1,6 +1,6 @@
|
||||
import sqlite3 as sql
|
||||
from sql_util import sanitize, sql_select, sql_exists, sql_insert, sql_tablesize
|
||||
from os import path, listdir
|
||||
from .sql_util import sanitize, sql_select, sql_exists, sql_insert, sql_tablesize
|
||||
|
||||
|
||||
"""
|
||||
|
@ -1,10 +1,9 @@
|
||||
from enum import auto
|
||||
from collect import parse_log, add_requests_to_db
|
||||
from sys import argv, exit
|
||||
from database import create_db
|
||||
from os.path import isfile, isdir
|
||||
from visualize import visualize
|
||||
from settings_manager import read_settings_file
|
||||
from os.path import isfile
|
||||
from .visualize import visualize
|
||||
from .settings_manager import read_settings_file
|
||||
from .collect import parse_log, add_requests_to_db
|
||||
from .database import create_db
|
||||
|
||||
"""
|
||||
start regina, launch either collect or visualize
|
||||
@ -64,7 +63,7 @@ def error(arg):
|
||||
print("Error:", arg)
|
||||
exit(1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
def main():
|
||||
config_file = ""
|
||||
collect = False
|
||||
visualize_ = False
|
||||
@ -110,3 +109,6 @@ if __name__ == '__main__':
|
||||
if visualize_:
|
||||
if not isfile(settings["db"]): error(f"Invalid database path: '{settings['db']}'")
|
||||
visualize(settings)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -1,12 +1,12 @@
|
||||
import sqlite3 as sql
|
||||
from sys import argv, exit
|
||||
from database import t_request, t_user, t_file, t_filegroup, database_tables
|
||||
from sql_util import sanitize, sql_select, sql_exists, sql_insert, sql_tablesize, sql_get_count_where
|
||||
from re import fullmatch, findall
|
||||
import matplotlib.pyplot as plt
|
||||
import matplotlib as mpl
|
||||
from os.path import isdir
|
||||
from datetime import datetime as dt
|
||||
from .database import t_request, t_user, t_file, t_filegroup, database_tables
|
||||
from .sql_util import sanitize, sql_select, sql_exists, sql_insert, sql_tablesize, sql_get_count_where
|
||||
"""
|
||||
visualize information from the databse
|
||||
TODO:
|
||||
|
4
setup.py
4
setup.py
@ -13,7 +13,7 @@ setup(
|
||||
license="GPLv3",
|
||||
|
||||
packages=["regina"],
|
||||
install_requires=["sqlite3"],
|
||||
install_requires=[],
|
||||
|
||||
classifiers=[
|
||||
"Operating System :: POSIX :: Linux",
|
||||
@ -25,6 +25,6 @@ setup(
|
||||
|
||||
# scripts=["bin/nicole"],
|
||||
entry_points={
|
||||
"console_scripts": [ "regina=regina.main:main" ],
|
||||
"console_scripts": [ "regina=regina.regina:main" ],
|
||||
},
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user