ANNOUNCE: standalone-haddock-1.0

I am happy to announce the first release of standalone-haddock. http://feuerbach.github.io/standalone-haddock/ standalone-haddock generates standalone haddock Haskell documentation. When you simply run `cabal haddock`, the resulting HTML documentation contains hyperlinks to other packages on your system. As a result, you cannot publish it on the internet (well, you can, but the links will be broken). standalone-haddock takes several packages for which you want to publish documentation. It generates documentation for them with proper links: * links to identifiers inside this package set are relative * links to identifiers from external packages lead to hackage Thus the resulting directory with HTML is relocatable and publishable. **TL;DR**: it just works. See the [haskell-suite][] documentation for an example output. [haskell-suite]: http://haskell-suite.github.io/docs Usage ----- Usage: standalone-haddock [--package-db DB-PATH] -o OUTPUT-PATH [PACKAGE-PATH] Available options: -h,--help Show this help text --package-db DB-PATH Additional package database -o OUTPUT-PATH Directory where html files will be placed `PACKAGE-PATH` is the path to the (unpacked) package — i.e. a directory with a `.cabal` file. For example: standalone-haddock -o doc haskell-names haskell-packages haskell-src-exts hse-cpp cabal/Cabal **NOTE**: dependencies of every package need to be already installed in the system with documentation (even those dependencies that themselves belong to the current package set). If they are installed in a non-standard package database (e.g. if you use sandboxes), use the `--package-db` option. Cabal dependency ---------------- The program only builds with (unreleased) Cabal 1.17 which you can get from [github](https://github.com/haskell/cabal). I spent some time trying to make it compatible with Cabal 1.16 (see [Cabal-1.16][] branch), but the API seems to have changed too much. If you seriously care about this, feel free to send a patch, but it's really easier just to install Cabal HEAD. [Cabal-1.16]: https://github.com/feuerbach/standalone-haddock/tree/Cabal-1.16 Roman

