justext icon indicating copy to clipboard operation
justext copied to clipboard

Documentation

Open JalfResi opened this issue 12 years ago • 4 comments

Document the source code and provide a useful set of examples. Update the ream-me. Use github project pages for coode explanation of the algorithm and examples of use.

JalfResi avatar Jun 20 '12 07:06 JalfResi

Hey, I totally agree on the need for the better documentation.

Recently I had to write a small project to extract content from a list of URLs (file input, one line per URL) and then output cleaned text in separate files. It is not clear to me how to reuse the same Reader. I tried using io.Pipe with a goroutine to put raw html into reader but at the end I forked your project and added a simple ChangeReader func to change the underlying io.Reader and just pass strings.NewReader("html string"). Seems a tad easier to use that way.

I'm quite a greenbean in golang so maybe I have overlooked some feature of go language; how would you go in reusing the same Reader in a loop?

awdrius avatar Feb 19 '15 18:02 awdrius

I've been looking at this repo recently and it's been a long time since I did any work on it. I was in he same boat; this was one of the first golang projects I did. I've used golang a lot since then and there are several things I would do differently now.

I'm a bit strapped for time these days, but I will start to pull together a plan of how I want this project to proceed. It very much in line with what you are saying; this should drop in as a reader/writer, hot swappable context and clean up the output.

I'll try to pull something together for this weekend.

JalfResi avatar Feb 19 '15 18:02 JalfResi

I'm going to use this library for production so I'm quite invested in it already (-. If you need a helping hand (with development, testing, etc.) - do let me know.

awdrius avatar Feb 21 '15 16:02 awdrius

Pull requests are always appreciated!

JalfResi avatar Feb 28 '15 08:02 JalfResi