Comments (6)
@morrowc Thank you for your idea and PR! Sorry for late answer.
I see that searching templates in current working directory is a bad idea.
Your way has many advantages for end user:
- it's much more reliable
- it's easier to install, you don't have to prepare templates directory
And one disadvantage:
- It's harder to change templates, you have to recompile binary for that (although I haven't changed templates for a long time, I think it is convenient feature to use for development at least).
Maybe we can keep your changes and add another output format for using external template file? What do you think? Something like this:
output:
format: "external_template"
external_template: "/path/to/file.gotmpl"
from dmarc-report-converter.
howdy! no worries on the delays...
I think there are 2 things going on:
- an assumption about directory for deployment/runtime
- a normal form/style change to include the template content at compile time instead of rationalizing how to do 1 better.
You mention: "easier for development", which seems specious to me, since unless you included a ton of random/extra data in the template data struct, you'd always have to reompile to get data included and output that in the template(s) output?
(unless you mean just changing the free-text... which seems like a fairly light load of trade-off to me).
from dmarc-report-converter.
unless you mean just changing the free-text
Yes, I meant this. For me, data struct is almost static and isn't changed a lot. But html or txt templates can be changed a lot during development process or even in production usage. I don't know, maybe someone already uses self-written custom templates. That's why I would like to keep ability to use external template via another output format.
Anyway, your PR is good, I'm going to merge it soon.
from dmarc-report-converter.
ah! ok, I see your usecase now. If you merge this and send me an issue I'll put in a pr that we can discuss?
from dmarc-report-converter.
I merged your PR and added external_template output format. Thanks!
from dmarc-report-converter.
New version v0.6 was released
from dmarc-report-converter.
Related Issues (20)
- Only delete mails if attachements are succesfully saved to tmp location HOT 2
- XML syntax error HOT 12
- Date field request HOT 2
- imap: can't read next part: unhandled charset "utf-ascii" HOT 2
- Now option not working HOT 2
- option to output logs to stderr instead of stdout HOT 2
- Configuration on nginx not working HOT 2
- Most dmarc reports from Comcast cannot be read HOT 6
- ReadParseGZIP: unsupported MimeTypeGZIP HOT 1
- Unable to deploy HOT 2
- Error without outputting json file when report contains empty record HOT 3
- Play with pico css
- Improve UX of browsing through reports HOT 4
- Support importing .pst files HOT 2
- incorrect parsing Auth results DKIM HOT 1
- Make AssetsPath available in external_template context HOT 3
- Enable GitHub workflow on pull requests HOT 1
- Ignore eml files when processing extracted reports
- Messages with inline MIME headers are not processed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dmarc-report-converter.