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

Oneshot read/write #6

Closed
svnhub opened this issue Apr 6, 2017 · 3 comments
Closed

Oneshot read/write #6

svnhub opened this issue Apr 6, 2017 · 3 comments
Assignees

Comments

@svnhub
Copy link

svnhub commented Apr 6, 2017

A low-prio feature request for three commandline arguments that instruct the file-system script how to behave in one-way scenarios where either the webstrate or the file is "authoritative".

--readonly : to only ever read the current webstrate into the file regardless of any local changes to the file made by other programs
--writeonly: to only write the file into the webstrate but ignore any changes made to the webstrate
--oneshot: immediately exit after updating either the file or the webstrate rather than continuing to monitor the file/webstrate.

The primary use-case for this will be to embed the file-system script into continuous integration servers or similar scripting environments where webstrates can be either deployed or archived automatically.

@kbadk kbadk self-assigned this Apr 6, 2017
@kbadk
Copy link
Collaborator

kbadk commented Apr 6, 2017

Great ideas, I'll definitely implement those.

But just to clarify about the --writeonly parameter: If we're not listening for changes, any time we save the document (with our own updates in it), we'll effectively be overwriting what anybody else has been doing to the DOM. Is that the intention?

@svnhub
Copy link
Author

svnhub commented Apr 7, 2017

Exactly - and the same in the other direction with the --readonly one.
Maybe also name them something along the lines of --to-webstrate-only and --from-webstrate-only to avoid confusion about whether it is the file or the webstrate that is being read/written.

@kbadk
Copy link
Collaborator

kbadk commented May 15, 2018

This was added with 88dbb36.

@kbadk kbadk closed this as completed May 15, 2018
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

2 participants