# Path: opentaxforms/ut.py
# NL = '\n'
# TAB = '\t'
# def merge(bb1, bb2):
# def numerify(s):
# def compactify(multilineRegex):
#     def crunch(seg):
# def pickle(data, pickleFilePrefix):
# def unpickle(pickleFilePrefix, default=None):
# def flattened(l):
# def hasdups(l, key=None):
# def uniqify(l):
# def uniqify2(l):
# def setupLogging(loggerId, args=None):
# def unsetupLogging():
# def logg(msg, outputs=None):
# def jj(*args, **kw):
# def jdb(*args, **kw):
# def run0(cmd):
# def run(cmd, logprefix='run', loglevel='INFO'):
#     def __init__(self, pkgname, fpath=None):
#     def path(self):
#     def content(self):
#     def keys(cls):
#     def vals(cls):
#     def items(cls):
#     def __init__(self):
#     def __call__(self, **kw):
#     def __init__(self, *maps, **kw):
#     def _getGetitems(self, mapp):
#     def __getitem__(self, key):
#     def __setitem__(self, key, val):
#     def __len__(self):
#     def __call__(self, *keys):
#     def clear(self):
#     def update(self, *maps):
#     def __add__(self, *maps):
#     def __iadd__(self, *maps):
#     def __iter__(self):
#     def iterkeys(self):
#     def keys(self):
#     def values(self):
#     def items(self):
#     def iteritems(self):
#     def get(self, key, dflt=None):
#     def __str__(self):
#     def __repr__(self):
# def notequalpatch(self, o):
#     def fromstring(cls, s):
#     def __hash__(self):
# def playQnty():
# def nth(n):
# def skip(s, substr):
# def until(s, substr):
# def ensure_dir(folder):
# def now(format=None):
# def readImgSize(fname, dirName):
# def asciiOnly(s):
# class NoSuchPickle(Exception):
# class PickleException(Exception):
# class Resource(object):
# class CharEnum(object):
# class ChainablyUpdatableOrderedDict(odict):
# class Bag(object):
# class Qnty(qq):
# 
# Path: opentaxforms/config.py
# def parseCmdline():
# def getFileList(dirName):
# def setLogname(rootForms,cfg):
# def copyStaticDir(appname):
# def setupStaticDir(dirName):
# def setup(**overrideArgs):
# def unsetup():


import re
import six
from . import ut, irs
from .ut import log, jj, pathjoin, asciiOnly
from .config import cfg
                    if typ=='Schedule':
                        formcontext=scheduleContext.get(txt.lower(),formName)
                    else:
                        formcontext=formName
                    key = txt if typ == 'Form' else merge(formcontext, txt)
                    if iword == 0:
                        matchingtext = fulltype + ' ' + txt
                    else:
                        matchingtext = txt
                    checkedForm = checkForm(key, **dict(
                        iFormInLine=iFormInLine, draw=el, match=matchingtext,
                        form=formName, call='words'))
                    if formrefs.add(*checkedForm):
                        formsinline.append(
                            jj(idraw, 'couldbe', key,
                               matchingtext, nicetext, delim='|'))
                        iFormInLine += 1
        # section for forms announced in previous layout object
        #   eg 1040/54 Other credits from Form: a 3800 b 8801 c ____
        if six.text_type(rawtext).strip(u' |\xa0').endswith('Form:'):
            maybeForms.ypos = el['ypos']
        elif maybeForms(el):
            for txt in rawtext.strip().split():
                txt = txt.strip(' .,;()|').upper()
                if len(txt) > 1 and couldbeform(txt):
                    if formrefs.add(*checkForm(txt, **dict(
                         iFormInLine=iFormInLine, draw=el, match=txt,
                         form=formName, call='rawtext'))):
                        matchingtext = txt
                        formsinline.append(

# Path: opentaxforms/ut.py
# NL = '\n'
# TAB = '\t'
# def merge(bb1, bb2):
# def numerify(s):
# def compactify(multilineRegex):
#     def crunch(seg):
# def pickle(data, pickleFilePrefix):
# def unpickle(pickleFilePrefix, default=None):
# def flattened(l):
# def hasdups(l, key=None):
# def uniqify(l):
# def uniqify2(l):
# def setupLogging(loggerId, args=None):
# def unsetupLogging():
# def logg(msg, outputs=None):
# def jj(*args, **kw):
# def jdb(*args, **kw):
# def run0(cmd):
# def run(cmd, logprefix='run', loglevel='INFO'):
#     def __init__(self, pkgname, fpath=None):
#     def path(self):
#     def content(self):
#     def keys(cls):
#     def vals(cls):
#     def items(cls):
#     def __init__(self):
#     def __call__(self, **kw):
#     def __init__(self, *maps, **kw):
#     def _getGetitems(self, mapp):
#     def __getitem__(self, key):
#     def __setitem__(self, key, val):
#     def __len__(self):
#     def __call__(self, *keys):
#     def clear(self):
#     def update(self, *maps):
#     def __add__(self, *maps):
#     def __iadd__(self, *maps):
#     def __iter__(self):
#     def iterkeys(self):
#     def keys(self):
#     def values(self):
#     def items(self):
#     def iteritems(self):
#     def get(self, key, dflt=None):
#     def __str__(self):
#     def __repr__(self):
# def notequalpatch(self, o):
#     def fromstring(cls, s):
#     def __hash__(self):
# def playQnty():
# def nth(n):
# def skip(s, substr):
# def until(s, substr):
# def ensure_dir(folder):
# def now(format=None):
# def readImgSize(fname, dirName):
# def asciiOnly(s):
# class NoSuchPickle(Exception):
# class PickleException(Exception):
# class Resource(object):
# class CharEnum(object):
# class ChainablyUpdatableOrderedDict(odict):
# class Bag(object):
# class Qnty(qq):
# 
# Path: opentaxforms/config.py
# def parseCmdline():
# def getFileList(dirName):
# def setLogname(rootForms,cfg):
# def copyStaticDir(appname):
# def setupStaticDir(dirName):
# def setup(**overrideArgs):
# def unsetup():


# Path: opentaxforms/refs.py
import re
import six
from . import ut, irs
from .ut import log, jj, pathjoin, asciiOnly
from .config import cfg

                    if typ=='Schedule':
                        formcontext=scheduleContext.get(txt.lower(),formName)
                    else:
                        formcontext=formName
                    key = txt if typ == 'Form' else merge(formcontext, txt)
                    if iword == 0:
                        matchingtext = fulltype + ' ' + txt
                    else:
                        matchingtext = txt
                    checkedForm = checkForm(key, **dict(
                        iFormInLine=iFormInLine, draw=el, match=matchingtext,
                        form=formName, call='words'))
                    if formrefs.add(*checkedForm):
                        formsinline.append(
                            jj(idraw, 'couldbe', key,
                               matchingtext, nicetext, delim='|'))
                        iFormInLine += 1
        # section for forms announced in previous layout object
        #   eg 1040/54 Other credits from Form: a 3800 b 8801 c ____
        if six.text_type(rawtext).strip(u' |\xa0').endswith('Form:'):
            maybeForms.ypos = el['ypos']
        elif maybeForms(el):
            for txt in rawtext.strip().split():
                txt = txt.strip(' .,;()|').upper()
                if len(txt) > 1 and couldbeform(txt):
                    if formrefs.add(*checkForm(txt, **dict(
                         iFormInLine=iFormInLine, draw=el, match=txt,
                         form=formName, call='rawtext'))):
                        matchingtext = txt
                        formsinline.append(

                            jj(idraw, 'maybe', txt,