HMG Reference as a CHM file

Source code related resources

Moderator: Rathinagiri

User avatar
kcarmody
Posts: 152
Joined: Tue Oct 07, 2014 11:13 am
Contact:

HMG Reference as a CHM file

Post by kcarmody »

I started using HMG a few weeks ago (after several years using Minigui Extended) and was surprised to see that the HMG Reference in the DOC directory is a group of linked HTML files. There is a master file, index.html, that makes this set of files look and behave something like a CHM file. But the big problem with this arrangement is that a CHM file is easily searchable, but a set of HMTL files is not.

This HTML file set is very close to what would be needed to create a real CHM file, so I took a few hours to do this. I've put the result on my site at http://kevincarmody.com/hmg/DOC/

You will find there HMG.chm and a zip file containing the source files I used to create the CHM. In the zip file, the HTML files in the hfcl\Doc and Source\HMGSQL folders have been copied to subfolders under the DOC folder, since the CHM compiler cannot compile HTML files in outside folders.

To compile the CHM, I used a batch file ModifyChm.bat that I originally wrote for Minigui Extended. This batch file is in http://kevincarmody.com/hmg/
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG Reference as a CHM file

Post by esgici »

kcarmody wrote:I started using HMG a few weeks ago (after several years using Minigui Extended) and was surprised to see that the HMG Reference in the DOC directory is a group of linked HTML files. There is a master file, index.html, that makes this set of files look and behave something like a CHM file. But the big problem with this arrangement is that a CHM file is easily searchable, but a set of HMTL files is not.

This HTML file set is very close to what would be needed to create a real CHM file, so I took a few hours to do this. I've put the result on my site at http://kevincarmody.com/hmg/DOC/

You will find there HMG.chm and a zip file containing the source files I used to create the CHM. In the zip file, the HTML files in the hfcl\Doc and Source\HMGSQL folders have been copied to subfolders under the DOC folder, since the CHM compiler cannot compile HTML files in outside folders.

To compile the CHM, I used a batch file ModifyChm.bat that I originally wrote for Minigui Extended. This batch file is in http://kevincarmody.com/hmg/
Thanks Mr. Carmody :)

This will be useful for us :arrow:

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: HMG Reference as a CHM file

Post by danielmaximiliano »

Gracias Kevin....
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG Reference as a CHM file

Post by Pablo César »

Hi Kevin,

Thank you very much for your contribution, all kind of help is very good welcome. :D
kcarmody wrote:This HTML file set is very close to what would be needed to create a real CHM file, so I took a few hours to do this. I've put the result on my site at http://kevincarmody.com/hmg/DOC/
I downloaded your chm file and I've runned and in three itens I saw without descriptions of each topics. See image below:
Screen.PNG
Screen.PNG (23.86 KiB) Viewed 6935 times
kcarmody wrote:was surprised to see that the HMG Reference in the DOC directory is a group of linked HTML files. There is a master file, index.html, that makes this set of files look and behave something like a CHM file. But the big problem with this arrangement is that a CHM file is easily searchable, but a set of HMTL files is not
Yes you are right Kevin, by chm it is easier than make thru htmls. I tried to implement the search engine into hmtl file.
Screen_01.PNG
Screen_01.PNG (23.2 KiB) Viewed 6935 times
This I have not finished because it is hard to implement and I also have not much knowledge in html but you can find something in attached file in my navigator.htm one.

I believe we tried to keep in html file, because quite all HMG product are present source codes files and in DOC keeping in html makes easy for maintenance and updating proposes.

It is also important to mentioned that are two ways (localhost and hosted) to access DOC. When I said localhost, we access for example at C:\hmg.3.3.1\DOC\hmgdoc.htm and in hosted way at hmgdoc/data/index.htm

So by this does not means that we should have two versions of DOC, because in all html you need to specify the full path a file names of each topics. So then I made a routine which can differantiate when in localhost when is hosted. (See Building_HMG_applications.htm in attached file at GetMyURL)

I have started to re-edit each html file in order to update (please note Building_HMG_applications, some parameters was changed), was also make available some source code in highlighted format (with lines number), was also embellished and added some URLs for samples which can also appoint to our site or localhost.
Screen_02.PNG
Screen_02.PNG (45.95 KiB) Viewed 6935 times
This I have explained at this topic: viewtopic.php?f=10&t=3833

I am still thinking if is the best way to use CHM file or not, due would it be not practicable at internet opening. In explain my point of view int this topic: viewtopic.php?f=10&t=3832 in which Mr. PCToledo also presented HMG Reference too.

I do not know if you have interest to go ahead with HMG documentation, but I will try to explian what I also got and probably will be usefull to you or for any one else.
Attachments
My DOC data files.rar
(12.55 KiB) Downloaded 374 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: HMG Reference as a CHM file

Post by Javier Tovar »

Gracias por tratar de mejorar a HMG! :) :) :)

Saludos
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG Reference as a CHM file

Post by Rathinagiri »

Great contribution! We shall include this in the official version also.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
kcarmody
Posts: 152
Joined: Tue Oct 07, 2014 11:13 am
Contact:

Re: HMG Reference as a CHM file

Post by kcarmody »

Pablo César wrote:Hi Kevin,

Thank you very much for your contribution, all kind of help is very good welcome. :D
kcarmody wrote:This HTML file set is very close to what would be needed to create a real CHM file, so I took a few hours to do this. I've put the result on my site at http://kevincarmody.com/hmg/DOC/
I downloaded your chm file and I've runned and in three itens I saw without descriptions of each topics. See image below:
The attachment Screen.PNG is no longer available
It should look like the attachment below. The button should open a PDF. Perhaps your CHM viewer does this when the link is broken. In XP it shows the button but the button does not do anything.

I did not test PDFs properly when I posted my original message. Since then I discovered that they are difficult in CHMs. They have to be opened with a special button that is used to open external files or web addresses. The PDF cannot be included in the CHM but must be copied as an external file to a place that is accessible to the CHM.

I have developed a revised version of my original proposal that handles CHMs better and put it into http://kevincarmody.com/hmg/DOC/
Pablo César wrote:
kcarmody wrote:was surprised to see that the HMG Reference in the DOC directory is a group of linked HTML files. There is a master file, index.html, that makes this set of files look and behave something like a CHM file. But the big problem with this arrangement is that a CHM file is easily searchable, but a set of HMTL files is not
Yes you are right Kevin, by chm it is easier than make thru htmls. I tried to implement the search engine into hmtl file.
The attachment Screen_01.PNG is no longer available
This I have not finished because it is hard to implement and I also have not much knowledge in html but you can find something in attached file in my navigator.htm one.
I don't see this search box and don't see any option for it in navigator.htm.
Pablo César wrote:I believe we tried to keep in html file, because quite all HMG product are present source codes files and in DOC keeping in html makes easy for maintenance and updating proposes.

It is also important to mentioned that are two ways (localhost and hosted) to access DOC. When I said localhost, we access for example at C:\hmg.3.3.1\DOC\hmgdoc.htm and in hosted way at hmgdoc/data/index.htm

So by this does not means that we should have two versions of DOC, because in all html you need to specify the full path a file names of each topics. So then I made a routine which can differantiate when in localhost when is hosted. (See Building_HMG_applications.htm in attached file at GetMyURL)
I agree that two versions of DOC would not be good. But I have been using CHMs for several years and have found them quite easy to work with. They have many advantages over HMTL and are specifically designed for the purpose we would be using them for. I also believe there would be minimum duplication if you have both CHM and HTML.
Pablo César wrote:I am still thinking if is the best way to use CHM file or not, due would it be not practicable at internet opening. In explain my point of view int this topic: viewtopic.php?f=10&t=3832 in which Mr. PCToledo also presented HMG Reference too.

I do not know if you have interest to go ahead with HMG documentation, but I will try to explian what I also got and probably will be usefull to you or for any one else.
I think it is quite easy to have HTML (with the paths slightly changed from the current paths) for the website and CHM for the distribution, because CHM is made from HTML. The only duplication would be navigaor.htm for the web site and *.hhp/*.hhc/*.hhk for the CHM.

It is also easy to put a CHM on a web site, as Mr. pctoledo has done, although it has to be downloaded and run outside the browser, and this is not as smooth as HTML.
Attachments
chmbutton.png
chmbutton.png (14.75 KiB) Viewed 6844 times
User avatar
kcarmody
Posts: 152
Joined: Tue Oct 07, 2014 11:13 am
Contact:

Re: HMG Reference as a CHM file

Post by kcarmody »

Pablo César wrote:
kcarmody wrote:I was surprised to see that the HMG Reference in the DOC directory is a group of linked HTML files. There is a master file, index.html, that makes this set of files look and behave something like a CHM file. But the big problem with this arrangement is that a CHM file is easily searchable, but a set of HMTL files is not
Yes you are right Kevin, by chm it is easier than make thru htmls. I tried to implement the search engine into hmtl file.

This I have not finished because it is hard to implement and I also have not much knowledge in html but you can find something in attached file in my navigator.htm one.

I believe we tried to keep in html file, because quite all HMG product are present source codes files and in DOC keeping in html makes easy for maintenance and updating proposes.

It is also important to mentioned that are two ways (localhost and hosted) to access DOC. When I said localhost, we access for example at C:\hmg.3.3.1\DOC\hmgdoc.htm and in hosted way at hmgdoc/data/index.htm

So by this does not means that we should have two versions of DOC, because in all html you need to specify the full path a file names of each topics. So then I made a routine which can differantiate when in localhost when is hosted. (See Building_HMG_applications.htm in attached file at GetMyURL)
HTML can use relative paths, and the current HMG doc in fact uses them, so I don't know why you say that full path is always required.

Let me emphasize that search is the crucial feature we need. As a new user of HMG, I had to do many searches through the HMG documentation. The lack of easy search was initially a big problem for me. So the main reason I made the CHM was easy search.

For some reason, Mr. PCToledo did not turn search on in his CHM, but I did in mine ("Full-text search=Yes" in the Options section of the hhp file).

A web site or a local file can do a server side search, like the search page for my site at http://kevincarmody.com/site/search.html, which uses Google to search my site. But a search of local files is generally blocked in a browser by its "sandbox", which keeps Javascript and everything else in an HTML file, whether server side or client side, from accessing the file system of the local machine. This is necessary to block malicious software. You can get the URL of the current file and other such info, but you cannot search other files on the local system.

The current HMG install file creates a Start menu link only to the IDE, but it could also create a link to a CHM file. I think this would make web access to the HMG doc unnecessary in most cases.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG Reference as a CHM file

Post by Pablo César »

Hi Kevin,

I just tried to following same doc materials and make some improvements on it.

I have passed onto you and for rest, just in case you make it better.

Regarding full path and files names in html, it is just for locations of:

- Source codes examples, usually at SAMPLES folders. This is a great think to make available some more examples tied to the main theme of each topic. It make easy for understand and this could be done by simple URLs which could appoint to localhost or at website when this doc been accessed by internet at hmgdoc/data/index.htm

- Hosted pictures when some screen shots is necessary to be displayed, for example.

- Also a folders of examples can be opened in child window

This is my point of view and does means that must be like this. Whatever be done to make easy search in HMG documentation will be great. I have presented that materials in order to be evaluated for your implementations if you want.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply