Discussion:
New help doc format?
(too old to reply)
Graeme Geldenhuys
2006-05-09 07:24:33 UTC
Permalink
Has anybody put some thought into creating a cross platform help file
format that Lazarus could use in the IDE and in applications created
with Lazarus?

Just a quick list of ideas. Please add your own ideas or comments.
Once we have a good spec, maybe we can move all the ideas to the wiki
until implemented.

* I single help file, instead of loads of files like html would be
preferred. eg: .chm or .hlp files compared to .html file. Maybe
something like what OpenOffice.org did with their file format would
work. A single zipped file with xml and images inside.

* Maybe use a better compression algorythm like 7zip which is
excellent on text compared to normal zip for a single file compresion.

* In must support Index and keyword search.

* Image maps will be nice as well, using the png file format.

* We would need a help file compiler, that packs everything and
generates updated indexes and keywords.

* A help editor would be needed, except if we can piggy-back on LazDoc
and use that instead. If using LazDoc, it would need to be improved.

* Bookmark feature would be great.


Regards,
- Graeme -
I have been experimenting with the CHM format too at the end of last year. The
problem was the generation of the index.
Vincent.
--
There's no place like 127.0.0.1
Michael Van Canneyt
1970-01-01 00:00:00 UTC
Permalink
Post by Graeme Geldenhuys
Has anybody put some thought into creating a cross platform help file
format that Lazarus could use in the IDE and in applications created
with Lazarus?
Just a quick list of ideas. Please add your own ideas or comments. Once we
have a good spec, maybe we can move all the ideas to the wiki
until implemented.
* I single help file, instead of loads of files like html would be
preferred. eg: .chm or .hlp files compared to .html file. Maybe
something like what OpenOffice.org did with their file format would
work. A single zipped file with xml and images inside.
* Maybe use a better compression algorythm like 7zip which is
excellent on text compared to normal zip for a single file compresion.
* In must support Index and keyword search.
* Image maps will be nice as well, using the png file format.
* We would need a help file compiler, that packs everything and
generates updated indexes and keywords.
* A help editor would be needed, except if we can piggy-back on LazDoc
and use that instead. If using LazDoc, it would need to be improved.
* Bookmark feature would be great.
I'm not very much in favour of creating "yet another format".
Standards exist, we should try to use them as much as possible.

Michael.
Graeme Geldenhuys
2006-05-09 11:47:43 UTC
Permalink
Post by Michael Van Canneyt
I'm not very much in favour of creating "yet another format".
Standards exist, we should try to use them as much as possible.
Linux - has no standard help!
OS X - never used it, so no idea what help format they use.
Windows - Isn't the .hlp and .chm files proprietary? Are we allowed
to copy/implement the .chm format on a platform other than Windows?


What does Qt offer in help formats?


Regards,
- Graeme -
Michael Van Canneyt
1970-01-01 00:00:00 UTC
Permalink
Post by Graeme Geldenhuys
Post by Michael Van Canneyt
I'm not very much in favour of creating "yet another format".
Standards exist, we should try to use them as much as possible.
Linux - has no standard help!
OS X - never used it, so no idea what help format they use.
Windows - Isn't the .hlp and .chm files proprietary? Are we allowed
to copy/implement the .chm format on a platform other than Windows?
Of course. But I meant file formats, not OS formats.

HTML is the most standardized. PDF comes next.

For these formats, components to display them exist.
If you invent your own format, you need to develop
components as well...
Post by Graeme Geldenhuys
What does Qt offer in help formats?
None that I know of, but I haven't studied the matter...

Michael.
Graeme Geldenhuys
2006-05-09 12:20:11 UTC
Permalink
Post by Michael Van Canneyt
Of course. But I meant file formats, not OS formats.
Ahh...
Post by Michael Van Canneyt
HTML is the most standardized. PDF comes next.
For these formats, components to display them exist.
If you invent your own format, you need to develop
components as well...
That's true. I was actually thinking in the lines of using HTML, but
just package it better so it can be released as a single compressed
file and include Search and Index support via the Help Viewer. Not to
mention the fpdoc already exports the XML to HTML which is a big
bonus.

Regards,
- Graeme -
Vincent Snijders
2006-05-09 13:25:07 UTC
Permalink
Post by Graeme Geldenhuys
Post by Michael Van Canneyt
Of course. But I meant file formats, not OS formats.
Ahh...
Post by Michael Van Canneyt
HTML is the most standardized. PDF comes next.
For these formats, components to display them exist.
If you invent your own format, you need to develop
components as well...
That's true. I was actually thinking in the lines of using HTML, but
just package it better so it can be released as a single compressed
file and include Search and Index support via the Help Viewer. Not to
mention the fpdoc already exports the XML to HTML which is a big
bonus.
Andrew Haines worked on a chm viewer written in and for Lazarus. See components\chmhelp.

What is/was missing for viewing the rtl/fcl/lcl help in chm is good content tree.
IMHO it can be generated by fpdoc, but somebody has to write that code.

A drawback of chm, that I don't know about free tools to generate it except the
Microsoft Help Workshop, which is windows only. No problem for me, because windows
is my main platform, but still.

Vincent.
Alexandre Leclerc
2006-05-09 13:43:41 UTC
Permalink
Post by Vincent Snijders
A drawback of chm, that I don't know about free tools to generate it except the
Microsoft Help Workshop, which is windows only. No problem for me, because windows
is my main platform, but still.
I have heard (not tested) that the only actual open source application
that can make CHM files is HelpMaker - Help Authoring Tool which is
coded in Delphi. So it only works under windows (unless ported to
lazarus?)

http://www.vizacc.com/
http://sourceforge.net/projects/helpmaker

The licence is somewhat very much *public* oriented:

http://blog.vizacc.com/archives/indiv_000127.php

If someone check it out to see if the application is actually
compiling the CHM files itself, we could see how it does, etc.

Best regards.

