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

The Store extensions sucks. Fix it (or ditch it!) #25

Closed
jdwije opened this issue Sep 7, 2014 · 2 comments
Closed

The Store extensions sucks. Fix it (or ditch it!) #25

jdwije opened this issue Sep 7, 2014 · 2 comments

Comments

@jdwije
Copy link
Owner

jdwije commented Sep 7, 2014

The Lewt Extensions store which is used for persisting data is a bit sucky. The extract method isn't even implemented!

This is a pretty important extension so it will pay to take the time to do things right.

@jdwije jdwije changed the title Store sucks. Fix it. Store sucks. Fix it (or ditch it!) Sep 8, 2014
@jdwije
Copy link
Owner Author

jdwije commented Sep 8, 2014

The question also remains whether store is needed... One of the original goals of LEWT was to allow for STDIN piping, this is yet to be implemented however if it were storage could be something like this:

lewt -p invoice -o store >> invoice.yml

Defaults could be configured as per regular settings config. This data could be reused by echoing it back into LEWT, then bypassing extract & process and piping this data straight into render like so:

cat invoice.yml | lewt --pipe render -o liquid

@jdwije jdwije changed the title Store sucks. Fix it (or ditch it!) The Store extensions sucks. Fix it (or ditch it!) Sep 8, 2014
@jdwije
Copy link
Owner Author

jdwije commented Sep 9, 2014

The store workflow is now much nice. As above:

lewt -p invoice -o store >> invoice.yml

Then to reuse:

cat invoice.yml | lewt pipe render -m text

Store is still an extensions. The piping itself happens at the lewt class level, it's debatable whether this is a good idea - perhaps it can be refactored into stores extract method?

@jdwije jdwije closed this as completed Sep 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant