plugins.cakephp.org icon indicating copy to clipboard operation
plugins.cakephp.org copied to clipboard

Integrate a project’s readme

Open zeroasterisk opened this issue 15 years ago • 11 comments

it's a bitch to parse all the different readme formats... perhaps a textarea with the source would be enough (since we can all read most of the formats by site)... just enough to get a summary of an unfamiliar project

zeroasterisk avatar Sep 07 '10 13:09 zeroasterisk

Strange, I was thinking about the exact same thing. I even submitted a ticket to github asking them to add this to their API since I need this in another project.

ProLoser avatar Jun 24 '11 01:06 ProLoser

I independently thought the same thing. Saves a step, and the user wont have to leave the site every time to view it.

sdoney avatar Jun 24 '11 01:06 sdoney

The big thing with this is that you need to worry about the following:

  • People don't all use markdown. or textile. or even a markup language. So I'd have to parse any/all of them. Or at least the two I've mentioned
  • People don't always standardize on one name for a readme. Readme.markdown, readme.mkdn, readme.mkdown are all valid readmes
  • I'd have to sanitize the readme before displaying it. And that would mean I'd have to store it in the db so it doesn't take forever on each page-load. And that would mean I need to worry about readme invalidation. Perfect.

josegonzalez avatar Jun 24 '11 01:06 josegonzalez

https://github.com/github/markup

sdoney avatar Jun 25 '11 01:06 sdoney

Yes, let me add that to the Gemfile so that my ruby application that indexes CakePHP code can consume markup on github.

josegonzalez avatar Jun 25 '11 14:06 josegonzalez

just gathering the pieces together to make this happen eventually, yes i know cakepackages is not ruby, but even i could adapt this code for php.

On Sat, Jun 25, 2011 at 10:22 AM, josegonzalez < [email protected]>wrote:

Yes, let me add that to the Gemfile so that my ruby application that indexes CakePHP code can consume markup on github.

Reply to this email directly or view it on GitHub: https://github.com/josegonzalez/cakepackages/issues/11#issuecomment-1437987

sdoney avatar Jun 25 '11 16:06 sdoney

Then do so.

josegonzalez avatar Jun 25 '11 18:06 josegonzalez

Found a project that may be the best solution. I can look into forking it and adding missing parsers needed. I opened a bug ticket so that the project would support file extension scanning: https://github.com/joebeeson/embellish/issues/1

ProLoser avatar Jun 27 '11 20:06 ProLoser

They had a discussion on the github markup repo about how useful or useless file extensions can be. But i think with a combination of file extension and other methods like file header that it could be done.

On Mon, Jun 27, 2011 at 4:50 PM, ProLoser < [email protected]>wrote:

Found a project that may be the best solution. I can look into forking it and adding missing parsers needed. I opened a bug ticket so that the project would support file extension scanning: https://github.com/joebeeson/embellish/issues/1

Reply to this email directly or view it on GitHub: https://github.com/josegonzalez/cakepackages/issues/11#issuecomment-1450348

sdoney avatar Jun 28 '11 00:06 sdoney

Checking the file extension would be good enough, and then mapping these to some library for parsing.

What would need to occur is, on repository update, the readme would be detected (through use of some regex) and then turned into some standard, like, idk, html. It's sanitized and stored, then rendered whenever the user accesses the page for that package. Could be stored in a viewcache, or even just raw html that is then included via php.

Pandoc would be nice, if it compiled on my mac and didn't require 9 million other things.

josegonzalez avatar Jun 28 '11 03:06 josegonzalez

Is anyone working on this at the moment? I'd be happy to add you guys as contributors so we can assign things to people.

josegonzalez avatar Jun 30 '11 00:06 josegonzalez