--
Alexandre Leclerc
Alexandre Leclerc
2006-05-09 13:53:17 UTC
Permalink
I'm sorry, I can't find the source code... :(

The only code on sourceforge, well, I don't know if this is the
compiler itself, but it does not look like. Any-way I've no time now
to look at that, but I will because this is interesting me a lot for
our own help file creation.

--
Alexandre Leclerc
A.J. Venter
2006-05-09 13:57:37 UTC
Permalink
Post by Alexandre Leclerc
I'm sorry, I can't find the source code... :(
The only code on sourceforge, well, I don't know if this is the
compiler itself, but it does not look like. Any-way I've no time now
to look at that, but I will because this is interesting me a lot for
our own help file creation.
Did you look at the webcvs link ? It is quite possible the code is only in
CVS.

A.J.
--
"there's nothing as inspirational for a hacker as a cat obscuring a bug
by sitting in front of the monitor" - Boudewijn Rempt
A.J. Venter
Chief Software Architect
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103
Alexandre Leclerc
2006-05-09 14:32:29 UTC
Permalink
Post by A.J. Venter
Post by Alexandre Leclerc
I'm sorry, I can't find the source code... :(
The only code on sourceforge, well, I don't know if this is the
compiler itself, but it does not look like. Any-way I've no time now
to look at that, but I will because this is interesting me a lot for
our own help file creation.
Did you look at the webcvs link ? It is quite possible the code is only in
CVS.
Yep, the cvs tree is almost empty, and all files are 2 years old.

Well, there is a site for open source information on chm files:

http://htmlhelp.berlios.de/formats/chm.php

The HTML Help Maker project at savannah is at early stage and is in c.
But it can create the basic file "shell". If someone really want to
code a compiler engine; it could start with that ar translate to
pascal.

But my personal idea on help files for lazarus would probably be:
- get very well built html files with many links
- build a search tool in lazarus to search the html files in the help
folder. It is more simple and will do the job.

But I must say that having a compiled help file is a very nice idea.

Best regards.

--
Alexandre Leclerc
L505
2006-05-09 16:00:19 UTC
Permalink
Post by Alexandre Leclerc
Post by A.J. Venter
Post by Alexandre Leclerc
I'm sorry, I can't find the source code... :(
The only code on sourceforge, well, I don't know if this is the
compiler itself, but it does not look like. Any-way I've no time now
to look at that, but I will because this is interesting me a lot for
our own help file creation.
Did you look at the webcvs link ? It is quite possible the code is only in
CVS.
Yep, the cvs tree is almost empty, and all files are 2 years old.
http://htmlhelp.berlios.de/formats/chm.php
The HTML Help Maker project at savannah is at early stage and is in c.
But it can create the basic file "shell". If someone really want to
code a compiler engine; it could start with that ar translate to
pascal.
- get very well built html files with many links
- build a search tool in lazarus to search the html files in the help
folder. It is more simple and will do the job.
Good idea - one way to accomplish this and have a fast indexing system
would be to Ditch XML and place the documents in a database. Database
would allow fast searching of the documentation. I know someone has
stated before that they already tried to put the docs into a database
for the FPDOC system and it didn't work out well because XML fits the
document model better .. I think it's still possible, though. Not
impossible, that's for sure. Just the time needed to make the system.

Or, you could search the HTML/XML files.. but it would be slower than
just searching a DB directly.
Alexandre Leclerc
2006-05-09 16:15:34 UTC
Permalink
Post by L505
Post by Alexandre Leclerc
- get very well built html files with many links
- build a search tool in lazarus to search the html files in the help
folder. It is more simple and will do the job.
Good idea - one way to accomplish this and have a fast indexing system
would be to Ditch XML and place the documents in a database. Database
would allow fast searching of the documentation. I know someone has
stated before that they already tried to put the docs into a database
for the FPDOC system and it didn't work out well because XML fits the
document model better .. I think it's still possible, though. Not
impossible, that's for sure. Just the time needed to make the system.
Or, you could search the HTML/XML files.. but it would be slower than
just searching a DB directly.
Yep, using a simple stand-alone DB which needs no setup and is
cross-plateform. I've seen a TDataSet descendent
stand-alone-single-file-db once in delphi. I think the little thing
was TBinDataset (only url I found:
http://kylecordes.com/bag/sol/tbinary.html) I cant' find the code
anymore, but I have it at home I believe, if anyone is interested.

The DB could be generated at first start of the help, which is a
common behaviour with hlp files. We could have a nice algo to generate
the index...

--
Alexandre Leclerc
Bogusław Brandys
2006-05-09 17:31:33 UTC
Permalink
Post by Alexandre Leclerc
Post by L505
Post by Alexandre Leclerc
- get very well built html files with many links
- build a search tool in lazarus to search the html files in the help
folder. It is more simple and will do the job.
Good idea - one way to accomplish this and have a fast indexing system
would be to Ditch XML and place the documents in a database. Database
would allow fast searching of the documentation. I know someone has
stated before that they already tried to put the docs into a database
for the FPDOC system and it didn't work out well because XML fits the
document model better .. I think it's still possible, though. Not
impossible, that's for sure. Just the time needed to make the system.
Or, you could search the HTML/XML files.. but it would be slower than
just searching a DB directly.
Yep, using a simple stand-alone DB which needs no setup and is
cross-plateform. I've seen a TDataSet descendent
stand-alone-single-file-db once in delphi. I think the little thing
http://kylecordes.com/bag/sol/tbinary.html) I cant' find the code
anymore, but I have it at home I believe, if anyone is interested.
The DB could be generated at first start of the help, which is a
common behaviour with hlp files. We could have a nice algo to generate
the index...
--
Alexandre Leclerc
sqlite is good candidate too (multiplatform,single file,fast, only one
dll/so required)


Boguslaw Brandys
Michael Van Canneyt
1970-01-01 00:00:00 UTC
Permalink
Post by Bogusław Brandys
Post by Alexandre Leclerc
Post by L505
Post by Alexandre Leclerc
- get very well built html files with many links
- build a search tool in lazarus to search the html files in the help
folder. It is more simple and will do the job.
Good idea - one way to accomplish this and have a fast indexing system
would be to Ditch XML and place the documents in a database. Database
would allow fast searching of the documentation. I know someone has
stated before that they already tried to put the docs into a database
for the FPDOC system and it didn't work out well because XML fits the
document model better .. I think it's still possible, though. Not
impossible, that's for sure. Just the time needed to make the system.
Or, you could search the HTML/XML files.. but it would be slower than
just searching a DB directly.
Yep, using a simple stand-alone DB which needs no setup and is
cross-plateform. I've seen a TDataSet descendent
stand-alone-single-file-db once in delphi. I think the little thing
http://kylecordes.com/bag/sol/tbinary.html) I cant' find the code
anymore, but I have it at home I believe, if anyone is interested.
The DB could be generated at first start of the help, which is a
common behaviour with hlp files. We could have a nice algo to generate
the index...
--
Alexandre Leclerc
sqlite is good candidate too (multiplatform,single file,fast, only one
dll/so required)
Sorry, but no:
- No external dependencies, please.
- Specifically: sqlite is a horrible database for use in Pascal.
And very slow for complex queries, in general.

Michael.
L505
2006-05-10 00:02:18 UTC
Permalink
Post by Bogusław Brandys
sqlite is good candidate too (multiplatform,single file,fast, only one
dll/so required)
Post by Michael Van Canneyt
- No external dependencies, please.
- Specifically: sqlite is a horrible database for use in Pascal.
And very slow for complex queries, in general.
What database is good for Pascal? And since it is not going to be external - what embedded
database is good for Pascal which ships inside the exe/elf?
Do any even exist?

IOW - what did you have in mind?
Felipe Monteiro de Carvalho
2006-05-10 00:33:15 UTC
Permalink
Post by L505
Do any even exist?
There is at least TDBf component for DBase and some memory database
components, but neither is suitable for a help system.

thanks,
--
Felipe Monteiro de Carvalho
L505
2006-05-10 00:59:16 UTC
Permalink
Post by Felipe Monteiro de Carvalho
Post by L505
Do any even exist?
There is at least TDBf component for DBase and some memory database
components, but neither is suitable for a help system.
Really.. and why? Too square?
Felipe Monteiro de Carvalho
2006-05-10 01:00:21 UTC
Permalink
Post by L505
Post by Felipe Monteiro de Carvalho
There is at least TDBf component for DBase and some memory database
components, but neither is suitable for a help system.
Really.. and why? Too square?
DBase creates too many files.

--
Felipe Monteiro de Carvalho
L505
2006-05-10 03:02:31 UTC
Permalink
Post by Felipe Monteiro de Carvalho
Post by L505
Post by Felipe Monteiro de Carvalho
There is at least TDBf component for DBase and some memory database
components, but neither is suitable for a help system.
Really.. and why? Too square?
DBase creates too many files.
How many for say a 100MB database or so ? 100's? Are they big files that take up lots of
space?
Felipe Monteiro de Carvalho
2006-05-10 03:11:29 UTC
Permalink
Post by L505
How many for say a 100MB database or so ? 100's? Are they big files that take up lots of
space?
No, they are small, but they are many.

1 per table
1 per index

and some other extras

--
Felipe Monteiro de Carvalho
Micha Nelissen
2006-05-10 05:41:59 UTC
Permalink
Post by Felipe Monteiro de Carvalho
Post by L505
How many for say a 100MB database or so ? 100's? Are they big files that take up lots of
space?
No, they are small, but they are many.
1 per table
1 per index
No actually, the indexes are combined into one file:
- .dbf: main file
- .mdx: indexes
- .dbt: memo file (unlimited length strings)

Micha
Graeme Geldenhuys
2006-05-10 07:22:11 UTC
Permalink
Post by Michael Van Canneyt
Post by Bogusław Brandys
sqlite is good candidate too (multiplatform,single file,fast, only one
dll/so required)
- No external dependencies, please.
I agree on this. It must be a self standing format without any
3rdParty requirements.

Regards,
- Graeme -


--
There's no place like 127.0.0.1
Bogusław Brandys
2006-05-10 08:31:48 UTC
Permalink
Post by Graeme Geldenhuys
Post by Michael Van Canneyt
Post by Bogusław Brandys
sqlite is good candidate too (multiplatform,single file,fast, only one
dll/so required)
- No external dependencies, please.
I agree on this. It must be a self standing format without any
3rdParty requirements.
Regards,
- Graeme -
I still think that sqlite is the best.The only problem is external
library, but I suspect that it can be compiled into static library and
linked directly to pascal program instead of using external DLL/SO.
Second problem could be Tsqlite3dataset , but we are not forced to use
it,and there are simpler but more stable pascal classes for sqlite3.

Advantages:
- single file
- almost full SQL 99
- indexes
- useful functions like "glob" ( I have used it to create limited
full-text search over 70 MB database and it really flow)
- XML could be stored are text or blob with keywords table linked to it
for full text search and topics index


Just my (modest) two cents.


Regards
Boguslaw Brandys
Michael Van Canneyt
1970-01-01 00:00:00 UTC
Permalink
Post by Graeme Geldenhuys
Post by Michael Van Canneyt
Post by Bogusław Brandys
sqlite is good candidate too (multiplatform,single file,fast, only one
dll/so required)
- No external dependencies, please.
I agree on this. It must be a self standing format without any
3rdParty requirements.
Regards,
- Graeme -
I still think that sqlite is the best.The only problem is external library,
but I suspect that it can be compiled into static library and linked directly
to pascal program instead of using external DLL/SO.
The point is not static or not. The point it that it's third party.
And that is out.

Michael.
L505
2006-05-10 15:31:49 UTC
Permalink
Post by Bogusław Brandys
Post by Graeme Geldenhuys
Post by Michael Van Canneyt
Post by Bogusław Brandys
sqlite is good candidate too (multiplatform,single file,fast, only one
dll/so required)
- No external dependencies, please.
I agree on this. It must be a self standing format without any
3rdParty requirements.
I still think that sqlite is the best.The only problem is external
library, but I suspect that it can be compiled into static library and
linked directly to pascal program instead of using external DLL/SO.
Second problem could be Tsqlite3dataset , but we are not forced to use
it,and there are simpler but more stable pascal classes for sqlite3.
- single file
- almost full SQL 99
- indexes
- useful functions like "glob" ( I have used it to create limited
full-text search over 70 MB database and it really flow)
- XML could be stored are text or blob with keywords table linked to it
for full text search and topics index
Just my (modest) two cents.
I don't see the big deal with external dependencies because almost all programs have one
or more external dependencies: a system DLL/DSO, a config file, etc. Even CHM format
creates multiple files and depends on them.

As for the sqlite dll/dso being linked into exe - I don't think you can do that unless you
have the object file - you can link in GCC object files into Pascal programs. But if
SQLite is compiled with MS VC on windows the object files are not compatible.. not sure
what it is compiled with.

As for speed of SQLite - don't think it is an issue since on their website they show that
in many cases SQLite is faster than even MySQL (but slower in other cases). This is a
documentation tool for ONE user to be searching on his hard drive. The speed won't affect
the end user a significant amount since it is only one single user doing queries on the
database. If it is the website database we are talking about which powers the doc system -
then maybe a more powerful database is needed.. but even then, I wonder what database you
are going to use which is not externally dependent - other than TDBF. And in my opinion,
the end user could care less how many files are generated for the documentation database -
they care that the documentation works and that it works better than our current
non-indexed system - XML and HTML files!
Remember - HTML files ARE an external dependency themselves. And they work just fine for
browsing around. I would NOT want all my HTML files compiled into one file because I want
to look into each html file and see how it is designed - plus single files are more prone
to corruption than multiple files.
Felipe Monteiro de Carvalho
2006-05-10 17:46:59 UTC
Permalink
Post by L505
I don't see the big deal with external dependencies because almost all programs have one
or more external dependencies: a system DLL/DSO, a config file, etc.
I have. Lazarus works for Windows CE, does sqlite work on it?
Post by L505
Remember - HTML files ARE an external dependency themselves.
This isn´t the point. They are a dependency, but they aren´t third
party. We don´t want to depend on another project. That´s the point.

thanks,
--
Felipe Monteiro de Carvalho
L505
2006-05-10 19:14:57 UTC
Permalink
Post by L505
I don't see the big deal with external dependencies because almost all programs have one
or more external dependencies: a system DLL/DSO, a config file, etc.
Post by Felipe Monteiro de Carvalho
I have. Lazarus works for Windows CE, does sqlite work on it?
http://sqlite-wince.sourceforge.net/
But I wouldn't want to read or write documents on Windows CE anyway.

Does Apache Server work on Windows CE? So I shouldn't use Apache for a webserver, just
because it isn't truly "cross-platform"? Sometimes people get carried away with the
whole cross platform advantage - when really there would be no advantage of having
Apache run on Windows CE. I don't know why anyone would write or read documents
on a small Windows CE computer. Maybe if you are on an airplane and you only have
your GameBoy with you - how will you read the Docs?

Since FPC compiles for GameBoy - will you be able to read your HTML documentation on your
GameBoy?

BTW - I'm not advocating SQLite because I've personally never tried it myself yet.
There may be better solutions out there. But I think we may be reinventing the database.
We should at least use some sort of embeddable database, instead of reinventing
another database yet again. A Pascal based one would be nice, even if it is slower
than SQLite or not originally as powerful as SQLite - because I don't think speed is
really an issue when this is only one person querying the help DB on their home PC.
Graeme Geldenhuys
2006-05-11 07:30:21 UTC
Permalink
Post by L505
Does Apache Server work on Windows CE? So I shouldn't use Apache for a webserver, just
because it isn't truly "cross-platform"? Sometimes people get carried away with the
whole cross platform advantage - when really there would be no advantage of having
Dude, you are missing the point completely!!
Post by L505
Apache run on Windows CE. I don't know why anyone would write or read documents
on a small Windows CE computer. Maybe if you are on an airplane and you only have
your GameBoy with you - how will you read the Docs?
Windows CE is just like any other platform!! Windows, Linux or OS X.
Just because it's a small form factor makes no difference. Loads of
people make a living writing software for the PDA market. I have
helped develop a Time Sheet software package for a 2000+ employees
company in the UK, and yes the application needed a help file (as
does any good software application)! Why may the PDA market not have
help files????? It is a software application that should be shipped
with help.

Regards,
- Graeme -
--
There's no place like 127.0.0.1
L505
2006-05-11 18:29:38 UTC
Permalink
Post by Graeme Geldenhuys
Post by L505
Does Apache Server work on Windows CE? So I shouldn't use Apache for a webserver, just
because it isn't truly "cross-platform"? Sometimes people get carried away with the
whole cross platform advantage - when really there would be no advantage of having
Dude, you are missing the point completely!!
Post by L505
Apache run on Windows CE. I don't know why anyone would write or read documents
on a small Windows CE computer. Maybe if you are on an airplane and you only have
your GameBoy with you - how will you read the Docs?
Windows CE is just like any other platform!! Windows, Linux or OS X.
Just because it's a small form factor makes no difference. Loads of
people make a living writing software for the PDA market. I have
helped develop a Time Sheet software package for a 2000+ employees
company in the UK, and yes the application needed a help file (as
does any good software application)! Why may the PDA market not have
help files????? It is a software application that should be shipped
with help.
You are right - I thought we were purely talking about the documentation for the FP
compiler and the Lazarus IDE itself. When I am a developer I usually have a LCD/CRT
monitor and would never ever read freepascal compiler documentation on a Windows CE
computer or Lazarus Documentation. If we are talking about a generic help system for
applications that are generated with Lazarus - then it is a different story. Although,
like I pointed out - SQLite does appear to be available for Windows CE - so my case
doesn't change. But then again, I'm not really advocating SQLite - it would be nice to use
a Pascal based help system.

What I'm mainly trying to point out is that if we are going to be doing indexing and
sorting, are we not reinventing the database - since databases do all these things for us?
Why would we want to index XML files if we can dump the content into the database and have
it indexed for us by the database? In otherwords - does the developer really want to spend
time reinventing an indexing system when someone has already done that for us in the
database? In some cases, we must reinvent a bit in order to have a nice custom solution.
So would everyone please point out the reasons we cannot make use of a database and why we
really need to invent our own help database - if there are plenty of databases out there.

Also - will the custom database solution like CHM (I consider CHM basically a reinvention
of a database - a custom one) be web ready? i.e. can I upload the CHM file to the internet
and create a web program that allows users to search the documents on my website? With a
real database you can upload your help documents to a web server and create a web program
that searches your docs. Then your company will get much more promotion if your help files
are online in addition to you offering an off-line doc system.

So can CHM be searched, indexed, etc. online on the web, too - and not just offline? with
several people querying it at once? I think CHM is mainly designed for one person querying
it.
With a real database I would ship a small embedded database to the user - which one user
can query comfortably. But then use a full fledged firebird/mysql style database on the
web server to serve the docs to hundreds of people. Can CHM some how be uploaded to
the web and have multiple people querying it with reasonable speed? Or must a real
database be used? If a real database must be used - it means that you will then have to
convert that CHM file to a real database anyway - so you now have double the work
instead of just using a database in the first place.

Are there enough advantages of NOT using a database. That's what needs to be
decided.
Thierry Andriamirado
2006-05-12 14:46:22 UTC
Permalink
Post by L505
and create a web program that allows users to search the documents on my website? With a
real database you can upload your help documents to a web server and create a web program
that searches your docs. Then your company will get much more promotion if your help files
are online in addition to you offering an off-line doc system.
Using a 'real' database system for deskop apps can help here, as SQL
commands are used internaly by the help browser. For the online help
need, we can for example use SQL/export/import datas or whatever we want
into MySQL or PostgreSQL...
--
Thierry Andriamirado
http://thierry.andriamirado.free.fr
Graeme Geldenhuys
2006-05-11 07:10:13 UTC
Permalink
Post by L505
browsing around. I would NOT want all my HTML files compiled into one file because I want
to look into each html file and see how it is designed - plus single files are more prone
to corruption than multiple files.
I think you are one of a selected few. CHM is basically compiled html
files into one file. Why would I want to see the code of each help
file I am viewing. All I want in the content.

A single file is great for distribution (smaller and easier to copy)
compared tho say a 1000 html pages with there external images in the
mix.

Also the corruption comment makes no sence. How often does CHM files
get corrupt? It's never happened to me (maybe I am just lucky) Why
would any other single compressed file be any different? That would
be like saying any .zip or .rar or tar.gz file is not a good idea.

Regards,
- Graeme -
--
There's no place like 127.0.0.1
L505
2006-05-11 18:51:13 UTC
Permalink
Post by Graeme Geldenhuys
I think you are one of a selected few. CHM is basically compiled html
files into one file. Why would I want to see the code of each help
file I am viewing. All I want in the content.
A single file is great for distribution (smaller and easier to copy)
compared tho say a 1000 html pages with there external images in the
mix.
Well I like having the HTML available that I can edit in a source file
in case I need to print the documents and the current format is not
good for my printer. Sometimes I change the font size of the documents
so I don't waste as much paper. I don't like having the file hidden in
some CHM file that I can never have access to with my bare hands.
If there is a CHM decompiler that is legal to use and not illegal then
that would be good. Or if you offered HTML and CHM that would
be good - can you extract all the HTML out of CHM legally?
Because one time I tried to decompile a HLP file and it turned out
to be a huge mess.
Post by Graeme Geldenhuys
Also the corruption comment makes no sence. How often does CHM files
get corrupt? It's never happened to me (maybe I am just lucky) Why
would any other single compressed file be any different? That would
be like saying any .zip or .rar or tar.gz file is not a good idea.
Well when I back up my hard drive I do not dare put it into one zip file.
I've had 3GB zip files damaged before. Instead I use several zip files
instead of one big one.

But in the case of a CHM file corruption is not much of an issue since
it probably won't be written to often, and the user can redownload
the CHM file any time he wants.

I've also had several microsoft formats go corrupted on me such as
giant email files that are stored in binary form in one big file. Losing
all your email is not fun. But for CHM format, again, it is not as big
of an issue since you could always download the CHM file again.
Andrew Haines
2006-05-11 21:33:18 UTC
Permalink
Post by L505
Well I like having the HTML available that I can edit in a source file
in case I need to print the documents and the current format is not
good for my printer. Sometimes I change the font size of the documents
so I don't waste as much paper. I don't like having the file hidden in
some CHM file that I can never have access to with my bare hands.
If there is a CHM decompiler that is legal to use and not illegal then
that would be good. Or if you offered HTML and CHM that would
be good - can you extract all the HTML out of CHM legally?
Because one time I tried to decompile a HLP file and it turned out
to be a huge mess.
In your lazarus directory /components/chmhelp/packages/chm/ there is a
unit called chmreader. It is simple to get a list of any of the files in
the chm and extracting them:

var
Reader: TChmReader;
Stream: TMemoryStream;
TmpStream: TMemoryStream;
X: Integer;
AList: StringList;
begin
Stream := TMemoryStream.Create;
Stream.LoadFromFile('myfile.chm');
Reader := TChmReader.Create(Stream, True); // the second param frees
the stream when the reader object is destroyed
AList := TStringList.Create;
Reader.GetCompleteFileList(AList);
for X := 0 to AList.Count-1 do begin
TmpStream := Reader.GetObject(AList.Strings[X]);
// do something with the file
if Assigned(TmpStream) then TmpStream.Free;
end;
end;

That's how easy it is to get all the files out of a chm :)

Andrew Haines
Felipe Monteiro de Carvalho
2006-05-11 22:47:29 UTC
Permalink
Post by Andrew Haines
In your lazarus directory /components/chmhelp/packages/chm/ there is a
unit called chmreader. It is simple to get a list of any of the files in
Some questions:

1 - Does that use any external dll or other dependency?

2 - How hard would it be to create chm files?

There is also the problem of a cross-platform viewer.

thanks,
--
Felipe Monteiro de Carvalho
Andrew Haines
2006-05-12 01:04:14 UTC
Permalink
Post by Felipe Monteiro de Carvalho
Post by Andrew Haines
In your lazarus directory /components/chmhelp/packages/chm/ there is a
unit called chmreader. It is simple to get a list of any of the files in
1 - Does that use any external dll or other dependency?
No
Post by Felipe Monteiro de Carvalho
2 - How hard would it be to create chm files?
As Vincent said somewhere in this thread there currently is only the
option of a free program from microsoft that can create chms. There are
of course other programs as well that can make chms but I am not
familiar with any of them. A Crosslinked HelpFile (chm) is around
somewhere(FCL-RTL-LCL).
Post by Felipe Monteiro de Carvalho
There is also the problem of a cross-platform viewer.
Sigh. :) Have a look in the components/chmhelp directory. In that
directory is a program written entirely in pascal that uses the LCL to
view chm files using the TurboPowerIpro HTML component and a package to
integrate that program in the IDE.


Andrew
Felipe Monteiro de Carvalho
2006-05-12 02:52:04 UTC
Permalink
Post by Andrew Haines
Sigh. :) Have a look in the components/chmhelp directory. In that
directory is a program written entirely in pascal that uses the LCL to
view chm files using the TurboPowerIpro HTML component and a package to
integrate that program in the IDE.
Are you trying to impress me? You did it.
--
Felipe Monteiro de Carvalho
Andrew Haines
2006-05-12 10:15:55 UTC
Permalink
Post by Felipe Monteiro de Carvalho
Post by Andrew Haines
Sigh. :) Have a look in the components/chmhelp directory. In that
directory is a program written entirely in pascal that uses the LCL to
view chm files using the TurboPowerIpro HTML component and a package to
integrate that program in the IDE.
Are you trying to impress me? You did it.
For creating chms a project was started in c on savannah:
http://download.savannah.gnu.org/releases/hhm/
http://savannah.nongnu.org/projects/hhm

It currently can make a chm except it cannot write the special parts
like the TOC and the Index which are mostly html files.

Andrew
George Lober
2006-05-12 03:49:16 UTC
Permalink
Post by Andrew Haines
Post by Felipe Monteiro de Carvalho
Post by Andrew Haines
In your lazarus directory /components/chmhelp/packages/chm/ there is a
unit called chmreader. It is simple to get a list of any of the files in
1 - Does that use any external dll or other dependency?
No
Post by Felipe Monteiro de Carvalho
2 - How hard would it be to create chm files?
As Vincent said somewhere in this thread there currently is only the
option of a free program from microsoft that can create chms. There
are of course other programs as well that can make chms but I am not
familiar with any of them. A Crosslinked HelpFile (chm) is around
somewhere(FCL-RTL-LCL).
Post by Felipe Monteiro de Carvalho
There is also the problem of a cross-platform viewer.
Sigh. :) Have a look in the components/chmhelp directory. In that
directory is a program written entirely in pascal that uses the LCL to
view chm files using the TurboPowerIpro HTML component and a package
to integrate that program in the IDE.
The code in /components/chmhelp looks like it's either GPL or LGPL. For
code that would need to be used in target application, could these be
changed to the Modified LGPL? Also the license headers refer to
COPYING.LCL which I can't find anywhere ??


George
Andrew Haines
2006-05-12 09:24:24 UTC
Permalink
Post by George Lober
The code in /components/chmhelp looks like it's either GPL or LGPL.
For code that would need to be used in target application, could
these be changed to the Modified LGPL? Also the license headers refer
to COPYING.LCL which I can't find anywhere ??
The chm viewer itself is GPL but all of the units it uses (chmbase,
chmreader etc) are under the modified LGPL. In SVN the files say
COPYING.modifiedLGPL now.

There is a package you can use in your programs to control the help
viewer, that package is subject to the modified LGPL so that your
program can be any license

Andrew
George Lober
2006-05-13 01:40:39 UTC
Permalink
Post by Andrew Haines
Post by George Lober
The code in /components/chmhelp looks like it's either GPL or LGPL.
For code that would need to be used in target application, could
these be changed to the Modified LGPL? Also the license headers
refer to COPYING.LCL which I can't find anywhere ??
The chm viewer itself is GPL but all of the units it uses (chmbase,
chmreader etc) are under the modified LGPL. In SVN the files say
COPYING.modifiedLGPL now.
There is a package you can use in your programs to control the help
viewer, that package is subject to the modified LGPL so that your
program can be any license
Looking at it , it looks like it is all dependent on LHelp, which is
GPL. So if I can't compile that into my application or distribute it
under my license, you are left with situation where the end user
somehow has to get LHelp themselves. Are they supposed to install
Lazarus and compile it themselves ?

BTW, LHelp seems to have a few noticeable bugs reading chm files.

George
Andrew Haines
2006-05-13 01:51:47 UTC
Permalink
Post by George Lober
Looking at it , it looks like it is all dependent on LHelp, which is
GPL. So if I can't compile that into my application or distribute it
under my license, you are left with situation where the end user
somehow has to get LHelp themselves. Are they supposed to install
Lazarus and compile it themselves ?
The unit/package to control lhelp (modified LGPL) does not link to lhelp
in any way. It talks to it using the IPC units that come with fpc.
basically sending to lhelp text commands. You may distribute the lhelp
program with your program but that does not make your program subject to
lhelp's license because there is no linking of any sort between them.
Post by George Lober
BTW, LHelp seems to have a few noticeable bugs reading chm files.
Please send me descriptions of the bugs so they can be fixed. :)