Hello Roman!
Thank you, this is a great contribution. I found myself several times
modifying the html output by hand in order to do exactly this. Nice!
On Fri, Jun 7, 2013 at 2:15 PM, Roman Cheplyaka
I am happy to announce the first release of standalone-haddock.
http://feuerbach.github.io/standalone-haddock/
standalone-haddock generates standalone haddock Haskell documentation.
When you simply run `cabal haddock`, the resulting HTML documentation contains hyperlinks to other packages on your system. As a result, you cannot publish it on the internet (well, you can, but the links will be broken).
standalone-haddock takes several packages for which you want to publish documentation. It generates documentation for them with proper links:
* links to identifiers inside this package set are relative * links to identifiers from external packages lead to hackage
Thus the resulting directory with HTML is relocatable and publishable.
**TL;DR**: it just works. See the [haskell-suite][] documentation for an example output.
[haskell-suite]: http://haskell-suite.github.io/docs
Usage -----
Usage: standalone-haddock [--package-db DB-PATH] -o OUTPUT-PATH [PACKAGE-PATH]
Available options: -h,--help Show this help text --package-db DB-PATH Additional package database -o OUTPUT-PATH Directory where html files will be placed
`PACKAGE-PATH` is the path to the (unpacked) package — i.e. a directory with a `.cabal` file.
For example:
standalone-haddock -o doc haskell-names haskell-packages haskell-src-exts hse-cpp cabal/Cabal
**NOTE**: dependencies of every package need to be already installed in the system with documentation (even those dependencies that themselves belong to the current package set). If they are installed in a non-standard package database (e.g. if you use sandboxes), use the `--package-db` option.
Cabal dependency ----------------
The program only builds with (unreleased) Cabal 1.17 which you can get from [github](https://github.com/haskell/cabal).
I spent some time trying to make it compatible with Cabal 1.16 (see [Cabal-1.16][] branch), but the API seems to have changed too much.
If you seriously care about this, feel free to send a patch, but it's really easier just to install Cabal HEAD.
[Cabal-1.16]: https://github.com/feuerbach/standalone-haddock/tree/Cabal-1.16
Roman
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Awesome! I have been wanting to use scoutess to automatically build
and upload haddock docs, but getting it to build the docs in an
uploadable fashion was so painful! I had crazy code that was rewriting
the package database and stuff.
This seems like exactly what I need!
- jeremy
On Fri, Jun 7, 2013 at 7:15 AM, Roman Cheplyaka
I am happy to announce the first release of standalone-haddock.
http://feuerbach.github.io/standalone-haddock/
standalone-haddock generates standalone haddock Haskell documentation.
When you simply run `cabal haddock`, the resulting HTML documentation contains hyperlinks to other packages on your system. As a result, you cannot publish it on the internet (well, you can, but the links will be broken).
standalone-haddock takes several packages for which you want to publish documentation. It generates documentation for them with proper links:
* links to identifiers inside this package set are relative * links to identifiers from external packages lead to hackage
Thus the resulting directory with HTML is relocatable and publishable.
**TL;DR**: it just works. See the [haskell-suite][] documentation for an example output.
[haskell-suite]: http://haskell-suite.github.io/docs
Usage -----
Usage: standalone-haddock [--package-db DB-PATH] -o OUTPUT-PATH [PACKAGE-PATH]
Available options: -h,--help Show this help text --package-db DB-PATH Additional package database -o OUTPUT-PATH Directory where html files will be placed
`PACKAGE-PATH` is the path to the (unpacked) package — i.e. a directory with a `.cabal` file.
For example:
standalone-haddock -o doc haskell-names haskell-packages haskell-src-exts hse-cpp cabal/Cabal
**NOTE**: dependencies of every package need to be already installed in the system with documentation (even those dependencies that themselves belong to the current package set). If they are installed in a non-standard package database (e.g. if you use sandboxes), use the `--package-db` option.
Cabal dependency ----------------
The program only builds with (unreleased) Cabal 1.17 which you can get from [github](https://github.com/haskell/cabal).
I spent some time trying to make it compatible with Cabal 1.16 (see [Cabal-1.16][] branch), but the API seems to have changed too much.
If you seriously care about this, feel free to send a patch, but it's really easier just to install Cabal HEAD.
[Cabal-1.16]: https://github.com/feuerbach/standalone-haddock/tree/Cabal-1.16
Roman
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Roman Cheplyaka
yes, awesome! I took me a while to figure out I need to add --package-db $HOME/.ghc/x86_64-linux-7.6.3/package.conf.d um, where's --hyperlink-source ? - J.W.

* Johannes Waldmann
Roman Cheplyaka
writes: yes, awesome!
I took me a while to figure out I need to add --package-db $HOME/.ghc/x86_64-linux-7.6.3/package.conf.d
This is strange, it should look there by default.
um, where's --hyperlink-source ?
It's not implemented yet. Patches are welcome :) Roman

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/06/13 13:15, Roman Cheplyaka wrote:
I am happy to announce the first release of standalone-haddock.
http://feuerbach.github.io/standalone-haddock/
standalone-haddock generates standalone haddock Haskell documentation.
When you simply run `cabal haddock`, the resulting HTML documentation contains hyperlinks to other packages on your system. As a result, you cannot publish it on the internet (well, you can, but the links will be broken).
standalone-haddock takes several packages for which you want to publish documentation. It generates documentation for them with proper links:
* links to identifiers inside this package set are relative * links to identifiers from external packages lead to hackage
Thus the resulting directory with HTML is relocatable and publishable.
**TL;DR**: it just works. See the [haskell-suite][] documentation for an example output.
[haskell-suite]: http://haskell-suite.github.io/docs [snip]
I could have really used this about 2 days ago. Oh well. Do you have any idea about how well this will work on all of the GHC source? That is, are there any known issues that would prevent it from working or require a special setup? - -- Mateusz K. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQIcBAEBAgAGBQJRs0rmAAoJEM1mucMq2pqXFXwP/3y5IPR/6DElHRCKSWkXV5k+ 7LaABSTJOVaEWzyI9NqhB47GDMLe8V3GD83/xaKoeVdTobgoYG1PpMWudOA9k05n BO829mMxqNWS+2s+tgwgEXr0UXerKwCcQDnSvFEFiyhyQo5eaZnDnbjupTJs3ES+ DqdEaQxgf2BSCnzHEtsMH9vqhnduMIRjclMcVHtcKn2PZ4ivGn9Igm6KLc6Cq8U/ lay/geO3rIoFNmlF5RzzDXMT4k2pIeABu/xKTkcdc+zxtQK/G5TD5kYJXM7LhyrK A8sAHtBISUu00p9MCX08iuFs6cUwW1L8djPpU4dT8kAPRW95BsQVILS28ChOTakv kZzCRY1UP+GtQ9uAE/xBHPv7EACpzeXeZTAwj2KC/xRkW9zQ5J8IqpQ8m8BsHwhr uqQoHZR/RytEAEOoHdeR9sOczjawuKEiIfCahuHeClF4qOHWAui2eiFQ58rckF28 kyPd2gfj2w67j1JR2voG4sk3nvcYvdHcAL7no0ZSxjSRJj26SmKB96+Y7jSiJ+d/ Do90mGUaJYTLcgW13shkJ6ZHvco2P9Yq56GR1g9Pd3nbQ5JRUwarUX/bjmeM48u6 skP7+GWgB5XQUeZ3gQ39M5o5NGw7FgySSdMUVvNhisdmQqn1yYzCerFUhwO3uxL4 gBhOR7JWYb9dCaz4V4py =joYv -----END PGP SIGNATURE-----

* Mateusz Kowalczyk
On 07/06/13 13:15, Roman Cheplyaka wrote:
I am happy to announce the first release of standalone-haddock.
http://feuerbach.github.io/standalone-haddock/
standalone-haddock generates standalone haddock Haskell documentation.
When you simply run `cabal haddock`, the resulting HTML documentation contains hyperlinks to other packages on your system. As a result, you cannot publish it on the internet (well, you can, but the links will be broken).
standalone-haddock takes several packages for which you want to publish documentation. It generates documentation for them with proper links:
* links to identifiers inside this package set are relative * links to identifiers from external packages lead to hackage
Thus the resulting directory with HTML is relocatable and publishable.
**TL;DR**: it just works. See the [haskell-suite][] documentation for an example output.
[haskell-suite]: http://haskell-suite.github.io/docs [snip]
I could have really used this about 2 days ago. Oh well.
Do you have any idea about how well this will work on all of the GHC source? That is, are there any known issues that would prevent it from working or require a special setup?
I imagine it would not be trivial, due to GHC's complicated build system. There's also a known issue that preprocessing doesn't happen (e.g. for alex and happy files) — I hope to fix that soon. Roman

* Roman Cheplyaka
There's also a known issue that preprocessing doesn't happen (e.g. for alex and happy files) — I hope to fix that soon.
I've just released standalone-haddock-1.1 which fixes the above issue and also adds --hyperlink-source (the latter was kindly contributed by Joey Adams). For some reason my uploads don't finish and the hackage index doesn't get updated. You can still download the source tarball from hackage or github. Roman
participants (6)
-
Daniel Díaz Casanueva
-
Jeremy Shaw
-
Johannes Waldmann
-
Mateusz Kowalczyk
-
Niklas Hambüchen
-
Roman Cheplyaka