Closed khorn closed 6 years ago
FYI, replaces #53
@khorn it's a good start, but there seems to still be some todos. Will you ping me when you're ready for me to review (or if you get stuck?)
@theacodes Ping.
Hi @khorn, I don't think it's very useful to have console output for this. I would prefer us just to do the HTML preview.
Is there any update of this ? I agree that having console output for this doesn't quite useful, but it would be good to have a output html generated for more easier sharing.
@hsiaoyi0504 it's up to @khorn if they want to update their PR. You're also welcome to start a new PR based on this one to address review comments.
@theacodes Sorry it's been so long...
I'm a bit confused by your comment. If the intention was to only do an HTML preview in a web browser, then I don't understand why #53 wasn't accepted. It does exactly that and works (or at least worked...it appears to have developed some conflicts) perfectly well.
The intent of this change was to (a) replace/update that branch, and (b) also address the request in #52, which asks for a command to generate an HTML preview in a file.
This was exactly what I was asked to do at the PyCon sprint. The only difference is I decided to send the generated HTML to stdout, rather than a file, as that seemed more flexible.
I figured that sending the results to stdout would allow the command to be sent to linters, spell checkers, etc. perhaps as part of a release checklist or CI/CD workflow.
Personally, it seems to me that stdout output is far more useful than a webbrowser preview. I would certainly rather have a tool that sent HTML to stdout, which I could then pipe anywhere, rather one that only allowed me to preview the HTML in a browser.
Why do you disagree?
@khorn sorry for the confusion.
I think it's surprising behavior for an interactive command-line tool to output non-human-readable code. I'd prefer if we had the following behavior, let me know what you think:
render-readme
with no arguments produces a readme.html
file in the current directory.render-readme --output -
outputs to stdout. (this behavior is consistent with argparseFor (2) don't bother doing console color highlighting, as the use case for outputting the raw html to stdout is to pipe to other programs which likely won't be fans of any escape sequences.
@theacodes I'm fine with your suggestions, just haven't gotten to it yet. I do still intend to!
Cool! No worries. :)
On Thu, Sep 27, 2018, 3:02 PM Kevin Horn notifications@github.com wrote:
@theacodes https://github.com/theacodes I'm fine with your suggestions, just haven't gotten to it yet. I do still intend to!
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/pypa/readme_renderer/pull/101#issuecomment-425257294, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPUc-l_suRp1P640uVEm19uSE3R0bWpks5ufUrygaJpZM4T-m0S .
This allows users to render HTML locally in order to preview the rendered markup prior to uploading a package. Optionally, the user can also control syntax highlighting and send the markup to a web browser.