Andrew
George Lober
2006-05-13 05:59:14 UTC
Permalink
Post by Andrew Haines
The unit/package to control lhelp (modified LGPL) does not link to
lhelp in any way. It talks to it using the IPC units that come with
fpc. basically sending to lhelp text commands. You may distribute the
lhelp program with your program but that does not make your program
subject to lhelp's license because there is no linking of any sort
between them.
I see. So then if I distribute lhelp with my program, I would then have
to add a 'lhelp' GPL clause to my license ?
Post by Andrew Haines
Post by George Lober
BTW, LHelp seems to have a few noticeable bugs reading chm files.
Please send me descriptions of the bugs so they can be fixed. :)
As per your request, I notice the following with lhelp:

1) With some windows help files, eg: ntcmds.chm or netcfg.chm , Under
Contents tab, Clicking on Topic or Chapter titles does not do anything,
does not show corresponding content in window.

2) With a chm file I created with HelpMaker (which shows OK with
windows help), Under Contents tab, with the exception of the root title,
all Topic and Chapter titles have the same name, which in my case
happens to be 'appendix B' (next to last entry in contents).

3) With some windows help files, eg: windows.chm or msmqconcepts.chm ,
you get a SIGSEGV exception at line 899 in treeview.inc

4) Pictures don't show. All pictures are shown as an empty box with the
'graphic' caption in it.

