data-workers-publication/create_intro_text.py

14 lines
466 B
Python
Raw Normal View History

2019-03-25 08:35:09 +01:00
from functions import insert_linebreaks, align
header = '''\
V V V V V V V V
V V V V V V V V V V V V V V V V
V V V V V V V V V'''
def create_intro_text(string, zone):
intro_text = insert_linebreaks(string, 35, type='word')
intro_text = intro_text.replace('\nWorks\n', '')
intro_text = intro_text.replace('\nOeuvres\n', '')
return header + '\n\n\n' + align(zone.upper(), 35) + '\n\n\n' + header + '\n' + header + intro_text