{"action":"created","issue":{"url":"https://api.github.com/repos/MichaelHatherly/Lexicon.jl/issues/116","labels_url":"https://api.github.com/repos/MichaelHatherly/Lexicon.jl/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/MichaelHatherly/Lexicon.jl/issues/116/comments","events_url":"https://api.github.com/repos/MichaelHatherly/Lexicon.jl/issues/116/events","html_url":"https://github.com/MichaelHatherly/Lexicon.jl/pull/116","id":82167428,"number":116,"title":"diverse commits","user":{"login":"peter1000","id":6168860,"avatar_url":"https://avatars.githubusercontent.com/u/6168860?v=3","gravatar_id":"","url":"https://api.github.com/users/peter1000","html_url":"https://github.com/peter1000","followers_url":"https://api.github.com/users/peter1000/followers","following_url":"https://api.github.com/users/peter1000/following{/other_user}","gists_url":"https://api.github.com/users/peter1000/gists{/gist_id}","starred_url":"https://api.github.com/users/peter1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter1000/subscriptions","organizations_url":"https://api.github.com/users/peter1000/orgs","repos_url":"https://api.github.com/users/peter1000/repos","events_url":"https://api.github.com/users/peter1000/events{/privacy}","received_events_url":"https://api.github.com/users/peter1000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":41,"created_at":"2015-05-28T23:23:03Z","updated_at":"2015-06-12T15:40:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MichaelHatherly/Lexicon.jl/pulls/116","html_url":"https://github.com/MichaelHatherly/Lexicon.jl/pull/116","diff_url":"https://github.com/MichaelHatherly/Lexicon.jl/pull/116.diff","patch_url":"https://github.com/MichaelHatherly/Lexicon.jl/pull/116.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/MichaelHatherly/Lexicon.jl/issues/comments/111531107","html_url":"https://github.com/MichaelHatherly/Lexicon.jl/pull/116#issuecomment-111531107","issue_url":"https://api.github.com/repos/MichaelHatherly/Lexicon.jl/issues/116","id":111531107,"user":{"login":"MichaelHatherly","id":6144086,"avatar_url":"https://avatars.githubusercontent.com/u/6144086?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelHatherly","html_url":"https://github.com/MichaelHatherly","followers_url":"https://api.github.com/users/MichaelHatherly/followers","following_url":"https://api.github.com/users/MichaelHatherly/following{/other_user}","gists_url":"https://api.github.com/users/MichaelHatherly/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelHatherly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelHatherly/subscriptions","organizations_url":"https://api.github.com/users/MichaelHatherly/orgs","repos_url":"https://api.github.com/users/MichaelHatherly/repos","events_url":"https://api.github.com/users/MichaelHatherly/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelHatherly/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T15:40:16Z","updated_at":"2015-06-12T15:40:16Z","body":"I want to have most of the sorting/filtering/parsing done only once rather than have it as part of the final rendering stage (to markdown, LaTeX, etc). I've just push (ed9bd2ea1cc45a21d4087e9fb98c2daed246e473) code for \"stage 2\" of the rendering, ie. compiling and caching some of the work needed that doesn't involve actually outputting any documentation.\r\n\r\nThe three stages should then be:\r\n\r\n**Stage 1:**\r\n\r\n```jl\r\nout = document(\r\n    section(...),\r\n    section(...),\r\n)\r\n```\r\n\r\nCapture the structure and configuration for the documentation tree in ``out``. Configuration unrelated to the output formats should be specified here.\r\n\r\n**Stage 2:**\r\n\r\n```julia\r\ncompile!(out)\r\n```\r\n\r\nGroup, sort, and filter the docstrings. Read all file paths and parse strings into markdown (or other) AST. Generate IDs for each node. Anything else you think should happen at this point?\r\n\r\n**Stage 3:**\r\n\r\n```julia\r\nsave(out, Markdown(<<config>>))\r\nsave(out, LaTeX(<<config>>))\r\n```\r\n\r\nTake the documentation tree ``out`` and render it using the provided format, ``Markdown``, ``LaTeX``, etc that provides any format-specific configuration needed. ``save`` will call ``compile!`` internally so the user doesn't have to worried about that step.\r\n\r\nI don't think stage 3 should be mutating anything in the ``.cache`` fields since that might result in the order of calls to ``save`` mattering. State for stage 3 should be stored in the ``Markdown`` object passed as the second object to ``save``."}}