lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 2a94469 074/156: Use Mustache template files


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 2a94469 074/156: Use Mustache template files from the data directory
Date: Tue, 30 Jan 2018 17:22:14 -0500 (EST)

branch: master
commit 2a94469862d1da3fecd65fa90a885f53213e0a23
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>

    Use Mustache template files from the data directory
    
    Install them there and update the code to look for them in this
    directory instead of the current one.
---
 ledger_pdf_generator_wx.cpp | 3 ++-
 workhorse.make              | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index 65db474..b993fd9 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -28,6 +28,7 @@
 #include "authenticity.hpp"
 #include "bourn_cast.hpp"
 #include "calendar_date.hpp"
+#include "data_directory.hpp"           // AddDataDir()
 #include "force_linking.hpp"
 #include "html.hpp"
 #include "interpolate_string.hpp"
@@ -246,7 +247,7 @@ class html_interpolator
 
     std::string load_partial_from_file(std::string const& file) const
     {
-        std::ifstream ifs(file + ".mustache");
+        std::ifstream ifs(AddDataDir(file + ".mustache"));
         if(!ifs)
             {
             alarum()
diff --git a/workhorse.make b/workhorse.make
index 23456b5..cd0b4e5 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -896,7 +896,7 @@ test_dir       := $(exec_prefix)/test
 touchstone_dir := $(exec_prefix)/touchstone
 
 data_files := \
-  $(wildcard $(addprefix $(srcdir)/,*.ico *.png *.xml *.xrc *.xsd *.xsl)) \
+  $(wildcard $(addprefix $(srcdir)/,*.ico *.mustache *.png *.xml *.xrc *.xsd 
*.xsl)) \
 
 help_files := \
   $(wildcard $(addprefix $(srcdir)/,*.html)) \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]