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

Feature: New option to push message every x lines(default 1) #69

Open
toddejohnson opened this issue Aug 2, 2024 · 3 comments · May be fixed by #70
Open

Feature: New option to push message every x lines(default 1) #69

toddejohnson opened this issue Aug 2, 2024 · 3 comments · May be fixed by #70
Assignees

Comments

@toddejohnson
Copy link

I'm watching logs for some filesystems and want notified when there are new entries. I'm using:

`journalctl -kf | xargs -L 1 gotify p

That is working great! I'd like to make it integrated so as to not worry as much about buffering and to not need the xargs and be more portable for others.

Something like:

journalctl -kf | gotify p -L 1

And the option could be:

gotify push 
--lines value, -L value Push a message every 'value' lines (default: 1)

Would this be a good idea?

@eternal-flame-AD
Copy link
Member

What about pushing a message on every null character? It is more consistent with other unix tools and probably more flexible (you may have variable output but still want to hint to the cli when to send)

@toddejohnson
Copy link
Author

@eternal-flame-AD What about a -0 option like xargs?

@eternal-flame-AD
Copy link
Member

eternal-flame-AD commented Aug 2, 2024

That might be a good idea, I'm also considering implicitly doing that because I doubt people will intentionally push null characters. xargs needed that because they default to newline but we don't have that problem

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

Successfully merging a pull request may close this issue.

2 participants