%function parseIndexHTML(fname);
%This routine reads the index.html file and breaks it up into its
%constituent pieces ("ParsedInputs\" for susequent analysis
addpath('functions\');
fname = '..\orig_index.html';
%% read file
all_lines = readAllLines(fname);
%% find the start of the nodes definition
target_str = '';
row_inds=find(contains(all_lines,target_str));
if isempty(row_inds)
disp(['*** ERROR ***: could not find end of nodes. Returning...']);
return;
end
row_inds = row_inds(1);
row_inds = row_inds-1; %back up one to get to the ']}' text instead
textToWrite = all_lines(1:row_inds-1);
all_lines = all_lines(row_inds:end);
%save the transition
outfname = 'ParsedInputs\nodes.txt';
writeText(outfname,textToWrite);
%% extract the transition to docs
target_str = '