add log: implement. inicio y carga error.log

This commit is contained in:
jp.av.dev 2022-11-24 00:40:20 -03:00
parent 42c8868571
commit 0c9b3cf76a
4 changed files with 577 additions and 32 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ maps/map_200.svg
maps/map_300.svg maps/map_300.svg
maps/map_all.svg maps/map_all.svg
test/ test/
log/
*.db *.db
config.cfg config.cfg
TODO TODO

View File

@ -12,6 +12,7 @@ from rich import box
from rich.console import Console from rich.console import Console
from rich.table import Table from rich.table import Table
import consultas.querys_sqlite as querys import consultas.querys_sqlite as querys
import logging
selfpath = os.path.abspath(os.path.dirname(__file__)) selfpath = os.path.abspath(os.path.dirname(__file__))
ownip = requests.get('https://ifconfig.me/').text ownip = requests.get('https://ifconfig.me/').text
@ -20,13 +21,19 @@ parser.read(f'{selfpath}/config.cfg')
token = parser.get('iplocate','token') token = parser.get('iplocate','token')
token = token.strip("'") token = token.strip("'")
muevelog = f'{selfpath}/muevelog.sh ' muevelog = f'{selfpath}/muevelog.sh '
log_file = f'{selfpath}/log/iplocate.log'
console = Console() console = Console()
#tkn=True #tkn=True
# IP validate https://stackoverflow.com/questions/319279/how-to-validate-ip-address-in-python # IP validate https://stackoverflow.com/questions/319279/how-to-validate-ip-address-in-python
ip_regx = "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])$" ip_regx = "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])$"
ip_local_regx = "^192\.168\.0\.([0-9]|[0-9][0-9]|[0-9][0-9][0-9])$" ip_local_regx = "^192\.168\.0\.([0-9]|[0-9][0-9]|[0-9][0-9][0-9])$"
def log_usage(proceso, info):
usage_log = f"Proceso:[{proceso}] - Info: [{info}]"
logging.info(usage_log)
def filtro_ip_propia(ip): def filtro_ip_propia(ip):
return True if ip != ownip and not re.search(ip_local_regx, ip) else False return True if ip != ownip and not re.search(ip_local_regx, ip) else False
@ -39,10 +46,8 @@ def print_ipinfo(ip, tkn=True):
print(f'Exception sql_alch.consulta_ip({ip})\n',ex) print(f'Exception sql_alch.consulta_ip({ip})\n',ex)
ip_info = None ip_info = None
if isinstance(ip_info, dict): if isinstance(ip_info, dict):
#print('es dict')
print_tabla_ip(ip_info) print_tabla_ip(ip_info)
elif isinstance(ip_info, list): elif isinstance(ip_info, list):
#print('es lista')
lista_visitas=[] lista_visitas=[]
contad=0 contad=0
for tupla in ip_info: for tupla in ip_info:
@ -90,7 +95,6 @@ def print_ipinfo(ip, tkn=True):
def print_tabla_ip(ip_info): def print_tabla_ip(ip_info):
# color dodger_blue2
tbl_ip = Table(box = box.ROUNDED, highlight=True, border_style="dim plum1") tbl_ip = Table(box = box.ROUNDED, highlight=True, border_style="dim plum1")
tbl_ip.add_column("IP", justify="left", style="bold #005fff", no_wrap=True) tbl_ip.add_column("IP", justify="left", style="bold #005fff", no_wrap=True)
tbl_ip.add_column(f"{ip_info['ip']}", justify="left", style="#00ff5f") tbl_ip.add_column(f"{ip_info['ip']}", justify="left", style="#00ff5f")
@ -138,8 +142,6 @@ def print_tabla_ip(ip_info):
print('Exception print(tabla_ip): ', ex) print('Exception print(tabla_ip): ', ex)
def print_tabla_visita(lista_visitas): def print_tabla_visita(lista_visitas):
# color dodger_blue2
#tbl_v = Table(title=f"[bold][yellow]Visitas registradas:[/yellow] [green]{lista_visitas[0]}[/bold][/green]",
tbl_v = Table(box = box.ROUNDED, show_lines = False,row_styles=["dim", ""], border_style="dark_orange3") tbl_v = Table(box = box.ROUNDED, show_lines = False,row_styles=["dim", ""], border_style="dark_orange3")
tbl_v.add_column("Fecha visita", justify="center", style="bright_yellow", no_wrap=True) tbl_v.add_column("Fecha visita", justify="center", style="bright_yellow", no_wrap=True)
tbl_v.add_column("Codigo", justify="center", style="bold dodger_blue2") tbl_v.add_column("Codigo", justify="center", style="bold dodger_blue2")
@ -317,4 +319,10 @@ def uso():
console.print(ayuda) console.print(ayuda)
if __name__ == "__main__": if __name__ == "__main__":
logging.basicConfig(
filename = log_file,
format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level = logging.INFO
)
logging.info("iplocate inicio")
main() main()

View File

@ -13167,6 +13167,456 @@
<g clip-path="url(#page)" transform="translate(1024, 0)"> <g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 448.16768 268.79371517811666 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/> <path d="M 448.16768 268.79371517811666 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g> </g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 428.64540444444447 271.41940190711347 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 428.64540444444447 271.41940190711347 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 428.64540444444447 271.41940190711347 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 250.67136000000005 521.7743573471446 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 250.67136000000005 521.7743573471446 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 250.67136000000005 521.7743573471446 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 87.44519111111111 297.4408988523738 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 87.44519111111111 297.4408988523738 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 87.44519111111111 297.4408988523738 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 449.9795911111112 295.8518197696289 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 449.9795911111112 295.8518197696289 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 449.9795911111112 295.8518197696289 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 651.2362666666667 356.6988320505172 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 651.2362666666667 356.6988320505172 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 651.2362666666667 356.6988320505172 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 507.1148088888889 280.22857744573724 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 507.1148088888889 280.22857744573724 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 507.1148088888889 280.22857744573724 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 288.67342222222226 515.8147451226555 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 288.67342222222226 515.8147451226555 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 288.67342222222226 515.8147451226555 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 263.5108977777778 537.5089556734115 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 263.5108977777778 537.5089556734115 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 263.5108977777778 537.5089556734115 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 310.92238222222227 509.6533007554587 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 310.92238222222227 509.6533007554587 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 310.92238222222227 509.6533007554587 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 442.5860266666667 282.41427845074503 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 442.5860266666667 282.41427845074503 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 442.5860266666667 282.41427845074503 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 658.2080000000001 360.806909651745 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 658.2080000000001 360.806909651745 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 658.2080000000001 360.806909651745 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 586.0347733333334 330.69034105290154 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 586.0347733333334 330.69034105290154 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 586.0347733333334 330.69034105290154 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 507.00529777777786 299.449199738549 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 507.00529777777786 299.449199738549 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 507.00529777777786 299.449199738549 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 492.5845333333333 275.01696933985113 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 492.5845333333333 275.01696933985113 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 492.5845333333333 275.01696933985113 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 288.2032355555556 523.0839022750399 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 288.2032355555556 523.0839022750399 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 288.2032355555556 523.0839022750399 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 655.0512355555555 351.9205333206956 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 655.0512355555555 351.9205333206956 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 655.0512355555555 351.9205333206956 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 545.3842488888889 314.7611372334678 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 545.3842488888889 314.7611372334678 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 545.3842488888889 314.7611372334678 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 647.2384000000001 352.52632720132823 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 647.2384000000001 352.52632720132823 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 647.2384000000001 352.52632720132823 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 494.2823822222223 310.35598994768634 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 494.2823822222223 310.35598994768634 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 494.2823822222223 310.35598994768634 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 565.5553422222223 332.08823619140946 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 565.5553422222223 332.08823619140946 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 565.5553422222223 332.08823619140946 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 225.50769777777782 429.2059987179602 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 225.50769777777782 429.2059987179602 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 225.50769777777782 429.2059987179602 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 611.4914133333333 253.83121635054607 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 611.4914133333333 253.83121635054607 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 611.4914133333333 253.83121635054607 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 653.1972266666667 414.029320040347 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 653.1972266666667 414.029320040347 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 653.1972266666667 414.029320040347 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 302.9738666666667 511.3961617840627 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 302.9738666666667 511.3961617840627 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 302.9738666666667 511.3961617840627 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 554.6187377777778 312.01580832147744 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 554.6187377777778 312.01580832147744 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 554.6187377777778 312.01580832147744 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 561.9118933333333 248.64032605956635 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 561.9118933333333 248.64032605956635 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 561.9118933333333 248.64032605956635 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 270.11740444444445 548.2091264188477 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 270.11740444444445 548.2091264188477 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 270.11740444444445 548.2091264188477 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 693.30304 372.8885007625751 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 693.30304 372.8885007625751 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 693.30304 372.8885007625751 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 659.7095822222223 367.6000417463539 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 659.7095822222223 367.6000417463539 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 659.7095822222223 367.6000417463539 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 435.9089777777778 271.5967687443646 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 435.9089777777778 271.5967687443646 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 435.9089777777778 271.5967687443646 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 490.1604977777778 292.64444630689246 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 490.1604977777778 292.64444630689246 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 490.1604977777778 292.64444630689246 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 449.9218488888889 266.73097904195873 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 449.9218488888889 266.73097904195873 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 449.9218488888889 266.73097904195873 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 833.7654044444445 333.7681274387417 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 833.7654044444445 333.7681274387417 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 833.7654044444445 333.7681274387417 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 88.24533333333329 327.0831649295985 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 88.24533333333329 327.0831649295985 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 88.24533333333329 327.0831649295985 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 292.41870222222224 501.419588283211 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 292.41870222222224 501.419588283211 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 292.41870222222224 501.419588283211 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 653.953848888889 416.0713057549502 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 653.953848888889 416.0713057549502 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 653.953848888889 416.0713057549502 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 746.2646044444444 464.56849313173797 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 746.2646044444444 464.56849313173797 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 746.2646044444444 464.56849313173797 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 205.4466844444445 357.65695360538024 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 205.4466844444445 357.65695360538024 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 205.4466844444445 357.65695360538024 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 442.49927111111117 282.0783552634014 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 442.49927111111117 282.0783552634014 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 442.49927111111117 282.0783552634014 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 523.04768 247.65388918861385 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 523.04768 247.65388918861385 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 523.04768 247.65388918861385 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 653.4640355555556 350.88178203506686 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 653.4640355555556 350.88178203506686 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 653.4640355555556 350.88178203506686 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 760.8548977777779 377.21821237269 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 760.8548977777779 377.21821237269 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 760.8548977777779 377.21821237269 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 429.8787555555556 267.89047081769485 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 429.8787555555556 267.89047081769485 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 429.8787555555556 267.89047081769485 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 269.55648 547.3040901806605 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 269.55648 547.3040901806605 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 269.55648 547.3040901806605 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 453.6270222222222 271.6300367203086 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 453.6270222222222 271.6300367203086 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 453.6270222222222 271.6300367203086 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 476.5902222222222 314.71784528615484 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 476.5902222222222 314.71784528615484 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 476.5902222222222 314.71784528615484 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 848.1801955555555 403.7118744295924 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 848.1801955555555 403.7118744295924 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 848.1801955555555 403.7118744295924 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 325.3525333333333 462.3203203078204 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 325.3525333333333 462.3203203078204 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 325.3525333333333 462.3203203078204 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 199.97425777777778 309.3787278763221 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 199.97425777777778 309.3787278763221 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 199.97425777777778 309.3787278763221 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 289.91957333333335 511.07582653949584 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 289.91957333333335 511.07582653949584 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 289.91957333333335 511.07582653949584 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)"> <g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 797.48224 326.9801587634675 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/> <path d="M 797.48224 326.9801587634675 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g> </g>
@ -15219,6 +15669,78 @@
<g clip-path="url(#page)" transform="translate(1024, 0)"> <g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 465.8370844444445 272.5857054826627 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/> <path d="M 465.8370844444445 272.5857054826627 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g> </g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 453.4037333333333 273.82221755682434 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 453.4037333333333 273.82221755682434 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 453.4037333333333 273.82221755682434 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 428.64540444444447 271.41940190711347 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 428.64540444444447 271.41940190711347 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 428.64540444444447 271.41940190711347 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 462.3324444444445 297.00735536435894 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 462.3324444444445 297.00735536435894 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 462.3324444444445 297.00735536435894 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 442.49927111111117 282.0783552634014 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 442.49927111111117 282.0783552634014 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 442.49927111111117 282.0783552634014 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 449.9218488888889 266.73097904195873 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 449.9218488888889 266.73097904195873 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 449.9218488888889 266.73097904195873 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 451.24536888888895 267.9646940993527 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 451.24536888888895 267.9646940993527 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 451.24536888888895 267.9646940993527 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 88.24533333333329 327.0831649295985 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 88.24533333333329 327.0831649295985 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 88.24533333333329 327.0831649295985 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 225.23861333333338 314.9816210742327 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 225.23861333333338 314.9816210742327 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 225.23861333333338 314.9816210742327 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)"> <g clip-path="url(#page)">
<rect fill="#ffffff" fill-opacity="0.8" height="12" width="1024" x="0" y="756"/> <rect fill="#ffffff" fill-opacity="0.8" height="12" width="1024" x="0" y="756"/>
<text fill="#000000" font-family="Arial, Helvetica, sans-serif" font-size="9px" x="2" y="765">Maps &amp; Data (C) OpenStreetMap.org contributors</text> <text fill="#000000" font-family="Arial, Helvetica, sans-serif" font-size="9px" x="2" y="765">Maps &amp; Data (C) OpenStreetMap.org contributors</text>

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -1,7 +1,7 @@
import os import os
import time import time
import subprocess import subprocess
from iplocate import re, requests, token, filtro_ip_propia, selfpath, parser from iplocate import re, requests, token, filtro_ip_propia, selfpath, parser, log_usage
from json import loads from json import loads
from datetime import datetime from datetime import datetime
from sqlalchemy import create_engine from sqlalchemy import create_engine
@ -147,7 +147,7 @@ def ip_registrada(ip):
def carga_access_log(log): def carga_access_log(log):
if os.path.exists(log): if os.path.exists(log):
nombre_log = log.split('/')[-1] nombre_log = log.split('/')[-1]
console.print(f'[yellow]Registrando [[/yellow]{nombre_log}[yellow]][/yellow]') console.print(f'[yellow]Procesando [[/yellow]{nombre_log}[yellow]][/yellow]')
try: try:
with open(log, 'r') as lista: with open(log, 'r') as lista:
try: try:
@ -223,9 +223,10 @@ def carga_access_log(log):
def carga_error_logs(log): def carga_error_logs(log):
if os.path.exists(log): if os.path.exists(log):
nombre_log = log.split('/')[-1] nombre_log = log.split('/')[-1]
console.print(f'[yellow]Registrando [[/yellow]{nombre_log}[yellow]][/yellow]') console.print(f'[yellow]Procesando [[/yellow]{nombre_log}[yellow]][/yellow]')
try: try:
with open(log, 'r') as lista: with open(log, 'r') as lista:
ip, fecha, url, metodo = None, None, None, None
try: try:
largo = subprocess.run(['wc', '-l', log], capture_output=True, text=True) largo = subprocess.run(['wc', '-l', log], capture_output=True, text=True)
largo = int(largo.stdout.split(' ')[0]) largo = int(largo.stdout.split(' ')[0])
@ -236,7 +237,8 @@ def carga_error_logs(log):
try: try:
ip = linea.split('client: ')[1].split(',')[0] ip = linea.split('client: ')[1].split(',')[0]
except Exception as ex: except Exception as ex:
print('Exception Ip error_log: ', ex) #print('Exception Ip error_log: ', ex)
log_usage('Exception Ip error_log {crit}', ex)
ip = None ip = None
try: try:
fecha = ' '.join(linea.split(' ')[0:2]) fecha = ' '.join(linea.split(' ')[0:2])
@ -257,7 +259,8 @@ def carga_error_logs(log):
try: try:
ip = linea.split('client: ')[1].split(',')[0] ip = linea.split('client: ')[1].split(',')[0]
except Exception as ex: except Exception as ex:
print('Exception Ip error_log: ', ex) #print('Exception Ip error_log: ', ex)
log_usage('Exception Ip error_log {notice}', ex)
ip = None ip = None
try: try:
fecha = ' '.join(linea.split(' ')[0:2]) fecha = ' '.join(linea.split(' ')[0:2])
@ -273,24 +276,32 @@ def carga_error_logs(log):
url = url[:252]+'...' url = url[:252]+'...'
except Exception: except Exception:
url = '---' url = '---'
if filtro_ip_propia(ip): if ip != None:
fecha = int(fecha_error_to_epoch(fecha)) if filtro_ip_propia(ip):
codigo = 0 fecha = int(fecha_error_to_epoch(fecha))
if ip_registrada(ip): codigo = 0
session.add(Visita(ip=ip, if ip_registrada(ip):
cod_html=codigo, session.add(Visita(ip=ip,
fecha=fecha, cod_html=codigo,
consulta=url, fecha=fecha,
metodo=metodo, consulta=url,
registro=1)) metodo=metodo,
else: registro=1))
session.add(Visita(ip=ip, else:
cod_html=codigo, session.add(Visita(ip=ip,
fecha=fecha, cod_html=codigo,
consulta=url, fecha=fecha,
metodo=metodo)) consulta=url,
metodo=metodo))
else:
log_usage('carga error.log', linea)
except Exception as ex: except Exception as ex:
print('Exception: ', ex) print('[Procesando *Error.log] Exception: ', ex)
try:
info_error = f'IP:[{ip}] - FECHA:[{fecha}] - METODO:[{metodo}] - URL:[{url}]'
log_usage('Exception error.log', info_error)
except:
pass
try: try:
with Progress() as prog, session: with Progress() as prog, session:
task1=prog.add_task("[yellow bold]Guardando[/yellow bold]", total=len(session.new)) task1=prog.add_task("[yellow bold]Guardando[/yellow bold]", total=len(session.new))
@ -299,20 +310,22 @@ def carga_error_logs(log):
prog.update(task1, advance=0.1) prog.update(task1, advance=0.1)
time.sleep(0.05) time.sleep(0.05)
except Exception as ex: except Exception as ex:
print('Exception Progress: ', ex) #print('Exception error.log - Progress session commit', ex)
log_usage('Exception error.log - Progress session commit', ex)
console.print(f'[magenta] - Carga completa.. borrando log[/magenta]\n') console.print(f'[magenta] - Carga completa.. borrando log[/magenta]\n')
os.remove(log) os.remove(log)
return True return True
except: except:
console.print(f'[red]Error al intentar abrir/cargar: [{log}[/red]]\n') console.print(f'[red]Error al intentar abrir/cargar: [{log}[/red]]\n')
log_usage(f'Error al abrir/cargar', log)
return False return False
else: else:
console.print(f'[bold red]Log: [[/bold red]{log}[bold red]] inexistente.[/bold red]\n') console.print(f'[bold red]Log: [[/bold red]{log}[bold red]] inexistente.[/bold red]\n')
log_usage(f'Log inexistente', log)
return False return False
def carga_logs(): def carga_logs():
#print(f'[bold green]Carga de logs en base de datos:[/bold green]\n')
logpath = logs_dir+'/access.log' logpath = logs_dir+'/access.log'
if os.path.exists(logpath): if os.path.exists(logpath):
carga_access_log(logpath) carga_access_log(logpath)
@ -355,7 +368,8 @@ def carga_registro_ip(ip_info):
)) ))
session.commit() session.commit()
except Exception as ex: except Exception as ex:
print('Exception: ', ex) print('[session.commit(ADD REGISTRO)] Exception: ', ex)
print('Datos-Dic: ', info_dic)
stmt = update(Visita).where(Visita.ip == ip_info['ip']).values(registro=1).\ stmt = update(Visita).where(Visita.ip == ip_info['ip']).values(registro=1).\
execution_options(synchronize_session="fetch") execution_options(synchronize_session="fetch")
#result = session.execute(stmt) #result = session.execute(stmt)
@ -363,7 +377,7 @@ def carga_registro_ip(ip_info):
session.execute(stmt) session.execute(stmt)
session.commit() session.commit()
except Exception as ex: except Exception as ex:
print('Exception: ', ex) print('[session.commit(UPDT VISITA)] Exception: ', ex)
def consulta_ip(ip_consulta, tkn=True): def consulta_ip(ip_consulta, tkn=True):