<commit_before>"""
Format the readme.md file into the sphinx index.rst file.
"""
import re
import pypandoc
from astropy.time import Time

t = Time.now()
t.out_subfmt = 'date'
out = ('.. pyuvdata documentation master file, created by\n'
       '   make_index.py on {date}\n\n').format(date=t.iso)

readme_text = pypandoc.convert_file('../readme.md', 'rst')

rst_status_badge = '.. image:: https://travis-ci.org/HERA-Team/pyuvdata.svg?branch=master\n    :target: https://travis-ci.org/HERA-Team/pyuvdata'<commit_msg>update make_index.py to be read in branch specific travis badge details<commit_after>"""
Format the readme.md file into the sphinx index.rst file.
"""
import re
import pypandoc
from astropy.time import Time

t = Time.now()
t.out_subfmt = 'date'
out = ('.. pyuvdata documentation master file, created by\n'
       '   make_index.py on {date}\n\n').format(date=t.iso)

readme_md = pypandoc.convert_file('../readme.md', 'md')
branch_str = 'https://travis-ci.org/HERA-Team/pyuvdata.svg'
regex_branch = re.compile(branch_str)
loc_branch = re.search(regex_branch, readme_md).start()
end_branch_str = '\)\]'
regex_end = re.compile(end_branch_str)
loc_end = re.search(regex_end, readme_md).start()
branch_url = readme_md[loc_branch:loc_end]

readme_text = pypandoc.convert_file('../readme.md', 'rst')

rst_status_badge = '.. image:: ' + branch_url + '\n    :target: https://travis-ci.org/HERA-Team/pyuvdata'
{'fraction_non_alphanumeric': 0.15711252653927812, 'fraction_numerical': 0.0, 'mean_word_length': 4.501945525291829, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1502389', 'n_tokens_mistral': 538, 'n_tokens_neox': 531, 'n_words': 108}