Add operatornotify.

master
voussoir 2022-04-05 10:20:27 -07:00
parent 4609d45268
commit 9e21b79f65
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import sqlite3
import sys import sys
import time import time
from voussoirkit import operatornotify
from voussoirkit import threadpool from voussoirkit import threadpool
from voussoirkit import vlogging from voussoirkit import vlogging
@ -431,6 +432,7 @@ def overview_argparse(args):
for column in row: for column in row:
print(column, end='') print(column, end='')
print() print()
return 0
def render_argparse(args): def render_argparse(args):
coordinates = parse_coordinate_string(args.coordinates) coordinates = parse_coordinate_string(args.coordinates)
@ -454,6 +456,7 @@ def render_argparse(args):
filename = f'{p1x}.{p1y}--{p2x}.{p2y}{scale_s}.png' filename = f'{p1x}.{p1y}--{p2x}.{p2y}{scale_s}.png'
image.save(filename) image.save(filename)
log.debug('Wrote %s', filename) log.debug('Wrote %s', filename)
return 0
def update_argparse(args): def update_argparse(args):
coordinates = parse_coordinate_string(args.coordinates) coordinates = parse_coordinate_string(args.coordinates)
@ -466,7 +469,9 @@ def update_argparse(args):
insert_chunks(chunks) insert_chunks(chunks)
except KeyboardInterrupt: except KeyboardInterrupt:
db_commit() db_commit()
return 0
@operatornotify.main_decorator(subject='pixelcanvasdl')
@vlogging.main_decorator @vlogging.main_decorator
def main(argv): def main(argv):
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(