Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-01

wikiconvert to fpdoc format using outdated structure for xml generation

15 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andreas Frieß

i have try to makes chm from information in the wiki. wikiget gets the information out of the wiki and wikiconvert should convert it to the right format for fpdoc.

In the manuals fpdoc uses a format (chapter 5.1) like

<?xml version="1.0" encoding="ISO-8859-1"?>
<fpdoc-description>
<package name="fpc">
<module name="Classes">
</module>
</package>
</fpdoc-description>

wikiconvert use the format (documentet in Wiki2FPDocConvert)

<fpdoc>
<package="wiki"/>
<module name='wiki_page_name'>
<!-- header 1-->
<short>Page title</short>
<description> text under page header</description> <!-- header 2-->
<topic name="wiki_page_name_title_1">
<short>Title header 1</short>
<description> text under header1</description>
<!-- header 3-->
<topic name="wiki_page_name_subtitle_1">
<short>Title header subtitle</short>
<descr>text</descr>
</topic>
</topic>
</module>
</package>
</fpdoc>

So my question is, should this in the wikiconvert (eg. Wiki2FPDocConvert) changed ? (Or a better idea)

Andreas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150126/6ed3d9b4/attachment-0001.html>

Reply by email

Michael Van Canneyt
to Andreas Frieß
Andreas Frie? wrote 36 lines
i have try to makes chm from information in the wiki. wikiget gets the information out of the wiki and wikiconvert should convert it to the right format for fpdoc. In the manuals fpdoc uses a format (chapter 5.1) like <?xml?version="1.0"?encoding="ISO-8859-1"?> ? <fpdoc-description> ? <package?name="fpc"> ? <module?name="Classes"> ? </module> ? </package> ? </fpdoc-description> wikiconvert use the format (documentet in Wiki2FPDocConvert) <fpdoc> ? <package="wiki"/> ??? <module name='wiki_page_name'> ????? <!-- header 1--> ????? <short>Page title</short> ????? <description> text under page header</description> ????? <!-- header 2--> ????? <topic name="wiki_page_name_title_1"> ??????? <short>Title header 1</short> ??????? <description> text under header1</description> ??????? <!-- header 3--> ??????? <topic name="wiki_page_name_subtitle_1"> ????????? <short>Title header subtitle</short> ????????? <descr>text</descr> ??????? </topic> ????? </topic> ??? </module> ? </package> </fpdoc> So my question is, should this in the wikiconvert (eg. Wiki2FPDocConvert) changed ? (Or a better idea)

If you want fpdoc to process it: yes.

I don't understand why Wiki2FPDocConvert doesn't do it right in the first place. The fpdoc format has been the same since day 1.

Michael.

Reply by email

Andreas Frieß
to Michael Van Canneyt
Show quoted text 8 lines
If you want fpdoc to process it: yes. I don't understand why Wiki2FPDocConvert doesn't do it right in the first place. The fpdoc format has been the same since day 1. Michael.

I dont know why, so i want to ask here first. The converter was build by Mattias in 2012. This is the reason for my question, before i change something and send patches to Mantis :-)

Reply by email

Mattias Gaertner
to Michael Van Canneyt: If you want fpdoc to process it: yes. I don't understand why Wiki2FPDocConvert doesn't do…
Show quoted text 5 lines
On Mon, 26 Jan 2015, Andreas Frie? wrote: > i have try to makes chm from information in the wiki. wikiget gets the information out of the wiki and wikiconvert should convert it to the right format for fpdoc.

A chm is basically a bunch of html files zipped. Therefore it is better to create the chm from the html, not from wiki to fpdoc to html to chm.
wikiconvert can create the chm directly.

BTW, have you seen wikisearchdemo?
It demonstrates how to load the whole wiki in less than a second (depending on your disk speed) and search it in milliseconds. Maybe this could be extended as an IDE plugin to browse the offline wiki.

Show quoted text 6 lines
[...] > <fpdoc-description> ? [...] > wikiconvert use the format (documentet in Wiki2FPDocConvert) > > <fpdoc>

Ah. I fixed it to <fpdoc-description>.

> ? <package="wiki"/>

Strange. I get <package name="wiki"./>

[...] I don't understand why Wiki2FPDocConvert doesn't do it right in the first place. The fpdoc format has been the same since day 1.

I asked you 18th Feb 2012 what could be wrong with the xml. Apparently we both didn't see the missing "-description". ;)

But it will not work, because fpdoc currently only shows descriptions of units, it does not show topics without units. This would require an extension to fpdoc. For example Michael suggested:

--emit-all-modules="Wiki Topic"
or simply
--emit-all-modules=Topic

Mattias

Reply by email

Marco van de Voort
to Mattias Gaertner
Mattias Gaertner wrote 5 lines
> > i have try to makes chm from information in the wiki. wikiget gets the information out of the wiki and wikiconvert should convert it to the right format for fpdoc. A chm is basically a bunch of html files zipped. Therefore it is better to create the chm from the html, not from wiki to fpdoc to html to chm.

