diff --git a/PlumedToHTML/PlumedFormatter.py b/PlumedToHTML/PlumedFormatter.py index 7d5035a..b3a4487 100644 --- a/PlumedToHTML/PlumedFormatter.py +++ b/PlumedToHTML/PlumedFormatter.py @@ -31,7 +31,7 @@ def __init__(self, **options) : } def format(self, tokensource, outfile): - action, label, all_labels, keywords, shortcut_state, shortcut_depth, default_state, notooltips, expansion_label, hidden_state, hidenum = "", "", set(), [], 0, 0, 0, False, "", 0, 0 + action, label, all_labels, keywords, shortcut_state, shortcut_depth, default_state, notooltips, expansion_label, hidden_state, hidenum, nfiles = "", "", set(), [], 0, 0, 0, False, "", 0, 0, 0 outfile.write('
\n') for ttype, value in tokensource : # This checks if we are at the start of a new action. If we are we should be reading a value or an action and the label and action for the previous one should be set @@ -141,6 +141,7 @@ def format(self, tokensource, outfile): iff = open( inp, 'r' ) fcontent = iff.read() iff.close() + nfiles = nfiles + 1 if len(self.auxinputlines)>0 : shortversion, allines = "", fcontent.splitlines() for n, l in enumerate(self.auxinputlines) : @@ -149,11 +150,11 @@ def format(self, tokensource, outfile): if n>0 : shortversion += "...\n" for kk in range(start,end+1) : shortversion += allines[kk-1] + "\n" fcontent = shortversion - outfile.write('' + inp + '') - outfile.write('Click here to see an extract from this file.') + outfile.write('' + inp + '') + outfile.write('Click here to see an extract from this file.') outfile.write('