5) Search does not work. All search functions are disabled.

6) Clicking on internet links doesn't work.


Regards,
George
L505
2006-05-12 18:01:41 UTC
Permalink
Post by Andrew Haines
In your lazarus directory /components/chmhelp/packages/chm/ there is a
unit called chmreader. It is simple to get a list of any of the files in
That's how easy it is to get all the files out of a chm :)
Okay so its easy to get the HTML out of CHM (legally.. not sure), now how do I convert the
CHM file into a web program that runs on my web server and allows people to make queries
at my website to search the html files? This is my case for using a database from day 1,
for both jobs - instead of using CHM for the desktop and some other database for the web
server docs.

BTW Felipe, if you are listening - CHM was not available on Windows CE either - someone
has done some work to get it working on Windows CE though.. just as someone got SQLite
working on Windows CE. My point is that databases are no worse than CHM for the Windows CE
argument.
Felipe Monteiro de Carvalho
2006-05-12 18:19:22 UTC
Permalink
Post by L505
BTW Felipe, if you are listening - CHM was not available on Windows CE either - someone
has done some work to get it working on Windows CE though.. just as someone got SQLite
working on Windows CE. My point is that databases are no worse than CHM for the Windows CE
argument.
Well, but basically it was decided that the help framework will allow
people to implement their own Viewers and DBs, so this discussion
seams to be about the help that Lazarus will use, right?

In that case the core developers already forbit external dependencies,
and I agree with them. Lazarus should use a 100% oop solution. This
also makes the IDE easier to deploy, We don´t want to be forced to
deploy sqlite together with the IDE.

For your own programs, please feel free to write DB and viewer classes
for sqlite =) We can use the Lazarus CCR to host such viewers and help
DB solutions, so people can then choose which one to use.
--
Felipe Monteiro de Carvalho
Luiz Americo
2006-05-11 23:52:11 UTC
Permalink
Post by Michael Van Canneyt
Post by Bogusław Brandys
sqlite is good candidate too (multiplatform,single file,fast, only one
dll/so required)
- No external dependencies, please.
- Specifically: sqlite is a horrible database for use in Pascal.
Based in what you say that?
In fact the TDataset descendant has better performance (see
http://www.geocities.com/camara_luiz/sqlite4fpc/benchmarks.html) than
sqldb (Mysql,Postgresql, firebird). This is so true that recently the
sqldb internal data handling schema was changed borrowing some ideas
from TCustomSqliteDataset. Of course, you are invited to try to
replicate the benchmarks and/or post new benchmarks (with the sources)
you did.

It also has some extra features like Master/Detail, Lookup,Locate,
LocateNext, Auto Increment.

Any way you can use sqlite using the plain interface (sqlite, sqlite3
units) that directly call the sqlite dll. Exactly how a C program does.
So the problem is not the pascal language or implementation.
Post by Michael Van Canneyt
And very slow for complex queries, in general.
Again, post benchmarks/tests.
Notice that to keep code small the sqlite SQL optimizer only handles the
common queries and let the corner cases to hand optimizations.

Finishing, sqlite is not for all uses neither mysql, postgres. See
http://www.sqlite.org/whentouse.html.

Luiz
Michael Van Canneyt
2006-05-12 07:19:28 UTC
Permalink
Post by Luiz Americo
Post by Michael Van Canneyt
Post by Bogusław Brandys
sqlite is good candidate too (multiplatform,single file,fast, only one
dll/so required)
- No external dependencies, please.
- Specifically: sqlite is a horrible database for use in Pascal.
Based in what you say that?
Based on extensive tests which I did and which I published in a German
magazine.
Post by Luiz Americo
In fact the TDataset descendant has better performance (see
http://www.geocities.com/camara_luiz/sqlite4fpc/benchmarks.html) than sqldb
(Mysql,Postgresql, firebird). This is so true that recently the sqldb internal
data handling schema was changed borrowing some ideas from
TCustomSqliteDataset. Of course, you are invited to try to replicate the
benchmarks and/or post new benchmarks (with the sources) you did.
It has nothing to do with TDataset. I did tests based on direct API calls.
Post by Luiz Americo
It also has some extra features like Master/Detail, Lookup,Locate, LocateNext,
Auto Increment.
Any way you can use sqlite using the plain interface (sqlite, sqlite3 units)
that directly call the sqlite dll. Exactly how a C program does. So the
problem is not the pascal language or implementation.
This is what I did.
Post by Luiz Americo
Post by Michael Van Canneyt
And very slow for complex queries, in general.
Again, post benchmarks/tests.
See the German Toolbox issues 1,2 and 3 of this year.
Post by Luiz Americo
Notice that to keep code small the sqlite SQL optimizer only handles the
common queries and let the corner cases to hand optimizations.
I find
SELECT
COUNT(PU_ID)
FROM
PUPIL
LEFT JOIN PUPILTRACK ON (PT_PUPIL_FK=PU_ID)
WHERE
(PT_DATE='2005-09-06') AND (PT_CODE='I') AND (PT_TIME<='08:28:00');

A VERY simple query and the result is a factor 180 worse than
Firebird or MySQL.
Some timings;

sqlite firebird Mysql

1 0:0:42.00 0:1:29.47 0:40.48
2 0:6:12.75 0:0:02.58 0:02.40
3 0:0:00.67 0:0:00.44 0:02.43
4 0:5:59.38 0:0:00.48 0:02.44

1. is the insert of 600.000 records. Here SQLIte is very fast.
The rest are selects like the one above.

I did more tests, all give comparable results: sqlite is very
fast for simple stuff.

And yes, I did all possible optimizations. Version 3 was used.
I have a lot of experience with databases of all kinds, and I
know what to test for.
Post by Luiz Americo
Finishing, sqlite is not for all uses neither mysql, postgres. See
http://www.sqlite.org/whentouse.html.
Look, I know that SQLite is popular, but it's simply not suitable for enterprise-use
nor for complex queries. Furthermore a database which says that 'we don't do
typechecking' is completely on the wrong track, even more so in a Pascal
environment. And this is the conclusion of my articles...

Michael.
Luiz Americo
2006-05-12 10:55:34 UTC
Permalink
Post by Michael Van Canneyt
Post by Luiz Americo
Post by Michael Van Canneyt
Post by Bogusław Brandys
sqlite is good candidate too (multiplatform,single file,fast, only one
dll/so required)
- No external dependencies, please.
- Specifically: sqlite is a horrible database for use in Pascal.
Based in what you say that?
Based on extensive tests which I did and which I published in a German
magazine.
Post by Luiz Americo
In fact the TDataset descendant has better performance (see
http://www.geocities.com/camara_luiz/sqlite4fpc/benchmarks.html) than sqldb
(Mysql,Postgresql, firebird). This is so true that recently the sqldb internal
data handling schema was changed borrowing some ideas from
TCustomSqliteDataset. Of course, you are invited to try to replicate the
benchmarks and/or post new benchmarks (with the sources) you did.
It has nothing to do with TDataset. I did tests based on direct API calls.
Post by Luiz Americo
It also has some extra features like Master/Detail, Lookup,Locate, LocateNext,
Auto Increment.
Any way you can use sqlite using the plain interface (sqlite, sqlite3 units)
that directly call the sqlite dll. Exactly how a C program does. So the
problem is not the pascal language or implementation.
This is what I did.
Post by Luiz Americo
Post by Michael Van Canneyt
And very slow for complex queries, in general.
Again, post benchmarks/tests.
See the German Toolbox issues 1,2 and 3 of this year.
Post by Luiz Americo
Notice that to keep code small the sqlite SQL optimizer only handles the
common queries and let the corner cases to hand optimizations.
I find
SELECT
COUNT(PU_ID)
FROM
PUPIL
LEFT JOIN PUPILTRACK ON (PT_PUPIL_FK=PU_ID)
WHERE
(PT_DATE='2005-09-06') AND (PT_CODE='I') AND (PT_TIME<='08:28:00');
A VERY simple query and the result is a factor 180 worse than
Firebird or MySQL.
Some timings;
sqlite firebird Mysql
1 0:0:42.00 0:1:29.47 0:40.48
2 0:6:12.75 0:0:02.58 0:02.40
3 0:0:00.67 0:0:00.44 0:02.43
4 0:5:59.38 0:0:00.48 0:02.44
1. is the insert of 600.000 records. Here SQLIte is very fast.
The rest are selects like the one above.
I did more tests, all give comparable results: sqlite is very
fast for simple stuff.
Your results are comparable from one made without index published in
sqlite wiki, but when using index, according to the test, sqlite
compares to the other.
See: http://www.sqlite.org/cvstrac/wiki?p=SpeedComparison
Post by Michael Van Canneyt
And yes, I did all possible optimizations. Version 3 was used.
I have a lot of experience with databases of all kinds, and I
know what to test for.
Please post the database schema, no of records, indexes, so i can
reproduce and publish in a site. As i said, sqlite requires some hand
SQL optimizations. You can see here:
http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuning
http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html

If you're using Windows take read this
http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuningWindows.
Specially the last topic.
Post by Michael Van Canneyt
Post by Luiz Americo
Finishing, sqlite is not for all uses neither mysql, postgres. See
http://www.sqlite.org/whentouse.html.
Look, I know that SQLite is popular, but it's simply not suitable for enterprise-use
nor for complex queries. Furthermore a database which says that 'we don't do
typechecking' is completely on the wrong track, even more so in a Pascal
environment. And this is the conclusion of my articles...
As i said above

Luiz
Michael Van Canneyt
1970-01-01 00:00:00 UTC
Permalink
I did more tests, all give comparable results: sqlite is very fast for
simple stuff.
Your results are comparable from one made without index published in sqlite
wiki, but when using index, according to the test, sqlite compares to the
other.
Obviously, I have created the same indexes in all 3 databases.
See: http://www.sqlite.org/cvstrac/wiki?p=SpeedComparison
And yes, I did all possible optimizations. Version 3 was used.
I have a lot of experience with databases of all kinds, and I know what to
test for.
Please post the database schema, no of records, indexes, so i can reproduce
and publish in a site.
I'll send it in private if you want, but you don't have permission to publish it.
(my contract with the journal's editor forbids that)
As i said, sqlite requires some hand SQL
http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuning
http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html
If you're using Windows take read this
It was all on Linux.

Look, I appreciate the effort you are doing to promote sqlite, but as long
as they don't do type checking, it's out for me. The speed issue is of
secundary importance because at best you get similar results as the
other 2 databases.

Currently, I would order them as follows for use as _embedded_ databases,
taking into consideration ease of use and speed:

- Firebird is best: scores good in both areas.
- Then SQLite (ease of use: very good. Speed: YMMV...)
- Then MySQL (speed is very good, but ease of use: -infinity !)

I still need to test Advantage Database Server and NexusDB
(the former Turbopower's FlashFiler)

Michael.
Luiz Americo
2006-05-12 15:54:49 UTC
Permalink
Post by Michael Van Canneyt
Post by Luiz Americo
I did more tests, all give comparable results: sqlite is very fast
for simple stuff.
Your results are comparable from one made without index published in
sqlite wiki, but when using index, according to the test, sqlite
compares to the other.
Obviously, I have created the same indexes in all 3 databases.
Post by Luiz Americo
See: http://www.sqlite.org/cvstrac/wiki?p=SpeedComparison
And yes, I did all possible optimizations. Version 3 was used.
I have a lot of experience with databases of all kinds, and I know
what to test for.
Please post the database schema, no of records, indexes, so i can
reproduce and publish in a site.
I'll send it in private if you want, but you don't have permission to publish it.
(my contract with the journal's editor forbids that)
Please send it. I'll take a look if some easy optization can be done and
i'll return to you privately.

Luiz
Graeme Geldenhuys
2006-05-10 07:18:24 UTC
Permalink
Post by L505
Or, you could search the HTML/XML files.. but it would be slower than
just searching a DB directly.
A lot slower I think. Hence the reason most help systems seem to
generate some type of index system when building the help files.

Regards,
- Graeme -


--
There's no place like 127.0.0.1
Michael Van Canneyt
1970-01-01 00:00:00 UTC
Permalink
Post by Graeme Geldenhuys
Post by L505
Or, you could search the HTML/XML files.. but it would be slower than
just searching a DB directly.
A lot slower I think. Hence the reason most help systems seem to
generate some type of index system when building the help files.
Michael Hess has a system that does this for HTML.
So at least we have someone with the knowledge of how to do that...

Michael.
Graeme Geldenhuys
2006-05-10 07:51:59 UTC
Permalink
Post by Michael Van Canneyt
Post by Graeme Geldenhuys
A lot slower I think. Hence the reason most help systems seem to
generate some type of index system when building the help files.
Michael Hess has a system that does this for HTML.
So at least we have someone with the knowledge of how to do that...
Excellent! That will be a good start.

Anybody know if 7zip compression algo has already been implemented in
Object Pascal?

Regards,
- Graeme -


--
There's no place like 127.0.0.1
George Lober
2006-05-10 00:36:16 UTC
Permalink
Post by Alexandre Leclerc
Post by A.J. Venter
Post by Alexandre Leclerc
I'm sorry, I can't find the source code... :(
The only code on sourceforge, well, I don't know if this is the
compiler itself, but it does not look like. Any-way I've no time now
to look at that, but I will because this is interesting me a lot for
our own help file creation.
Did you look at the webcvs link ? It is quite possible the code is only in
CVS.
Yep, the cvs tree is almost empty, and all files are 2 years old.
The project seems quite inactive, showing 0 developers, but the source
code is available. It is in an obscure location. On Sourceforge
Helpmaker main page: http://sourceforge.net/projects/helpmaker/ , click
on Files, this opens up this page:
http://sourceforge.net/project/showfiles.php?group_id=85113 . The
'sf.zip' file contains the main source code.

A while back I did try compiling the code with Lazarus, but ran into a
substantial roadblock. Helpmaker code uses at least one if not more
commercial Delphi plugins. So a Lazarus port would probably not be a
casual undertaking. Still if somebody managed to do it, it would
probably be, IINM, the only windows help editor free or otherwise
running on Linux. A step toward breaking the chicken and egg syndrome of
using windows help files on Linux.
Post by Alexandre Leclerc
http://htmlhelp.berlios.de/formats/chm.php
The HTML Help Maker project at savannah is at early stage and is in c.
But it can create the basic file "shell". If someone really want to
code a compiler engine; it could start with that ar translate to
pascal.
- get very well built html files with many links
- build a search tool in lazarus to search the html files in the help
folder. It is more simple and will do the job.
But I must say that having a compiled help file is a very nice idea.
Best regards.
George.
Felipe Monteiro de Carvalho
2006-05-10 00:56:12 UTC
Permalink
Post by George Lober
The project seems quite inactive, showing 0 developers,
Lol!!! With 0 developers just anyone can "takeover" the project and
become administrator.

This is a very good opportunity to take the project and put the source
on it's CVS so a community work can being.

--
Felipe Monteiro de Carvalho
George Lober
2006-05-09 20:43:24 UTC
Permalink
Post by Alexandre Leclerc
Post by Vincent Snijders
A drawback of chm, that I don't know about free tools to generate it except the
Microsoft Help Workshop, which is windows only. No problem for me, because windows
is my main platform, but still.
I have heard (not tested) that the only actual open source application
that can make CHM files is HelpMaker - Help Authoring Tool which is
coded in Delphi. So it only works under windows (unless ported to
lazarus?)
http://www.vizacc.com/
http://sourceforge.net/projects/helpmaker
http://blog.vizacc.com/archives/indiv_000127.php
If someone check it out to see if the application is actually
compiling the CHM files itself, we could see how it does, etc.
I am presently using HelpMaker and I think it's quite a good program. It
does create stand alone .chm files with no problem. It has options for
other formats as well. I found compiling .hlp files buggy, needs a bit
of work there if one really needed .hlp files, but otherwise an
excellent program.

George
Bogusław Brandys
2006-05-10 08:34:50 UTC
Permalink
Post by George Lober
Post by Alexandre Leclerc
Post by Vincent Snijders
A drawback of chm, that I don't know about free tools to generate it except the
Microsoft Help Workshop, which is windows only. No problem for me, because windows
is my main platform, but still.
I have heard (not tested) that the only actual open source application
that can make CHM files is HelpMaker - Help Authoring Tool which is
coded in Delphi. So it only works under windows (unless ported to
lazarus?)
http://www.vizacc.com/
http://sourceforge.net/projects/helpmaker
http://blog.vizacc.com/archives/indiv_000127.php
If someone check it out to see if the application is actually
compiling the CHM files itself, we could see how it does, etc.
I am presently using HelpMaker and I think it's quite a good program. It
does create stand alone .chm files with no problem. It has options for
other formats as well. I found compiling .hlp files buggy, needs a bit
of work there if one really needed .hlp files, but otherwise an
excellent program.
George
Not so fast. Look deeper into source code and you will find calls to M$
OCX :-( I haven't time to confirm that but it looks like a crap based on
M$ ActiveX for generating CHM (other parts are good - for Winhelp,RTF etc)


Could someone confirm ?


Regards
Boguslaw Brandys
Felipe Monteiro de Carvalho
2006-05-11 02:33:11 UTC
Permalink
Post by Bogusław Brandys
Not so fast. Look deeper into source code and you will find calls to M$
OCX :-( I haven't time to confirm that but it looks like a crap based on
M$ ActiveX for generating CHM (other parts are good - for Winhelp,RTF etc)
I also took a closer look and CHM is based on LZX compression. I don't
think this has being implemented on pascal yet. Also CHM is
proprietary, we would be building our things on top of muddy terrain.

I think the best quick solution for us will be html files, and latter
some way to compress and index the html files. They are easy to do
viewed on all platforms (just use a browser!) and standards compliant.

For full text search, if all docs are on the same directory structure
we can do a "Find in Files" =)

I think we should do a little research and see what other
cross-platform solutions out there are using.

Qt - http://doc.trolltech.com/4.1/helpsystem.html

Qt uses their own tool and format apparently.

wxWidgets - http://www.writerscafe.co.uk/helpview.htm

It uses a format which is almost a CHM. They even say it's based on MS
HTML Help system. I think they just used another method for creating a
TOC, a cross-platform compression method and then created a viewer for
it.

Despite being a "new format", I'm inclined for our own CHM-like
format. It's probably easy to implement. We can even get "inspired" by
wxWidgets method, or try to be compatible with their format if people
don't like yet another format.

thanks,
--
Felipe Monteiro de Carvalho
Graeme Geldenhuys
2006-05-11 07:36:08 UTC
Permalink
Post by Felipe Monteiro de Carvalho
Post by Felipe Monteiro de Carvalho
I think we should do a little research and see what other
cross-platform solutions out there are using.
Qt - http://doc.trolltech.com/4.1/helpsystem.html
Qt uses their own tool and format apparently.
wxWidgets - http://www.writerscafe.co.uk/helpview.htm
Add OpenOffice to that list.
Post by Felipe Monteiro de Carvalho
Despite being a "new format", I'm inclined for our own CHM-like
format. It's probably easy to implement. We can even get "inspired" by
wxWidgets method, or try to be compatible with their format if people
don't like yet another format.
Fully agree! CHM is a Microsoft format and I am sure we will get into
trouble using it. Creating our own format, or as Felipe said using
another format which works similar should be fine.

Compressed HTML seems to be the way to go and should be easy to view
on all platforms.

Regards,
- Graeme -
--
There's no place like 127.0.0.1
Giuliano Colla
2006-05-09 15:05:18 UTC
Permalink
Graeme Geldenhuys ha scritto:
[...]
Post by Graeme Geldenhuys
What does Qt offer in help formats?
Qt provides standard html files, and a navigation program called
assistant, which provides a sidebar, and other navigation tools, but
they specify that a standard browser can be used instead.

No particular file format, hyperlinks to navigate, very simple and
effective.
You can bookmark, remember the history, and exploit all the features of
a browser without any particular effort.
Building help files requires the same work as for wiki pages.
As a user I found it much better and faster than most of the other help
systems.
As compared to Delphi/Kylix help system, IMHO it's significantly faster
and more stable.

Giuliano
Marco Ciampa
2006-05-11 08:37:32 UTC
Permalink
Post by Giuliano Colla
[...]
Post by Graeme Geldenhuys
What does Qt offer in help formats?
Qt provides standard html files, and a navigation program called
assistant, which provides a sidebar, and other navigation tools, but
they specify that a standard browser can be used instead.
No particular file format, hyperlinks to navigate, very simple and
effective.
You can bookmark, remember the history, and exploit all the features of
a browser without any particular effort.
Building help files requires the same work as for wiki pages.
As a user I found it much better and faster than most of the other help
systems.
As compared to Delphi/Kylix help system, IMHO it's significantly faster
and more stable.
Giuliano
I'm actually the italian gimp and gimp manual translation team manager.
GIMP help system is based on DOCBOOK source format, is inherently
multilingual, multiple output format ready and has a context sensitive
search that works on the HTML result files, creating the pdf indexies
too.

My suggestion is to:

- use HTML as the target format (so user can always use any HTML file
browser he/she likes)

- start with multilanguage translation in mind. IMHO an docbook only solution
is clumsy without some form of source language control/revision system.
I see better a system like the following:

gettext/po files->xml(docbook?)->output(html/pdf/hlp in order of
priority)

But _please_, use HTML as the final format and do enable the textual ide
to use it!

bye
--
Marco Ciampa

+--------------------+
| Linux User #78271 |
| FSFE fellow #364 |
+--------------------+
Alexandre Leclerc
2006-05-11 12:41:03 UTC
Permalink
Post by Marco Ciampa
gettext/po files->xml(docbook?)->output(html/pdf/hlp in order of
priority)
Yes, and add:
- plain text; it just does the job, and you can run grep ;)
- and why not odt (open document text, which are xml files inside a zip file);

If we use a good starting format, we will be able to export to many
other format by the pressing of a key. I have difficulties with
docbook because it looks complicated to use. But it does the job to
convert to many other formats.
Post by Marco Ciampa
But _please_, use HTML as the final format and do enable the textual ide
to use it!
HTML should be a by-product of the original thing.

The only point which is more difficult is not the TOC, it's a good
searching engine. But this is not that hard in fact, and no huge
DB/Technology is required. This is a tree step project:
- get a good algo to extract key words;
- store the keywords in a file and a given 'pointer' where it can be
found back in original file;
- build a very stupid 'search in list/file' for the desired keyword;
get all the 'pointers'; display the results where the best 'pointers'
are found and in greater quantity; depends of the search params.

There we go, we only required:
- the help files which we will display in the format the user desire
(html? text? hlp?)
- a good normal pascal unit for the help related functions and classes
- a very normal text file or dbase file (what ever is the simplest and
supported by a pascal component) to store the keywords
- a new form that will do all the job of searching and displaying

I'm not very pro-CHM either. But as a compiled problem, a compiled
help file is sometimes appreciated for some reasons. The more it's
simple the best it is; the moment we can format the text a little bit.
(Yeah, we cant' format text files, but we can read them in a simple
text editor; could be usefull who know ;).)

Best regards.
--
Alexandre Leclerc
L505
2006-05-09 15:56:43 UTC
Permalink
Post by Graeme Geldenhuys
Post by Michael Van Canneyt
I'm not very much in favour of creating "yet another format".
Standards exist, we should try to use them as much as possible.
Linux - has no standard help!
Man Pages!

Indexing? use grep! (detect sarcasm here).
Marco Meile
2006-05-09 15:57:53 UTC
Permalink
Post by L505
Post by Graeme Geldenhuys
Post by Michael Van Canneyt
I'm not very much in favour of creating "yet another format".
Standards exist, we should try to use them as much as possible.
Linux - has no standard help!
Right, Linux has no help.
Linux is a Kernel!

GNU/Linux, thanks
Post by L505
Man Pages!
Indexing? use grep! (detect sarcasm here).
_________________________________________________________________
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
Graeme Geldenhuys
2006-05-10 07:06:30 UTC
Permalink
Post by Marco Meile
Right, Linux has no help.
That's not what I said. I said I don't know of a help standard for
todays type of applications. You have some apps that use HTML or
plain text, others use Man Pages, then you also get the HOWTO docs
etc...
Post by Marco Meile
Linux is a Kernel!
GNU/Linux, thanks
You know what I meant! :-) Most people refer to Linux as the overall
distribution, even though it isn't technically correct.


Cheers,
- Graeme -

--
There's no place like 127.0.0.1
Graeme Geldenhuys
2006-05-10 07:00:00 UTC
Permalink
Post by L505
Post by Graeme Geldenhuys
Linux - has no standard help!
Man Pages!
Ok, ok but I am maybe referring more to the GUI side [and xman doens't
count! ;-) ].
Applications like Mozilla FireFox, OpenOffice.org, KDevelop etc
doesn't release man pages. Man pages are inherently used for console
based apps (I think).
Post by L505
Indexing? use grep! (detect sarcasm here).
:-)

Cheers,
- Graeme -

--
There's no place like 127.0.0.1
Joost van der Sluis
2006-05-09 16:05:05 UTC
Permalink
Post by Michael Van Canneyt
I'm not very much in favour of creating "yet another format".
Standards exist, we should try to use them as much as possible.
It's already discussed on IRC, and maybe it could be a problem on large
files, but is ODT (opendocument format) an option? Those are xml-files,
which we already have, but then compressed.

What does OpenOffice use for it's help-files?

Joost.
Christian U.
2006-05-09 16:19:19 UTC
Permalink
what is bad on html ?
works great for me


----- Original Message -----
From: "Joost van der Sluis" <***@cnoc.nl>
To: <***@miraclec.com>
Sent: Tuesday, May 09, 2006 6:05 PM
Subject: Re: [lazarus] New help doc format?
Post by Joost van der Sluis
Post by Michael Van Canneyt
I'm not very much in favour of creating "yet another format".
Standards exist, we should try to use them as much as possible.
It's already discussed on IRC, and maybe it could be a problem on large
files, but is ODT (opendocument format) an option? Those are xml-files,
which we already have, but then compressed.
What does OpenOffice use for it's help-files?
Joost.
_________________________________________________________________
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
Alexandre Leclerc
2006-05-09 16:21:01 UTC
Permalink
Post by Joost van der Sluis
Post by Michael Van Canneyt
I'm not very much in favour of creating "yet another format".
Standards exist, we should try to use them as much as possible.
It's already discussed on IRC, and maybe it could be a problem on large
files, but is ODT (opendocument format) an option? Those are xml-files,
which we already have, but then compressed.
What does OpenOffice use for it's help-files?
It uses xml files (extention .xhp) embeded in .jar files. Then is has
another weird mechanism with DB / compiled indexes / java / and
yadayada...

--
Alexandre Leclerc
Graeme Geldenhuys
2006-05-10 07:16:39 UTC
Permalink
Post by Joost van der Sluis
What does OpenOffice use for it's help-files?
OpenOffice uses 4 files per help file/topic. .cfg .db .ht and .jar
The .jar file contants .xhp files which are XML files. The also have
a few .css files lying around in the help directory.

Regards,
- Graeme -


--
There's no place like 127.0.0.1
Mattias Gaertner
2006-05-09 07:51:05 UTC
Permalink
On Tue, 9 May 2006 09:24:33 +0200
Post by Graeme Geldenhuys
Has anybody put some thought into creating a cross platform help file
format that Lazarus could use in the IDE and in applications created
with Lazarus?
It was discussed several times on the lists and 10 people gave 10 different
ideas. That's why I finally implemented a help interface for the IDE with
abstract database, viewers, selection and TOC. So people can start
implementing backends to whatever help format they like.
Post by Graeme Geldenhuys
Just a quick list of ideas. Please add your own ideas or comments.
Once we have a good spec, maybe we can move all the ideas to the wiki
until implemented.
* I single help file, instead of loads of files like html would be
preferred. eg: .chm or .hlp files compared to .html file. Maybe
something like what OpenOffice.org did with their file format would
work. A single zipped file with xml and images inside.
Good for releases, bad for editing the help.
Post by Graeme Geldenhuys
* Maybe use a better compression algorythm like 7zip which is
excellent on text compared to normal zip for a single file compresion.
* In must support Index and keyword search.
At least. Even the wiki already needs more than this. At least searching
multiple keywords.
Post by Graeme Geldenhuys
* Image maps will be nice as well, using the png file format.
* We would need a help file compiler, that packs everything and
generates updated indexes and keywords.
* A help editor would be needed, except if we can piggy-back on LazDoc
and use that instead. If using LazDoc, it would need to be improved.
The fpdoc is maintained, it is written in fpc, the developers are willing to
improve it and patches are welcome.
Post by Graeme Geldenhuys
* Bookmark feature would be great.
* Editing features and a format, that can be used to create patches would be
great. To extend the help and send us a patch should be as easy as changing
a lazarus pascal example. Maybe as easy as the wiki.

* What about translations?


Mattias
Graeme Geldenhuys
2006-05-09 12:12:18 UTC
Permalink
Post by Mattias Gaertner
Post by Graeme Geldenhuys
* I single help file, instead of loads of files like html would be
preferred. eg: .chm or .hlp files compared to .html file. Maybe
something like what OpenOffice.org did with their file format would
work. A single zipped file with xml and images inside.
Good for releases, bad for editing the help.
I was thinking in terms of release format for end users. Editing
could be done exactly like the windows help formats. HLP is generated
from a rich text file (RTF). I think CHM is as well. We could
generate our final help file from XML. DocBook also does it that way.
Post by Mattias Gaertner
Post by Graeme Geldenhuys
* In must support Index and keyword search.
At least. Even the wiki already needs more than this. At least searching
multiple keywords.
Yes, a good search feature is very important.
Post by Mattias Gaertner
Post by Graeme Geldenhuys
* A help editor would be needed, except if we can piggy-back on LazDoc
and use that instead. If using LazDoc, it would need to be improved.
The fpdoc is maintained, it is written in fpc, the developers are willing to
improve it and patches are welcome.
Is LazDoc just a GUI front-end to fpdoc? I really need to read a bit
more on fpdoc!
Post by Mattias Gaertner
* Editing features and a format, that can be used to create patches would be
great. To extend the help and send us a patch should be as easy as changing
a lazarus pascal example. Maybe as easy as the wiki.
That would be cool. Even just being able to submit a email
referencing a Page & Paragraph containing the error with a small
message from the user would be a start. Having some small button or
something next to each paragraph (something like the Edit in wiki)
that could automatically generate a email with correct page and
paragraph.
Post by Mattias Gaertner
* What about translations?
Umm.. What does Windows do regarding this? The Help Viewer would be
a normal GUI (maybe even a console version could be made) so could get
the langauge from the system.

The actual help contents... Well what if the help compiler outputs the
compiled file with the language code at the end. The Help Viewer
would then read the correct file bases on the systems language.
Doesn't Lazarus do something like this?

eg:
myapphelp.help => defaults to English
myapphelp_ru.help => Russian
myapphelp_af.help => Afrikaans


PS:
What does the CHM (as in windows help) stand for? Compressed HTML M???


Regards,
- Graeme -


--
There's no place like 127.0.0.1
bobby
2006-05-09 12:41:16 UTC
Permalink
Post by Graeme Geldenhuys
I was thinking in terms of release format for end users. Editing
could be done exactly like the windows help formats. HLP is generated
from a rich text file (RTF). I think CHM is as well. We could
generate our final help file from XML. DocBook also does it that way.
CHM means Compiled HTML, and it is a bunch of HTML pages + some
compression (LZX I think).
This concept isn't a bad start point, but some TOC in the help file,
that can be accessed from the program, is also needed.

regards
bobby
Andrew Haines
2006-05-09 18:41:28 UTC
Permalink
Post by bobby
Post by Graeme Geldenhuys
I was thinking in terms of release format for end users. Editing
could be done exactly like the windows help formats. HLP is generated
from a rich text file (RTF). I think CHM is as well. We could
generate our final help file from XML. DocBook also does it that way.
CHM means Compiled HTML, and it is a bunch of HTML pages + some
compression (LZX I think).
This concept isn't a bad start point, but some TOC in the help file,
that can be accessed from the program, is also needed.
regards
A few months ago I wrote a chm viewer program using the LCL and also a
package for Lazarus so pressing F1 started/focused the help viewer.

So far everything works afaik and it is faster than MS Help in loading
files with large TOC's and indices. The only (major) thing left todo is
implement the search capability (which works only if the chm was created
to be searchable)

I am now pretty busy in the summer so there probably won't be much
progress on it for some time.

However Patches are welcome :)

I checked out HTML Help Maker
http://download.savannah.gnu.org/releases/hhm/ and it can only create
the archive format that chms are. It cannot currently create the TOC or
index file or any of the other special chm related files that are in a chm.

The following links I used as a reference to create the reader for the
chm file format:

http://www.nongnu.org/chmspec/latest/

http://www.speakeasy.org/~russotto/chm/

I obtained the permission of the author of lzx.c to convert it to pascal
and use the modified lgpl with it and with the help of Neli the lzx
decompression is included so no external library is need to read chm
files in linux or any of the other platforms that fpc will work on.

As Vincent said all this code is in /components/chmhelp in your lazarus
directory. :)

Andrew
Andrew Haines
2006-05-09 18:48:19 UTC
Permalink
Post by Andrew Haines
I checked out HTML Help Maker
http://download.savannah.gnu.org/releases/hhm/ and it can only create
the archive format that chms are. It cannot currently create the TOC
or index file or any of the other special chm related files that are
in a chm.
However if we created our own index files in the chm archive (as in our
own index format ( perhaps in XML )) the chmhelp program could easily be
adapted to read those. A normal chm viewier however would not be able to
read our special index or TOC.

Andrew
L505
2006-05-10 16:01:51 UTC
Permalink
Post by L505
Even CHM format
creates multiple files and depends on them.
I actually meant HLP format on Win32
Continue reading on narkive:
Loading...