[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)) \
- [lmi-commits] [lmi] master 2d93248 118/156: Add the rest of group private placement illustration pages, (continued)
- [lmi-commits] [lmi] master 2d93248 118/156: Add the rest of group private placement illustration pages, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 1272ce2 127/156: Don't include "Assumptions" page in composite NASD illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master e00ab7d 080/156: Hide "attained age" column for composite illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 29e63d6 117/156: Add basic illustration page of group placement illustration, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 1a9bfb3 137/156: Factor out standard_supplemental_report class, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 7c0ff88 145/156: Add copyright notices to all .mst template files, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 2fd6a11 147/156: Use shorter and more consistent names for external templates, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b09a25f 026/156: Implement numbering pages in the PDF output, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master bb75971 033/156: Implement the second part of the narrative summary page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 964db82 067/156: Rename columns_headings_page to column_headings_page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 2a94469 074/156: Use Mustache template files from the data directory,
Greg Chicares <=
- [lmi-commits] [lmi] master 01be23a 103/156: Automatically squeeze table columns to make them fit if necessary, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 46a7442 068/156: Factor out helper render_template() method, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master d77620f 100/156: Factor out dollar_units template from the existing ones, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 833eef5 086/156: Use std::make_unique<> instead of raw "new", Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 34c088c 073/156: Move footer contents into an external template too, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 0ba1c32 146/156: Consistently use "curr" as abbreviation of "current", Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 29865fc 133/156: Add supplemental report to NASD illustrations too, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 919d796 001/156: Remove old XSL-FO-based PDF generation code, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master cc7fc05 143/156: Change template file extension from .mustache to .mst, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 08984bb 148/156: Recognize Mustache files in the coding rules test, Greg Chicares, 2018/01/30