----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43715/#review119678 -----------------------------------------------------------
A commit addressing all my comments can be seen here: https://github.com/klueska-mesosphere/mesos/commit/23f571376ff6dfffaf1a09a0d8081da1d323a2f3 Feel free to simply apply it and push it out for review again if you agree with everything. support/generate-endpoint-help.py (lines 47 - 53) <https://reviews.apache.org/r/43715/#comment181016> I would rewrite this as: ``` MARKDOWN_HEADER = ( """<!--- This is an automatically generated file. DO NOT EDIT! ---> --- title: %s layout: documentation --- """ ) ``` (Notice the %s in there...) Then modify how this is used down below (as demonstrated in a follow up comment) support/generate-endpoint-help.py (line 56) <https://reviews.apache.org/r/43715/#comment181024> We should add a new global here: ``` MARKDOWN_TITLE = "Mesos - HTTP Endpoints%s" ``` where we can fill in the %s on a per call-site basis. support/generate-endpoint-help.py (line 178) <https://reviews.apache.org/r/43715/#comment181019> I would rename this field from `name` to `title` and then use it as described in a comment below. It should also not take a default value of "". support/generate-endpoint-help.py (lines 187 - 190) <https://reviews.apache.org/r/43715/#comment181017> This should no longer be necessary, given the previous comments and the ones to follow. support/generate-endpoint-help.py (lines 194 - 199) <https://reviews.apache.org/r/43715/#comment181021> This should be simplified to: ``` output = (MARKDOWN_HEADER % title) + '\n' + output.rstrip() ``` support/generate-endpoint-help.py (lines 217 - 218) <https://reviews.apache.org/r/43715/#comment181030> While we are fixing things, we should remove this extra newline here at the beginning: """ # HTTP Endpoints # should become: """# HTTP Endpoints # support/generate-endpoint-help.py (line 283) <https://reviews.apache.org/r/43715/#comment181026> Here we should change this to: ``` write_markdown(path, output, MARKDOWN_TITLE % "") ``` support/generate-endpoint-help.py (lines 296 - 300) <https://reviews.apache.org/r/43715/#comment181041> here we should add an extra variable title as: ``` title = get_endpoint_path(id, name) ``` And then change the `write_markdown()` line to: ``` write_markdown(path, text, MARKDOWN_TITLE_TEMPLATE % (" - " + title)) ``` - Kevin Klues On Feb. 18, 2016, 6:36 p.m., Abhishek Dasgupta wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/43715/ > ----------------------------------------------------------- > > (Updated Feb. 18, 2016, 6:36 p.m.) > > > Review request for mesos, Kevin Klues and Neil Conway. > > > Repository: mesos > > > Description > ------- > > Title for endpoint documentation. > > > Diffs > ----- > > support/generate-endpoint-help.py 28333847e5603c942f25ec9d9a0429bd676f4541 > > Diff: https://reviews.apache.org/r/43715/diff/ > > > Testing > ------- > > This is the patch for support/generate-endpoint-help.py to include the > generated files with titles. > Tested using "rake dev" on a live site. > > > Thanks, > > Abhishek Dasgupta > >