add scribble image processing

This commit is contained in:
2019-10-16 23:55:42 -07:00
parent 6be415a1df
commit 68a658dfe8
5 changed files with 157 additions and 6 deletions

View File

@ -6,9 +6,8 @@ import inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
parentparentdir = os.path.dirname(parentdir)
sys.path.insert(0, parentparentdir)
sys.path.insert(0, parentparentdir)
import dumper
import getopt
import django
from django.conf import settings
@ -16,8 +15,7 @@ from django.conf import settings
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'procat2.settings')
django.setup()
from markup.utils import parse_pdf
from procat2.settings import ASSET_DIR
from markup.pdf import parse_pdf
def main(argv):
@ -33,6 +31,8 @@ def main(argv):
for (k, v) in opts:
if k == '-d': debug += 1
parse_pdf(args[0], debug)
(prods, scribbles) = parse_pdf(args[0], debug)
print('prods', scribbles)
if __name__ == '__main__': sys.exit(main(sys.argv))