From 2d03c638c9b0c637d205323d0cb06c5547818b68 Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Fri, 9 Aug 2019 15:12:20 -0400 Subject: [PATCH] include timestamp in output files --- src/@graph/writeGraphFile.m | 3 ++- src/@page/write.m | 4 ++-- src/@paragraph/write.m | 5 +++-- src/@report/write.m | 4 ++-- src/@report_table/writeTableFile.m | 4 ++-- src/@section/write.m | 4 ++-- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/@graph/writeGraphFile.m b/src/@graph/writeGraphFile.m index bb74412..1c76420 100644 --- a/src/@graph/writeGraphFile.m +++ b/src/@graph/writeGraphFile.m @@ -15,7 +15,7 @@ function o = writeGraphFile(o, pg, sec, row, col) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2013-2017 Dynare Team +% Copyright (C) 2013-2019 Dynare Team % % This file is part of Dynare. % @@ -49,6 +49,7 @@ if fid == -1 error(['@graph.writeGraphFile: ' msg]); end +fprintf(fid, '%% Graph Object written %s\n', datestr(now)); fprintf(fid, '\\begin{tikzpicture}[baseline'); if ~isempty(o.miscTikzPictureOptions) fprintf(fid, ',%s', o.miscTikzPictureOptions); diff --git a/src/@page/write.m b/src/@page/write.m index 4eb1315..b4871e6 100644 --- a/src/@page/write.m +++ b/src/@page/write.m @@ -13,7 +13,7 @@ function o = write(o, fid, pg) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2013-2017 Dynare Team +% Copyright (C) 2013-2019 Dynare Team % % This file is part of Dynare. % @@ -32,7 +32,7 @@ function o = write(o, fid, pg) assert(fid ~= -1); -fprintf(fid, '\n%% Page Object\n'); +fprintf(fid, '\n%% Page Object written %s\n', datestr(now)); if strcmpi(o.orientation, 'landscape') fprintf(fid, '\\begin{landscape}\n'); end diff --git a/src/@paragraph/write.m b/src/@paragraph/write.m index 92de810..d8ff9a7 100644 --- a/src/@paragraph/write.m +++ b/src/@paragraph/write.m @@ -12,7 +12,7 @@ function o = write(o, fid) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2014-2015 Dynare Team +% Copyright (C) 2014-2019 Dynare Team % % This file is part of Dynare. % @@ -30,7 +30,8 @@ function o = write(o, fid) % along with Dynare. If not, see <http://www.gnu.org/licenses/>. assert(fid ~= -1); -fprintf(fid, '%% Paragraph Object\n\\multicolumn{1}{p{\\linewidth}}{%%\n'); +fprintf(fid, '%% Paragraph Object written %s\n', datestr(now)); +fprintnf(fid, '\\multicolumn{1}{p{\\linewidth}}{%%\n'); if o.cols ~= 1 bc = ''; if o.balancedCols diff --git a/src/@report/write.m b/src/@report/write.m index a174612..168747b 100644 --- a/src/@report/write.m +++ b/src/@report/write.m @@ -11,7 +11,7 @@ function o = write(o) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2013-2015 Dynare Team +% Copyright (C) 2013-2019 Dynare Team % % This file is part of Dynare. % @@ -33,7 +33,7 @@ if fid == -1 error(['@report.write: ' msg]); end -fprintf(fid, '%% Report Object\n'); +fprintf(fid, '%% Report Object written %s\n', datestr(now)); fprintf(fid, '\\documentclass[11pt]{article}\n'); fprintf(fid, '\\usepackage[%spaper,margin=%f%s', o.paper, o.margin, o.marginUnit); diff --git a/src/@report_table/writeTableFile.m b/src/@report_table/writeTableFile.m index 8522743..78348d9 100644 --- a/src/@report_table/writeTableFile.m +++ b/src/@report_table/writeTableFile.m @@ -15,7 +15,7 @@ function o = writeTableFile(o, pg, sec, row, col) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2013-2017 Dynare Team +% Copyright (C) 2013-2019 Dynare Team % % This file is part of Dynare. % @@ -50,7 +50,7 @@ if fid == -1 error(['@report_table.writeTableFile: ' msg]); end -fprintf(fid, '%% Report_Table Object\n'); +fprintf(fid, '%% Report_Table Object written %s\n', datestr(now)); fprintf(fid, '\\setlength{\\parindent}{6pt}\n'); fprintf(fid, '\\setlength{\\tabcolsep}{4pt}\n'); diff --git a/src/@section/write.m b/src/@section/write.m index afd5ba0..eadb35c 100644 --- a/src/@section/write.m +++ b/src/@section/write.m @@ -14,7 +14,7 @@ function o = write(o, fid, pg, sec) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2013-2017 Dynare Team +% Copyright (C) 2013-2019 Dynare Team % % This file is part of Dynare. % @@ -32,7 +32,7 @@ function o = write(o, fid, pg, sec) % along with Dynare. If not, see <http://www.gnu.org/licenses/>. assert(fid ~= -1); -fprintf(fid, '%% Section Object\n'); +fprintf(fid, '%% Section Object written %s\n', datestr(now)); if isempty(o.elements) warning(['reporting:section.write(): trying to print a section ' ... 'with no elements. Perhaps you forgot to overwrite the report object.']); -- GitLab