Hello, I would like to be able to use ratt as a library in another project and the way the code is structured at the moment doesn't allow this. Basically I want to pass a URL and a Selectors object to RATT and get back a string containing the RSS xml. Would you be interested in a patch that achieves this? I forked the project and the changeset isn't that large (~200 lines).  https://git.sr.ht/~mariusor/ratt Cheers, /Marius
Hi Marius, that's a great idea. So I think this would be then installed with: `go install git.sr.ht/~ghost08/ratt/cmd@latest` ? Then I must change also the AUR packages. When time allows I'll check it and add your patch. Will inform you.
On 21-07-09 09:47:09, Vladimír Magyar wrote: > Hi Marius, > > that's a great idea. So I think this would be then installed with: > `go install git.sr.ht/~ghost08/ratt/cmd@latest` ? > Then I must change also the AUR packages. When time allows I'll check it > and add your patch. Will inform you. OK, I'm glad to hear. I'll prep the patch and send it sometime this week. So far I haven't tested it fully outside of what I needed it for. I'll try to also write a patch for the AUR package. Cheers, /Marius
On 21-07-09 09:47:09, Vladimír Magyar wrote: > `go install git.sr.ht/~ghost08/ratt/cmd@latest` ? In testing my patch I stumbled upon this small issue. If we use the go install command, the binary will be installed under the name of its folder, ie: cmd, which is not what we want. We have two options here: 1. Update install instructions to use git and `go build -o` 2. Rename the cmd folder to something like ratt, but then the install command will look ugly being: go install git.sr.ht/~ghost08/ratt/ratt@latest Any preference, or any idea about how to do it better? Regards, /Marius
I think it is done with another folder in the cmd git.sr.ht/~ghost08/ratt/cmd/ratt Then, I think, it can be installed with just `go install git.sr.ht/~ghost08/ratt@latest`
On 21-07-09 14:22:24, Vladimír Magyar wrote: > Then, I think, it can be installed with just > `go install git.sr.ht/~ghost08/ratt@latest` Hello Vladimir, thank you for the suggestion but unfortunatelly no, install requires a main package as the final element in the path (using my fork for this as an example): go install git.sr.ht/~mariusor/ratt@5936598 go install: package git.sr.ht/~mariusor/ratt is not a main package I think that using /cmd/ratt will still require full path in the install command. I'll do some more investigation on my side also. Cheers, /Marius
Ok so it will be: `go install git.sr.ht/~ghost08/ratt/cmd/ratt@latest` I think it's not that big of a deal So I'll wait for your patch.