app-privacy-policy-generator icon indicating copy to clipboard operation
app-privacy-policy-generator copied to clipboard

API or general template files

Open DanielHabenicht opened this issue 4 years ago • 4 comments

I am currently working on a student project which explores bridging the gap between live systems and their respective (outdated) Privacy policy. It will auto-generate the Privacy policy based on labels and OpenAPI Schemas. (in the light of GDPR) As this is the only OpenSource project I found for generating Policies I would like to contribute or share this work here (or make it at least compatible).

For this purpose, It would be great if the templates used in this app could be used by another script or an API for automatically generating the Privacy policy based on the parameters given would exist.

I think the template approach would be much easier. Should I go forward and create a PR? This would also allow easier changes for non-programmers just wanting to check or modify the policy.

DanielHabenicht avatar Jun 24 '20 12:06 DanielHabenicht

@DanielHabenicht That is an interesting point. I am open to seeing what else can be done here.

However know that I have a local branch where I am already experimenting making the whole static website a VueJS based webapp which can load templates.

The concept of providing an API sounds good to me, unless ofcourse the API gets abused. This is one of the reasons I haven't opted for API based setup. I am experimenting with templating and making the templates easier for people to contribute, but these templates will be loaded by the webapp.

We can keep an open branch for you to work against so we can evaluate the approach if you do want to check something with the API.

nisrulz avatar Jun 24 '20 14:06 nisrulz

Because of the whole API abuse part, I am also more into providing the templates that can be used by others. Which branch are you currently working on? (so I can just take a brief look)

For me, it would be nice if we can agree on a format for theses templates, e.g. the one you are currently using {{devOrCompanyName}} if that stays so from my side everything is fine.

As soon as the templates are on its own, in a separate folder, this issue can be closed because then another program can just reuse the template. (which is currently not possible because it's embedded in the index.html)

DanielHabenicht avatar Jun 24 '20 16:06 DanielHabenicht

What do you think of mustache templates? This would allow board reuse of the templates in many programming languages. There is an implementation in JS as well: https://github.com/janl/mustache.js

DanielHabenicht avatar Jul 01 '20 12:07 DanielHabenicht

Sorry, I am very much occupied at work. I use Vuejs in the app to allow for two way binding. It does use the mustache syntax i.e {{iOrWe | capitalize }}. So it should work for that case. The whole issue is extracting the inlined html content as a template and loading it dynamically. This is why I am making it a web app and not a static website.

nisrulz avatar Jul 01 '20 14:07 nisrulz