Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for reStructuredText (*.rst) #37

Closed
peterjc opened this issue Oct 2, 2013 · 13 comments
Closed

Support for reStructuredText (*.rst) #37

peterjc opened this issue Oct 2, 2013 · 13 comments

Comments

@peterjc
Copy link

peterjc commented Oct 2, 2013

Would it be possible to support reStructuredText or other markup languages also supported on GitHub?

@joeyespo joeyespo changed the title Support for reStructuredText (*.rst) Support for reStructuredText (*.rst) without typing the filename Jun 14, 2014
@joeyespo joeyespo added enhancement and removed bug labels Jun 14, 2014
@joeyespo
Copy link
Owner

This already works out-of-the-box. You just need to explicitly provide the README.rst filename.

So I'll append "without typing the filename" the title and relabel this to an enhancement to reflect the new name.

@joeyespo
Copy link
Owner

This enhancement is resolved in 4f67141 which will go out in the next release.

Thanks for initially bringing this to my attention :-)

@peterjc
Copy link
Author

peterjc commented Jun 14, 2014

Great. Can you add something to the project's README file to mention as with GitHub itself, other formats are supported - not just MarkDown?

@joeyespo
Copy link
Owner

Good call! Sure.

Opened #59 for now.

@livibetter
Copy link

I don't think this is fixed or work-out-of-the-box per se. From what I see in the rendered result, the GitHub /markdown API only does Markdown, so this is actually feeding a reST source to Markdown processor, and the result most likely wouldn't be correct as anyone can guess.

@joeyespo
Copy link
Owner

Ah, you're right. I was testing with a README.rst file that looked too much like Markdown.

Apologies. I'll re-open this.

@joeyespo joeyespo reopened this Jun 14, 2014
@joeyespo joeyespo changed the title Support for reStructuredText (*.rst) without typing the filename Support for reStructuredText (*.rst) Jun 14, 2014
@joeyespo
Copy link
Owner

I wonder if the bulk of this solution should be in another repo. Say, a Python port of GitHub Markup that this project can import. This could be an optional dependency, and would even solve #35.

Thoughts anyone?

@livibetter
Copy link

Frankly, I don't give high hope for this issue to be fixed.

I think one way is to just invoke the Ruby script, pipe in the rendered result. I don't like this way, but I think it's the only best method we can get a correct result as far as I can see.

Unless GitHub API does more than just Markdown, I really don't see any other reliable way.

@joeyespo
Copy link
Owner

@livibetter Agreed. I'll keep the issue open for now though to let it simmer though.

If there's enough +1's in this thread, I'll consider putting more research toward it. And as always, I'm open to suggestions or proof-of-concepts from the community.

@msabramo
Copy link

Does the GitHub API only support Markdown?

One (perhaps silly) way is to actually post a comment or a README to some fake repo and then grab the results. This is screen scraping though and comes with all the disadvantages of that like tendency to break whenever GitHub changes its UI.

@joeyespo
Copy link
Owner

@msabramo Ha, that's actually an interesting solution. It'd be a cool weekend project that might be lightweight enough to pull in. (At least compared to the alternate of rebuilding it all.)

@joeyespo
Copy link
Owner

joeyespo commented Aug 2, 2014

I don't think I'll be getting to this any time soon. Closing this as out-of-scope.

As always, PRs are welcome though.

Also, filing an issue with GitHub's API might be better solution so we don't need a ton of custom code here. In any case, this will probably be a job for the offline renderer (#35) since that's where all the custom rendering logic will be. Grip could then auto-select offline mode if it detects RST, for example.

@ssundarraj
Copy link
Contributor

Maybe this could be of help.

https://pypi.python.org/pypi/restview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants