Ejemplo n.º 1
0
def final_view(vid, selection):
    _secs = sections.get_sections(selection)
    segments = [s.get_section(for_slack=True, max_len=200) for s in _secs]

    blocks = msg_builder(*segments)
    view = OnDemandView(blocks)
    client.views_update(view=view, view_id=vid)
Ejemplo n.º 2
0
def followup_reminder():
    HEADING = f'@here\nHeads up team!\n\n'
    section = sections.get_sections(name='followup_issues')[0]

    if not section.line_items:  # If there's nothing to follow up on, do nothing
        return

    msg = HEADING + section.get_section(for_slack=True)
    slack_interface.send_msg(msg)
Ejemplo n.º 3
0
def new_handover(pfx):
    print(f'Commencing "{pfx}" handover job...')

    global current_ticket
    secs = sections.get_sections()
    current_ticket = jira_interface.create_ticket(pfx, secs)
    _send_handover_msg(current_ticket, secs)

    print('Job completed')
Ejemplo n.º 4
0
def update_handover(preface=''):
    if not current_ticket:  # In case there is no current_ticket yet
        return

    print('Commencing update of last ticket')

    secs = sections.get_sections()
    jira_interface.update_ticket(current_ticket, secs)
    _send_handover_msg(current_ticket, secs, preface=preface)

    print('Job completed')
Ejemplo n.º 5
0
	article_name = sys.argv[1]




pipeline = [ 
	
	[ None , lambda data: [ re.sub(r"\n", '' , data) ,  None  ] ] ,

	[ None , lambda data:  [ wikiclean.strip_html(data) , None ] ] , 

	[ None , lambda data: [ wikiclean.strip_curlys(data) , None] ] , 

	[ "processed" , lambda data:  [ wikiclean.strip_wikilinks(data) , wikiclean.strip_wikilinks(data)   ] ] ,

	[ "sections" , lambda data: [ data , sections.get_sections(data) ] ] ,

]


a = article.Article( article_name , pipeline )



# a.processed =  a.processed.encode('utf-8')
# print a.processed
# for i in get_sections( a.processed ):
	# print i


sections = a.sections