-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Viddy as a importable package #54
Comments
@anvial Thank you. Interesting issue. Do you have any use case of the viddy package? |
Let's take any command that we wish to watch: But what if we wish to integrate watcher functionality inside To implement this, we need to import Make sense? |
I see. So the package users can construct viddy by like I'm refactoring viddy now. |
Yes, almost I see it as an implementation inside Smth like this: import (
"github.com/sachaos/viddy"
)
func RunAnyCommand() error {
...
if watchFlag != 0 {
anyCommandArgs, watchValue := anyCommandArgsWithoutWatch(os.Args)
// Prepare Viddy args
viddyArgs := append([]string{"--no-title", "--differences", "--interval", watchValue}, anyCommandArgs...)
// Define tview styles and launch preconfigured Viddy watcher
app := viddy.NewPreconfiguredViddy(viddyArgs)
if err := app.Run(); err != nil {
return err
}
} else {
...
}
return nil
} |
Hi, @sachaos I hope you're doing well. Any updates on this issue? If any help is needed, just ping me. |
@anvial Hi. I'm refactoring viddy now. |
no worries, thank you for your work! |
Hi @sachaos, I hope you are doing well. Any updates on this issue? |
This sounds very useful for many projects. I am wondering if the TUI would need to change or is it generic enough to cope ? |
Is this the branch ? https://github.com/sachaos/viddy/commits/feature/refactoring-viddy |
Ah it looks like it was forked and done here: juju/viddy@master...anvial:viddy:master @anvial great work !! I guess one day it will get merged ? |
Great news.. thanks @anvial for responding . |
I've prepared a draft PR: #77 waiting for feedback and discussion because to have the same flexibility in Viddy config that there is now in |
Because of the rewrite, it can be closed, no? |
Yes, we cannot provide a go package now. |
Hi,
First of all, thx for the excellent watcher alternative.
Are any plans to make the viddy importable go package? To use it as a watch mode implementation in other projects.
The text was updated successfully, but these errors were encountered: