Recent

Author Topic: Downloadable LCL documention in html format?  (Read 3643 times)

Hans302

  • Newbie
  • Posts: 6
Downloadable LCL documention in html format?
« on: December 29, 2017, 10:16:53 am »
Hello all,

Is there a possibility to download the LCL docu in html format?

I'm aware of 'doc-chm-fpc3.0.2-laz1.8.zip' [1] in chm format and the online-LCL-reference [2]. For now I wget'ed [3] the latter but if feels quite quirky...

Thanks,
Hans-Peter


[1]: https://sourceforge.net/projects/lazarus/files/Lazarus%20Documentation/Lazarus%201.8.0/
[2]: http://lazarus-ccr.sourceforge.net/docs/lcl/index.html
[3]: wget  --recursive  --no-clobber  --page-requisites  --html-extension \
    --convert-links --restrict-file-names=windows  --domains \
    lazarus-ccr.sourceforge.net  --no-parent \
    http://lazarus-ccr.sourceforge.net/docs/lcl/index.html

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Downloadable LCL documention in html format?
« Reply #1 on: December 29, 2017, 10:34:42 am »
You can compile the program chmls which is in (fpc)/packages/chm/src and then use it to extract all files from the chm file:

chmls extractall lcl.chm <output-directory>

Hans302

  • Newbie
  • Posts: 6
Re: Downloadable LCL documention in html format?
« Reply #2 on: December 29, 2017, 10:52:49 am »
Thanks a lot for the super fast reply!

I forgot to mention that - at least for now - I'm inquiring for a ready-made solution, i.e. download finished html files.

The 'compile way' is a bit too steep: subversion, latex, xml, code/text-mixture, compile... when I'm all git, markdown or similar nowadays :-(  (or :-) depending on your pov). It would likely take me a very long time. And iirc from a FPC mention I couldn't compile/process the docu on a Mac (which is preferred as I'm looking into a dash docset).

At least it seems that I have a workaround with the wget'ed files.

Hans302

  • Newbie
  • Posts: 6
Re: Downloadable LCL documention in html format?
« Reply #3 on: December 29, 2017, 10:58:02 am »
Uups, sorry, I think I misunderstood. You were talking about the (finished/ready-made) chm files. I'll try this.

Hans302

  • Newbie
  • Posts: 6
Re: Downloadable LCL documention in html format?
« Reply #4 on: December 29, 2017, 11:40:40 am »
chmls extractall lcl.chm <output-directory>
Yes, this worked well. The 'chmls' program was already compiled and on the path.

(Comparing with the wget'ed files showed that it is mostly the same. There are more files coming out of chm (e.g. cm_activate.html). On the other hand I saw some 'ms-its' links/schemes which probably need patching.)

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Downloadable LCL documention in html format?
« Reply #5 on: December 29, 2017, 11:54:41 am »
I think you can delete $WW*, #*, Default.hhc, Default.hhk.

In which files did you find the ms-its links? They are related to chm and probably not needed for html alone.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Downloadable LCL documention in html format?
« Reply #6 on: December 29, 2017, 12:49:53 pm »
The hhc and hhk are toc and index.  They can be useful as input if you generate something similar in whatever you want.

Hans302

  • Newbie
  • Posts: 6
Re: Downloadable LCL documention in html format?
« Reply #7 on: December 29, 2017, 05:14:14 pm »
In which files did you find the ms-its links? They are related to chm and probably not needed for html alone.
Not sure about chm related, seems to be system, classes links. Here some numbers:

    $ find lcl-from_chms/_build/ -type f | wc -l                    # -->  20225
    $ ack -l "ms-its" lcl-from_chms/_build/ | wc -l               # -->     7749
    $ ack -l "ms-its:rtl.chm" lcl-from_chms/_build/ | wc -l    # -->     7651
    $ ack -l "ms-its:rtl.chm::/system" lcl-from_chms/_build/ | wc -l #5607
    $ ack -l "ms-its:rtl.chm::/classes" lcl-from_chms/_build/ | wc -l #4169

Here an example from '$ vi lcl-from_chms/_build/forms/tcontrolscrollbar.clientsize.html':

<td><p><tt><span class="code"> <span class="kw">public</span> <span class="kw">function</span> <a href="../forms/tcontrolscrollbar.html">TControlScrollBar</a><span class="sym">.</span>ClientSize<span class="sym">: </span><a href="ms-its:rtl.chm::/system/integer.html">Integer</a><span class="sym">;</span></span></tt></p></td>

I'll go with the converted chm files. Just for the record, below the difference between the chm-converted and wget'ed. I cannot exclude that there was a problem with wget (albeit it looked reasonable and the missing files/folders might be newer and not yet available on the sourceforge online help?). Numbers:

    $ find lcl-from_chms/_build/ -type f | wc -l  # -->  20225
    $ find lcl-wget/ -type f | wc -l                      # --> 17635

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Downloadable LCL documention in html format?
« Reply #8 on: December 29, 2017, 07:14:59 pm »
Strange. Here, the ms-its anchor has been dropped, same file, same location. Is this because I am on Windows?

Hans302, when you navigate to this file and open it in the browser, is the ms-its link harmful if you click on it?
« Last Edit: December 29, 2017, 08:19:32 pm by wp »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Downloadable LCL documention in html format?
« Reply #9 on: December 29, 2017, 07:26:11 pm »
Note that the 3.0.4 chms seem corrupt. At least according to Mattias, I haven't had time to dig deeper.

ms-its is normal for CHM interlinking.

Hans302

  • Newbie
  • Posts: 6
Re: Downloadable LCL documention in html format?
« Reply #10 on: December 29, 2017, 09:40:31 pm »
> Hans302, when you navigate to this file and open it in the browser, is the ms-its link harmful if you click on it?

yes if I click on 'integer', firefox tries to resolve 'ms-its:rtl.chm::/system/integer.html' and this fails (of course). Strange, that it works on Windows but not here (OSX, Yosemite)). - Hope that I don't have an old chmls version or something. But I installed Laz 1.8 from scratch and the chmls date says 26 Nov.

With the 'lcl-wget' version it works, a click to 'integer' leads to the online help on sourceforge (http://lazarus-ccr.sourceforge.net/docs/rtl/system/integer.html)

(But I'll start with FPC documentation anyway (and patching would be easy), no hurry...)

 

TinyPortal © 2005-2018