anyfilename = 'textfile001.txt'
f = open(anyfilename,'r')
output = []
newoutput=[]
htmloutput=[]
for line in f:
if '' in line:
output.append(line)
f.close()
'''determine length of list and then setnumber_of_lines to this value'''
count = 0
number_of_lines = 0
linenumber = 0
for i in output:
count = count+1
'''Now we have the number of lines'''
number_of_lines = count
for i in range(0, number_of_lines):
'''print "gubblegub" '''
'''print output[i] '''
else:
print 'Reading the information into output complete now we should perform string operation'
print " "
print " "
'''First assignment clean output for anything after : in each line'''
print "Innerloop beginning, finding all instances of ':'"
for i in range(0, number_of_lines):
search = ''
output[i].find(search)
index = output[i].find(search)
'''print search, "found at index", index'''
'''Now we cut the end of every sentence of output'''
cut_text_from_string=output[i][13:index]
print ' \n'
print cut_text_from_string
if '' in line:
newoutput.append(cut_text_from_string)
print 'We have now removed all heading text and trailing text after the ":" '
print "innerloop 2 complete and we can begin stripping down further in order to build our HTML"
'''
actual_imagefilename - Is the primary variable to find as most of the latter variables will depend upon it, this we
read from within the tags ??? of the line in question, once we have that we are ready to move
on
'''
for i in range(0, number_of_lines):
search = ''
newoutput[i].find(search)
index = newoutput[i].find(search)
print search, "found at index", index
indexvalue1=int(index)
print indexvalue1
actual_soundfilename = newoutput[i][indexvalue1+11:indexvalue1+11+8]
print actual_soundfilename
'''create sentence for soundplayback script'''
soundplayback = '