[go-nuts] godoc-static - Generate static documentation for your packages

2020-02-06 Thread tslocum
Repository: https://gitlab.com/tslocum/godoc-static

Demo output: https://docs.rocketnine.space

Inspired by the recent news of godoc.org shutting down I have created 
godoc-static.  While we could all migrate to pkg.go.dev, we could also host 
and update our documentation ourselves. 

When invoked, "godoc -http=localhost:" is started, relevant package 
documentation pages and source code is scraped and rewritten to fix 
styling, expanding content, etc., then godoc is terminated. 

Note that while things seem to work, I have only focused on shipping the 
MVP so far.  Here be dragons.  For instance, to get this to work on my VPS 
I had to set  GO111MODULE to off and clone relevant package sources to 
GOPATH.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a001f421-6edb-453a-9307-f88295005cb1%40googlegroups.com.


Re: [go-nuts] godoc-static - Generate static documentation for your packages

2020-02-10 Thread Nick
Quoth tslo...@gmail.com:
> Inspired by the recent news of godoc.org shutting down I have created
> godoc-static.  While we could all migrate to pkg.go.dev, we could also host 
> and
> update our documentation ourselves.

Cool, sounds interesting, I like the idea of more tools to make more 
distributed hosting of go stuff easier!

> When invoked, "godoc -http=localhost:" is started, relevant package
> documentation pages and source code is scraped and rewritten to fix styling,
> expanding content, etc., then godoc is terminated.

Interesting approach. Did you consider taking the code that godoc 
uses (either direct copying or including it somehow) and generating 
the HTML directly? I can imagine that might not be straightforward, 
but I'm interested to hear why you chose this approach instead.  
Without having looked at the code, I would imagine it would be more 
liable to break with future versions of godoc which change the 
output.

Anyway, good job, I may use it myself soon, and will let you know 
how I get on.

Nick

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/20200210151415.GA1745%40mussel.lan.


Re: [go-nuts] godoc-static - Generate static documentation for your packages

2020-02-10 Thread tslocum
Hey Nick, I did consider that and hope to still visit it.  I chose to 
scrape instead because the output requires only minimal alteration to 
achieve the desired result. Example code expansion is rewritten to not 
require JavaScript by using  and  and not much more.  
Large changes to output from the godoc tool can certainly break 
godoc-static in its current state.  Assistance with exploring generating 
similar output without using godoc would be appreciated.


On Monday, February 10, 2020 at 7:14:51 AM UTC-8, Nick wrote:
>
> Quoth tsl...@gmail.com : 
> > Inspired by the recent news of godoc.org shutting down I have created 
> > godoc-static.  While we could all migrate to pkg.go.dev 
> ,
>  
> we could also host and 
> > update our documentation ourselves. 
>
> Cool, sounds interesting, I like the idea of more tools to make more 
> distributed hosting of go stuff easier! 
>
> > When invoked, "godoc -http=localhost:" is started, relevant package 
> > documentation pages and source code is scraped and rewritten to fix 
> styling, 
> > expanding content, etc., then godoc is terminated. 
>
> Interesting approach. Did you consider taking the code that godoc 
> uses (either direct copying or including it somehow) and generating 
> the HTML directly? I can imagine that might not be straightforward, 
> but I'm interested to hear why you chose this approach instead.   
> Without having looked at the code, I would imagine it would be more 
> liable to break with future versions of godoc which change the 
> output. 
>
> Anyway, good job, I may use it myself soon, and will let you know 
> how I get on. 
>
> Nick 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/b4af7919-e479-4b19-b068-bee6bf6d876b%40googlegroups.com.


Re: [go-nuts] godoc-static - Generate static documentation for your packages

2020-02-26 Thread tslocum
I've had some time to polish this project somewhat. It should be fairly 
usable.

I've added ZIP archive generation to allow browsing offline without godoc.

Any additional feedback is welcome.

On Monday, February 10, 2020 at 8:22:51 AM UTC-8, Trevor Slocum wrote:
>
> Hey Nick, I did consider that and hope to still visit it.  I chose to 
> scrape instead because the output requires only minimal alteration to 
> achieve the desired result. Example code expansion is rewritten to not 
> require JavaScript by using  and  and not much more.  
> Large changes to output from the godoc tool can certainly break 
> godoc-static in its current state.  Assistance with exploring generating 
> similar output without using godoc would be appreciated.
>
>
> On Monday, February 10, 2020 at 7:14:51 AM UTC-8, Nick wrote:
>>
>> Quoth tsl...@gmail.com: 
>> > Inspired by the recent news of godoc.org shutting down I have created 
>> > godoc-static.  While we could all migrate to pkg.go.dev 
>> ,
>>  
>> we could also host and 
>> > update our documentation ourselves. 
>>
>> Cool, sounds interesting, I like the idea of more tools to make more 
>> distributed hosting of go stuff easier! 
>>
>> > When invoked, "godoc -http=localhost:" is started, relevant package 
>> > documentation pages and source code is scraped and rewritten to fix 
>> styling, 
>> > expanding content, etc., then godoc is terminated. 
>>
>> Interesting approach. Did you consider taking the code that godoc 
>> uses (either direct copying or including it somehow) and generating 
>> the HTML directly? I can imagine that might not be straightforward, 
>> but I'm interested to hear why you chose this approach instead.   
>> Without having looked at the code, I would imagine it would be more 
>> liable to break with future versions of godoc which change the 
>> output. 
>>
>> Anyway, good job, I may use it myself soon, and will let you know 
>> how I get on. 
>>
>> Nick 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/68e59b93-511d-466b-ab7b-4038d3d85df0%40googlegroups.com.


Re: [go-nuts] godoc-static - Generate static documentation for your packages

2020-09-10 Thread Trevor Slocum
godoc-static v0.1.8 is now available featuring improved support for Go 
modules.

On Wednesday, February 26, 2020 at 3:45:49 PM UTC-8 Trevor Slocum wrote:

> I've had some time to polish this project somewhat. It should be fairly 
> usable.
>
> I've added ZIP archive generation to allow browsing offline without godoc.
>
> Any additional feedback is welcome.
>
> On Monday, February 10, 2020 at 8:22:51 AM UTC-8, Trevor Slocum wrote:
>>
>> Hey Nick, I did consider that and hope to still visit it.  I chose to 
>> scrape instead because the output requires only minimal alteration to 
>> achieve the desired result. Example code expansion is rewritten to not 
>> require JavaScript by using  and  and not much more.  
>> Large changes to output from the godoc tool can certainly break 
>> godoc-static in its current state.  Assistance with exploring generating 
>> similar output without using godoc would be appreciated.
>>
>>
>> On Monday, February 10, 2020 at 7:14:51 AM UTC-8, Nick wrote:
>>>
>>> Quoth tsl...@gmail.com: 
>>> > Inspired by the recent news of godoc.org shutting down I have created 
>>> > godoc-static.  While we could all migrate to pkg.go.dev 
>>> ,
>>>  
>>> we could also host and 
>>> > update our documentation ourselves. 
>>>
>>> Cool, sounds interesting, I like the idea of more tools to make more 
>>> distributed hosting of go stuff easier! 
>>>
>>> > When invoked, "godoc -http=localhost:" is started, relevant 
>>> package 
>>> > documentation pages and source code is scraped and rewritten to fix 
>>> styling, 
>>> > expanding content, etc., then godoc is terminated. 
>>>
>>> Interesting approach. Did you consider taking the code that godoc 
>>> uses (either direct copying or including it somehow) and generating 
>>> the HTML directly? I can imagine that might not be straightforward, 
>>> but I'm interested to hear why you chose this approach instead.   
>>> Without having looked at the code, I would imagine it would be more 
>>> liable to break with future versions of godoc which change the 
>>> output. 
>>>
>>> Anyway, good job, I may use it myself soon, and will let you know 
>>> how I get on. 
>>>
>>> Nick 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/59d45342-c8ae-4dc7-8b2d-96910b9906d8n%40googlegroups.com.