It is an indexed and crossreferenced archive of html.

So if you want the chm to reference other CHMs, going the fpdoc route is way better.

Show quoted text 11 lines
>[...] > I don't understand why Wiki2FPDocConvert doesn't do it right in the first place. > The fpdoc format has been the same since day 1. I asked you 18th Feb 2012 what could be wrong with the xml. Apparently we both didn't see the missing "-description". ;) But it will not work, because fpdoc currently only shows descriptions of units, it does not show topics without units. This would require an extension to fpdoc. For example Michael suggested:

I already asked and tested, it does show topics attached to a package, and they are allowed to be in separate XMLs.

Reply by email

Mattias Gaertner
to Marco van de Voort
Show quoted text 26 lines
On Mon, Jan 26, 2015 at 07:33:44PM +0100, Mattias Gaertner wrote: > > > i have try to makes chm from information in the wiki. wikiget gets the information out of the wiki and wikiconvert should convert it to the right format for fpdoc. > > A chm is basically a bunch of html files zipped. Therefore it is > better to create the chm from the html, not from wiki to fpdoc to html > to chm. It is an indexed and crossreferenced archive of html. So if you want the chm to reference other CHMs, going the fpdoc route is way better. > > >[...] > > I don't understand why Wiki2FPDocConvert doesn't do it right in the first place. > > The fpdoc format has been the same since day 1. > > I asked you 18th Feb 2012 what could be wrong with the xml. Apparently > we both didn't see the missing "-description". ;) > > But it will not work, because fpdoc currently only shows descriptions of > units, it does not show topics without units. This would require an > extension to fpdoc. For example Michael suggested: I already asked and tested, it does show topics attached to a package, and they are allowed to be in separate XMLs.

How? Do I need fpdoc from trunk for this?

Mattias

Reply by email

Marco van de Voort
to Mattias Gaertner
Mattias Gaertner wrote
> I already asked and tested, it does show topics attached to a package, and > they are allowed to be in separate XMLs. How? Do I need fpdoc from trunk for this?

I haven't tested with anything else but my test project file is

<?xml version="1.0" encoding="utf-8"?>
<docproject>
<options>
<option name="ostarget" value="Linux"/>
<option name="cputarget" value="x86_64"/>
<option name="show-private" value="false"/>
<option name="stop-on-parser-error" value="false"/> <option name="format" value="chm"/>
<option name="auto-index" value="1"/>
<option name="auto-toc" value="1"/>
<option name="make-searchable" value="1"/>
<option name="css-file" value="fpdoc.css"/>
<option name="chm-title" value="Lazarus IDE Help"/> </options>
<packages>
<package name="lazaruside" output="lazaruside.chm" content="lazaruside.xct">
<units>
</units>
<descriptions>
<description file="idewindow2.xml"/>
<description file="IDE_Windowfg.xml"/>
</descriptions>
</package>
</packages>
</docproject>

idewindow2.xml:

<?xml version="1.0" encoding="UTF-8"?>
<fpdoc-descriptions>
<package name="lazaruside">
<topic name="package topic">
<short>Test topic for blablabla reasons</short>
<descr> This is the body text for test topic.</descr> <topic name="nested topic test">
<short>Title for nested topic</short>
<descr> Nested topic body</descr>
</topic>
</topic>
</package>
</fpdoc-descriptions>

compile with fpdoc --project=ide.xml

Thanks to af0815,Socke and Michael.

Reply by email

Michael Schnell
to Mattias Gaertner: On Mon, 26 Jan 2015 18:36:55 +0100 (CET) A chm is basically a bunch of html files zipped.…
Mattias Gaertner wrote 11 lines
A chm is basically a bunch of html files zipped. Therefore it is better to create the chm from the html, not from wiki to fpdoc to html to chm. wikiconvert can create the chm directly. BTW, have you seen wikisearchdemo? It demonstrates how to load the whole wiki in less than a second (depending on your disk speed) and search it in milliseconds. Maybe this could be extended as an IDE plugin to browse the offline wiki.

This combined IMHO suggests a possible Lazarus Help-Viewer plugin displaying such "local wiki" files.

Maybe vice-versa the chm files (and hence all existing help information) can rather easily be converted into Wiki format.

So maybe a smooth conversion to a common - and easily updateable (by volunteers) and manageable (by the team) - base format for all help information (whichever this format is) might be possible.

-Michael

Reply by email

Michael Van Canneyt
to Mattias Gaertner: On Mon, 26 Jan 2015 18:36:55 +0100 (CET) A chm is basically a bunch of html files zipped.…
Mattias Gaertner wrote 9 lines
Strange. I get <package name="wiki"./> > [...] > I don't understand why Wiki2FPDocConvert doesn't do it right in the first place. > The fpdoc format has been the same since day 1. I asked you 18th Feb 2012 what could be wrong with the xml. Apparently we both didn't see the missing "-description". ;)

