# Path: bormeparser/exceptions.py
# class BormeAnuncioNotFound(BormeparserException):
#     pass


import bormeparser
import bormeparser.backends.pypdf2.parser
import argparse
import logging
import sys
from bormeparser.exceptions import BormeAnuncioNotFound
    print('-' * (8 + len(str(anuncio.id))))
    print()
    for acto, valor in anuncio.get_actos():
        print('  {}'.format(acto))
        print('    {}'.format(valor))
    print('  Datos registrales')
    print('    ' + anuncio.datos_registrales)
    print()


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Shows BORME A info.')
    parser.add_argument('filename', help='BORME A PDF filename')
    parser.add_argument('-n', '--number', nargs='*', type=int, help='Show Verbose mode')
    parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Verbose mode')
    args = parser.parse_args()

    # set logger DEBUG (Not working)
    if args.verbose:
        bormeparser.borme.logger.setLevel(logging.DEBUG)
        bormeparser.backends.pypdf2.parser.logger.setLevel(logging.DEBUG)  # FIXME: DEFAULT_PARSER

    borme = bormeparser.parse(args.filename, bormeparser.SECCION.A)

    if args.number:
        anuncios = []
        for n in args.number:
            try:
                anuncio = borme.get_anuncio(n)
                anuncios.append(anuncio)

# Path: bormeparser/exceptions.py
# class BormeAnuncioNotFound(BormeparserException):
#     pass


# Path: scripts/borme_info.py
import bormeparser
import bormeparser.backends.pypdf2.parser
import argparse
import logging
import sys
from bormeparser.exceptions import BormeAnuncioNotFound

    print('-' * (8 + len(str(anuncio.id))))
    print()
    for acto, valor in anuncio.get_actos():
        print('  {}'.format(acto))
        print('    {}'.format(valor))
    print('  Datos registrales')
    print('    ' + anuncio.datos_registrales)
    print()


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Shows BORME A info.')
    parser.add_argument('filename', help='BORME A PDF filename')
    parser.add_argument('-n', '--number', nargs='*', type=int, help='Show Verbose mode')
    parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Verbose mode')
    args = parser.parse_args()

    # set logger DEBUG (Not working)
    if args.verbose:
        bormeparser.borme.logger.setLevel(logging.DEBUG)
        bormeparser.backends.pypdf2.parser.logger.setLevel(logging.DEBUG)  # FIXME: DEFAULT_PARSER

    borme = bormeparser.parse(args.filename, bormeparser.SECCION.A)

    if args.number:
        anuncios = []
        for n in args.number:
            try:
                anuncio = borme.get_anuncio(n)
                anuncios.append(anuncio)

            except BormeAnuncioNotFound: