mt
mt copied to clipboard
Using as a library
Hi,
I'd like to use this as a library. Would you be open to restructuing the code a little to support this?
Thanks!
I had plans to do this for a while already sadly I did not find the time to do this.
With the recent events I’ve got my hopes up again... so yeah I hope I’ll get to refactor it in the near future.
Any special wishes? If so let me know ;)
Please see my usage of mt
here:
https://github.com/prologic/tube/blob/1db57c8d3bf7a960871dd73b72130f22a7d81ef3/media/video.go#L81-L89
Making this suitable as a library means I can do a couple of things:
- Stop using the
golang:alpine
image for runtime and compile directly the things I nee/duse - Stop installing the
mt
binary
See: https://github.com/prologic/tube/blob/1db57c8d3bf7a960871dd73b72130f22a7d81ef3/Dockerfile#L5-L9
Ok so basically just normal functionality but usable as a library? Should be doable ;)
Yes please :)
I would be also interested :) For more details please feel free to have a look at https://majamee.de for more project details. Thank you very much for your consideration.
I'd be down to help with the refactor if folks were still interested.
@GlottalTrill i've started this several times, but couldn't decide how i want to implement it and wasn't really satisfied with anything i've got... no it's more of a time thing for me.
But if you want to give it a try go ahead i'd be happy to accept any PR if you get something useful done :)
Indeed. I'll start reading the code base and post a possible strategy for creating independently "consumable" modules with the existing functions.
I just opened a PR for review. I'm open to feedback or questions. The focus of my changes if not to change the behavior of the existing code, just bring it more inline with current go practices.