Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template Fields Question #13

Open
experimenti opened this issue Aug 18, 2021 · 3 comments
Open

Template Fields Question #13

experimenti opened this issue Aug 18, 2021 · 3 comments

Comments

@experimenti
Copy link

Greetings and thank you very much for the amazing Receiptline!

We are building an F&B POS and hope to incorporate ReceiptLine. I have a general question. We wish to provide receipt templates for customization. This requires that, at runtime, we merge data fields into the ReceiptLine markdown. Visually:

image

We can do this now with the:

{ OURFIELDID }

Is that the intended use? Do you have any other suggestions for this general process?

@receiptline
Copy link
Owner

Thank you very much for using receiptline.

I have seen your screenshot.
It's great. And I think you have the right idea.

Actually, our consortium's subcommittee has just started discussing the extended specifications of the template.
We have some rough drafts from some of our member companies.

I will share this information with the subcommittee.
I hope the specification will be compatible with your usage.

@davisford
Copy link

@receiptline I am very interested in the extended specifications that support templating. Is that something you can share?

@receiptline
Copy link
Owner

The first idea was to extend receiptline to support templates.
However, this did not work.
The reason was that it was difficult to implement data selectors, multi-line grouping, and template hierarchies.

+-----------+     +-----------+     +-------+
|Transaction|     |ReceiptLine|     |Receipt| 
|Data(JSON) |---->|w/ Template|---->| Image |
+-----------+     +-----------+     +-------+
                  { JSONPath }

So we thought of separating the templates and connecting them in a pipeline.
And we created RceiptIO and transform streams.

+-----------+     +--------+     +-------+     +-------+
|Transaction|     |  Any   |     |Receipt|     |Receipt|
|   Data    |---->|Template|---->|  IO   |---->| Image |  Pipeline
+-----------+     +--------+     +-------+     +-------+
            Stream

We have not yet given up on developing an original template engine that fits into "Any Template".

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants