Exemple #1
0
def Parse(reparse, logger, meeting_pks=None):
    logger.debug('Parse (reparse=%s, meeting_pks=%s)'%(reparse, meeting_pks))
    if meeting_pks is not None:
        meetings = CommitteeMeeting.objects.filter(pk__in=meeting_pks)
    else:
        plenum=Committee.objects.filter(type='plenum')[0]
        meetings=CommitteeMeeting.objects.filter(committee=plenum).exclude(protocol_text='')
    if not reparse:
        meetings=meetings.annotate(Count('parts')).filter(parts__count=0)
    (mks,mk_names)=create_protocol_parts.get_all_mk_names()
    logger.debug('got mk names: %s, %s'%(mks, mk_names))
    for meeting in meetings:
        logger.debug('creating protocol parts for meeting %s'%(meeting,))
        meeting.create_protocol_parts(delete_existing=reparse,mks=mks,mk_names=mk_names)
Exemple #2
0
def Parse(verbosity_level,reparse):
    global verbosity
    verbosity=int(verbosity_level)
    #DATA_ROOT = getattr(settings, 'DATA_ROOT')
    plenum=Committee.objects.filter(type='plenum')[0]
    meetings=CommitteeMeeting.objects.filter(committee=plenum).exclude(protocol_text='')
    if not reparse:
        meetings=meetings.annotate(Count('parts')).filter(parts__count=0)
    if verbosity>1:
        console = logging.StreamHandler()
        console.setLevel(logging.DEBUG)
        logging.getLogger('').addHandler(console)
    (mks,mk_names)=create_protocol_parts.get_all_mk_names()
    for meeting in meetings:
        meeting.create_protocol_parts(delete_existing=reparse,mks=mks,mk_names=mk_names)
Exemple #3
0
def Parse(reparse, logger, meeting_pks=None):
    logger.debug('Parse (reparse=%s, meeting_pks=%s)' % (reparse, meeting_pks))
    if meeting_pks is not None:
        meetings = CommitteeMeeting.objects.filter(pk__in=meeting_pks)
    else:
        plenum = Committee.objects.filter(type='plenum')[0]
        meetings = CommitteeMeeting.objects.filter(committee=plenum).exclude(
            protocol_text='')
    if not reparse:
        meetings = meetings.annotate(Count('parts')).filter(parts__count=0)
    (mks, mk_names) = create_protocol_parts.get_all_mk_names()
    logger.debug('got mk names: %s, %s' % (mks, mk_names))
    for meeting in meetings:
        logger.debug('creating protocol parts for meeting %s' % (meeting, ))
        meeting.create_protocol_parts(delete_existing=reparse,
                                      mks=mks,
                                      mk_names=mk_names)
def Parse(verbosity_level, reparse):
    global verbosity
    verbosity = int(verbosity_level)
    #DATA_ROOT = getattr(settings, 'DATA_ROOT')
    plenum = Committee.objects.filter(type='plenum')[0]
    meetings = CommitteeMeeting.objects.filter(committee=plenum).exclude(
        protocol_text='')
    if not reparse:
        meetings = meetings.annotate(Count('parts')).filter(parts__count=0)
    if verbosity > 1:
        console = logging.StreamHandler()
        console.setLevel(logging.DEBUG)
        logging.getLogger('').addHandler(console)
    (mks, mk_names) = create_protocol_parts.get_all_mk_names()
    for meeting in meetings:
        meeting.create_protocol_parts(delete_existing=reparse,
                                      mks=mks,
                                      mk_names=mk_names)