Elm DocSets

582 views
Skip to first unread message

Peter Damoc

unread,
Sep 14, 2015, 2:06:48 PM9/14/15
to Elm Discuss
I think there is real value in providing a solid Elm documentation as a DocSet. 

Since the documentation is already generated for package.elm-lange.org couldn't it be also generated as a DocSet? 

If this is not easily done, is there somewhere a documentation for the JSON api of package.elm-lang.org? How can one extract in a sensible manner the data that is available as JSON? 

I've played all day today with some python scripts to try to generate this myself but, the structure of the JSON is not uniform. 

There is a nice app called Dash and a plug-in for SublimeText.
Hitting "CTRL+h" over a function name in Sublime and being automatically sent to Dash in the Elm DocSet with the name of the function already in the search field is GREAT. 

The UX of searching for documentation like this beats the UX of searching on packages.elm-lang.org 

Anyway, if any of you has Dash (or Zeal), you can play with what I have got so far:

https://github.com/pdamoc/pdamoc.github.io/blob/master/Elm.docset.zip?raw=true

Disclaimer: I've only tested this in Dash. The pages are much uglier and with less functionality than the docs on package.elm-lang.org but it kinda works for some of the functions. 
 

--
There is NO FATE, we are the creators.
blog: http://damoc.ro/

dedo

unread,
Sep 14, 2015, 11:08:31 PM9/14/15
to Elm Discuss
Thanks for sharing! Even in current state it is a much better UX than packages.elm-lang.org, and available offline too.

Evan

unread,
Sep 15, 2015, 2:36:10 PM9/15/15
to Elm Discuss
The format of the docs changed with 0.15.1 so there should be a field in the documentation saying which version of the compiler they were generated with. IIRC the options are "0.15.1" and "old" for anything before that. Those two categories will be consistent within themselves, and I'd focus on the 0.15.1 format.

Peter Damoc

unread,
Sep 15, 2015, 2:53:55 PM9/15/15
to Elm Discuss
This helps a lot. 

I have put the code I have so far here:

https://github.com/pdamoc/elm-docset

Looking at the elm sources I was able to find where the missing information was. :)

The generated docset is similar to the one provided yesterday. 

I'll look tomorrow at splitting the generation based on the `generated-with-elm-version` flag. Thanks Evan! :)

--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Damoc

unread,
Sep 16, 2015, 11:17:09 AM9/16/15
to Elm Discuss
I've put in the effort to adapt the old style documentation to the new version (it might still look wrong). 

The latest version of the code is able to generate all the new packages' documentation.

I've packaged the docset, sent if for approval to Dash User Contribution and it has been approved few minutes ago. 

If you have Dash, you can now install it from the Preferences > User Contributed.


Message has been deleted

Nick Lavers

unread,
Oct 1, 2015, 3:32:46 AM10/1/15
to Elm Discuss
Thanks for this Peter, 

I've just installed it with Dash and it's sped things up heaps already. Much appreciated!

Peter Damoc

unread,
Oct 1, 2015, 4:05:47 AM10/1/15
to Elm Discuss
One is glad to be of service. 

Please make sure you have Dash integrated with you editor. 
I can CTRL+H to search the word under cursor from Sublime and it takes the whole experience up a level. 


Kevin McGee

unread,
Oct 1, 2015, 12:45:37 PM10/1/15
to Elm Discuss
Can you please elaborate on `Dash`? (Which OS?)
Do you mean the Ubuntu Linux desktop util or some other app?

C. R. Oldham

unread,
Oct 1, 2015, 1:09:20 PM10/1/15
to elm-d...@googlegroups.com
On Thu, Oct 1, 2015 at 10:45 AM, Kevin McGee <neta...@gmail.com> wrote:
Can you please elaborate on `Dash`? (Which OS?)


Dash runs under OS X and iOS only. 

--cro


 

Kevin McGee

unread,
Oct 1, 2015, 1:15:23 PM10/1/15
to Elm Discuss
Nice.
Kinda thought so. :(

Matthew Singletary

unread,
Oct 1, 2015, 1:49:27 PM10/1/15
to Elm Discuss
If you want an app, there is zeal (https://zealdocs.org/) that works on Linux or Windows.

But if you don't want to install anything,
devdocs.io is a good source for lots of documentation.  They don't currently support Elm, but it is on their trello board (https://trello.com/b/6BmTulfx/devdocs-documentation) to possibly be added. Make sure to vote if you want it!




--
Reply all
Reply to author
Forward
0 new messages