
Hello everybody I'm looking for a way to avoid having two files with almost the same information on github: README.markdown and package.cabal. As far as I can tell, a new github README parser[1] can be written, but it only supports README files with different extensions and requires either ruby or a script which converts stdin into html. Another solution would be that haddock supports a README file, just like github, as the index.html of the cabal package. Github houses a lot of cabal packages so more people could benefit from this solution. Greetings Joris [1]: https://github.com/github/markup

On 23 July 2011 10:35, Joris Putcuyps
Hello everybody
I'm looking for a way to avoid having two files with almost the same information on github: README.markdown and package.cabal.
As far as I can tell, a new github README parser[1] can be written, but it only supports README files with different extensions and requires either ruby or a script which converts stdin into html.
Another solution would be that haddock supports a README file, just like github, as the index.html of the cabal package.
Github houses a lot of cabal packages so more people could benefit from this solution.
Greetings
Joris
I don't have any of my packages on Github, but I'd like to point out a few things: 1) The description field in a .cabal file uses Haddock syntax (and a slightly mangled one at that, what with not being able to have blank lines) rather than Markdown. 2) I see the package description and a README as being two different things: the description gives you an overview of what a package is/does and why you'd want to use it, the README gives you more information about _how_ you'd use it. There is some overlap, but it's usually in the sense that the description in the .cabal file as being a subset of the README. That said, it would be nice if Cabal supported explicit fields for README, TODO, ChangeLog, etc. files rather than banging them all in Extra-Source-Files. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Sat, 23 Jul 2011 10:47:18 +0000
Ivan Lazar Miljenovic
On 23 July 2011 10:35, Joris Putcuyps
wrote: Hello everybody
I'm looking for a way to avoid having two files with almost the same information on github: README.markdown and package.cabal.
As far as I can tell, a new github README parser[1] can be written, but it only supports README files with different extensions and requires either ruby or a script which converts stdin into html.
Another solution would be that haddock supports a README file, just like github, as the index.html of the cabal package.
Github houses a lot of cabal packages so more people could benefit from this solution.
Greetings
Joris
I don't have any of my packages on Github, but I'd like to point out a few things:
1) The description field in a .cabal file uses Haddock syntax (and a slightly mangled one at that, what with not being able to have blank lines) rather than Markdown.
2) I see the package description and a README as being two different things: the description gives you an overview of what a package is/does and why you'd want to use it, the README gives you more information about _how_ you'd use it. There is some overlap, but it's usually in the sense that the description in the .cabal file as being a subset of the README.
That said, it would be nice if Cabal supported explicit fields for README, TODO, ChangeLog, etc. files rather than banging them all in Extra-Source-Files.
Hello About your first point, I'm aware of that. It would have been nice if .cabal and haddock used markdown, this is very popular, thanks to pandoc. Then generating html, pdf, texinfo, ... would be very easy. When you create a package in github you add a short description, probably the same as the synopsis from .cabal. The description from .cabal could still go in the README. I agree that the README will probably contain more than just a description, it is more like a "man page". Having this also parsed by haddock for the html docs would also make me content. Joris

On 23 July 2011 21:33, Joris Putcuyps
About your first point, I'm aware of that. It would have been nice if .cabal and haddock used markdown, this is very popular, thanks to pandoc. Then generating html, pdf, texinfo, ... would be very easy.
This has been suggested before, e.g. http://haskell.1045720.n5.nabble.com/GSoC-Project-A-Haddock-Pandoc-documenta... ; it just requires someone to implement it (I don't think that GSoC submission was successful).
When you create a package in github you add a short description, probably the same as the synopsis from .cabal. The description from .cabal could still go in the README.
I agree that the README will probably contain more than just a description, it is more like a "man page". Having this also parsed by haddock for the html docs would also make me content.
I think the README is more suitable for a website than Haddock docs; e.g. a README for haskell projects typically has at some point "to get this, do `cabal install <foo>' " which you don't really need for Haddock docs (as you're either already reading them on your machine after they've been installed, or on Haddock in which case a central specification of how to use cabal-install is more appropriate than repeating it multiple times). -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Hi Joris, not exactly what you are think about, but still maybe somewhat related. I thought it would be nice to have support for literate Haskell in README files (say README.lhs) on GitHub. I've done something similar for WAI[1], using sed to transform it to markdown, native support support for README.lhs would still be nice. That said, I think if you'd integrate cabal support into GitHub's README facility, README.* should still have precedence. Cheers, Simon [1] https://github.com/yesodweb/wai/tree/master/wai
participants (3)
-
Ivan Lazar Miljenovic
-
Joris Putcuyps
-
Simon Hengel