Indeed.

Demonstrating once more what my wife claims since ages: men look, but don't see :(

Show quoted text 8 lines
But it will not work, because fpdoc currently only shows descriptions of units, it does not show topics without units. This would require an extension to fpdoc. For example Michael suggested: --emit-all-modules="Wiki Topic" or simply --emit-all-modules=Topic

Indeed. That would be a simple extension.

Michael.

Reply by email

Marco van de Voort
to Michael Van Canneyt
Michael Van Canneyt wrote 7 lines
> I asked you 18th Feb 2012 what could be wrong with the xml. Apparently > we both didn't see the missing "-description". ;) Indeed. Demonstrating once more what my wife claims since ages: men look, but don't see :(

Well, both of you do that one time again since it seems to be -descriptionS :)

Reply by email

Andreas Frieß
to Marco van de Voort

beside the discussion of singular or plural of fpdoc-descriptionS :-)

the wikconvert can't handle the minus (Mantis 0027362). In wiki2fpdocconvert.pas around line 283 the function IsValidId is used. This Routine from sysstr.inc 'System Utilities For Free Pascal' doesnt accept a minus as a valid char.

Reply by email

Andreas Frieß
to Mattias Gaertner: On Mon, 26 Jan 2015 18:36:55 +0100 (CET) A chm is basically a bunch of html files zipped.…
Mattias Gaertner wrote 5 lines
wikiconvert can create the chm directly. BTW, have you seen wikisearchdemo? It demonstrates how to load the whole wiki in less than a second (depending on your disk speed) and search it in milliseconds. Maybe this could be extended as an IDE plugin to browse the offline wiki.

I have try to compile the wikisearchdemo, but it was not successfully.

Kompiliere Package MultiThreadProcsLaz 1.2.1: Erfolg Kompiliere Package LazWiki 1.0.1: Erfolg
Projekt kompilieren, Ziel: wikisearchdemo.exe: Exit code 1, Fehler: 2 wikihelpmanager.pas(1245,16) Error: No member is provided to access property wikihelpmanager.pas(1296,18) Error: No member is provided to access property

I have Lazarus 1.5 r47546M FPC 2.7.1 i386-win32-win32/win64

Reply by email

Mattias Gaertner
to Andreas Frieß
Show quoted text 16 lines
Am 26.01.2015 um 19:33 schrieb Mattias Gaertner: > wikiconvert can create the chm directly. BTW, have you seen > wikisearchdemo? It demonstrates how to load the whole wiki in less > than a second (depending on your disk speed) and search it in > milliseconds. Maybe this could be extended as an IDE plugin to browse > the offline wiki. I have try to compile the wikisearchdemo, but it was not successfully. Kompiliere Package MultiThreadProcsLaz 1.2.1: Erfolg Kompiliere Package LazWiki 1.0.1: Erfolg Projekt kompilieren, Ziel: wikisearchdemo.exe: Exit code 1, Fehler: 2 wikihelpmanager.pas(1245,16) Error: No member is provided to access property wikihelpmanager.pas(1296,18) Error: No member is provided to access property I have Lazarus 1.5 r47546M FPC 2.7.1 i386-win32-win32/win64

It seems your 2.7.1 is very old.
Please update.

Mattias

Reply by email

Andreas Frieß
to Mattias Gaertner
Mattias Gaertner wrote 11 lines
I have try to compile the wikisearchdemo, but it was not successfully. Kompiliere Package MultiThreadProcsLaz 1.2.1: Erfolg Kompiliere Package LazWiki 1.0.1: Erfolg Projekt kompilieren, Ziel: wikisearchdemo.exe: Exit code 1, Fehler: 2 wikihelpmanager.pas(1245,16) Error: No member is provided to access property wikihelpmanager.pas(1296,18) Error: No member is provided to access property I have Lazarus 1.5 r47546M FPC 2.7.1 i386-win32-win32/win64 It seems your 2.7.1 is very old. Please update.

it is not possible yet to update to 3.1.1, due some transient issues in fpc (Also seen on the mailing list and mantis)

So i have downgraded to 2.6.4 and it compiles and run. It is more than a 'proof of a concept'.

The programm can deal with the different languages, all information of the wiki is very fast shown (after the first preloading - around 10 sec on my system). Very interesting programm.

Thanks for this programm.

Andreas

Mattias

Reply by email

Marco van de Voort
to Andreas Frieß
Andreas Frie?? wrote 5 lines
> I have Lazarus 1.5 r47546M FPC 2.7.1 i386-win32-win32/win64 > It seems your 2.7.1 is very old. > Please update. it is not possible yet to update to 3.1.1, due some transient issues in fpc (Also seen on the mailing list and mantis)

That patch is only in 3.1.1 (trunk/unstable) not in 3.0.1 (stable).

A 3.0.1 is better than a 2.7.1 atm. (branch branches/fixes_3_0 )

Reply by email