PZCHMView
-
- Posts: 282
- Joined: Wed 16 Dec 2009, 21:38
- Location: Earth
PZCHMView
Created for using with Puppy 4.3.x
Uses default html viewer. (You may change it's name by editing a corresponding variable).
Works in text and graphical modes.
No dependencies, all tools and libs included into package.
(If you want to use it in text mode, you must install any console web browser).
Uses default html viewer. (You may change it's name by editing a corresponding variable).
Works in text and graphical modes.
No dependencies, all tools and libs included into package.
(If you want to use it in text mode, you must install any console web browser).
- Attachments
-
- pzchmview-1.0.pet
- (14.63 KiB) Downloaded 1231 times
SUUM CUIQUE.
What is a CHM file?
What is a CHM file?
I see you are from Earth. I've been to that planet, but they are so primitive. They still use Windows!
I see you are from Earth. I've been to that planet, but they are so primitive. They still use Windows!
-
- Posts: 282
- Joined: Wed 16 Dec 2009, 21:38
- Location: Earth
Re: What is a CHM file?
Microsoft compiled HTML help file.bigpup wrote:What is a CHM file?
bigpup wrote: I see you are from Earth. I've been to that planet, but they are so primitive. They still
use Windows!
Sorry but "primitive" people from this planet sometimes want to read some usefull books compiled as CHM.
SUUM CUIQUE.
Thank you PANZERKOPF,
I do need to read chm files from time to time but do not have seamonkey or firefox installed so could never use chmsee. This does a great job on its own! I've just installed it in my woofed up version of quirky21 and it is displaying files in Netsurf quite nicely.
One problem with your pet, there is no pet.specs file in the pet so petget manager will not uninstall it. I extracted your pet and reran it through dir2pet and created a pet with pet.specs in it. I was able to reinstall and then uninstall (just to make sure it would work, I immediately installed it again).
While I was rebuilding it I also included a new /root/Choices/MIME-types/application_x-chm with this code:Now I can click on a .chm file and it will open in defaulthtmlviewer.
Thanks again, J
Edit: Reworked .pet attached
I do need to read chm files from time to time but do not have seamonkey or firefox installed so could never use chmsee. This does a great job on its own! I've just installed it in my woofed up version of quirky21 and it is displaying files in Netsurf quite nicely.
One problem with your pet, there is no pet.specs file in the pet so petget manager will not uninstall it. I extracted your pet and reran it through dir2pet and created a pet with pet.specs in it. I was able to reinstall and then uninstall (just to make sure it would work, I immediately installed it again).
While I was rebuilding it I also included a new /root/Choices/MIME-types/application_x-chm with this code:
Code: Select all
#! /bin/sh
exec pzchmview "$1"
Thanks again, J
Edit: Reworked .pet attached
- Attachments
-
- pzchmview-1.0b.pet
- PANZERKOPF's .pet with pet.specs and application_x-chm
- (15.13 KiB) Downloaded 1145 times
Last edited by jrb on Thu 06 May 2010, 12:58, edited 1 time in total.
-
- Posts: 282
- Joined: Wed 16 Dec 2009, 21:38
- Location: Earth
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Hi, I installed the 1.0b PET, but it doesn't work properly for me.
I downloaded three .chm files, they all have the same problem. When I click on one, it opens in my browser -- a page of links, I click on a link and get "Page not found", I click the go-back button and get "Page not found".
It seems that whatever got created in /tmp got immediately erased, I look and there is nothing in /tmp, even while the .chm file is being viewed.
Here is where I got a couple of the .chm files:
http://code.google.com/p/htmlhelp/downl ... =label:CHM
Looking at your script, I see the problem. Quirky does not have a HTML viewer as such, uses the full SeaMonkey. In the second last line, SeaMonkey gets launched in a tab-window and there is an immediate return to the script, then the files in /tmp get deleted.
I have attached a workaround, which detects the special condition and does not delete the files in /tmp. Not a very satisfactory solution though.
I downloaded three .chm files, they all have the same problem. When I click on one, it opens in my browser -- a page of links, I click on a link and get "Page not found", I click the go-back button and get "Page not found".
It seems that whatever got created in /tmp got immediately erased, I look and there is nothing in /tmp, even while the .chm file is being viewed.
Here is where I got a couple of the .chm files:
http://code.google.com/p/htmlhelp/downl ... =label:CHM
Looking at your script, I see the problem. Quirky does not have a HTML viewer as such, uses the full SeaMonkey. In the second last line, SeaMonkey gets launched in a tab-window and there is an immediate return to the script, then the files in /tmp get deleted.
I have attached a workaround, which detects the special condition and does not delete the files in /tmp. Not a very satisfactory solution though.
- Attachments
-
- pzchmview.gz
- (900 Bytes) Downloaded 1056 times
[url]https://bkhome.org/news/[/url]
-
- Posts: 282
- Joined: Wed 16 Dec 2009, 21:38
- Location: Earth
Hi Barry !
I newer used seamonkey but installed it especially for simulate this error.
This is what I understood:
1) The "mozstart" executes seamonkey with "exec" command and immediately
exits.
3) Chmviewer goes to last string and erases all temporary html files.
2) Seamonkey continues running as a separate process but all needed files are erased.
We can use directly "seamonkey" script instead of "mozstart" for solving this problem (IMHO).
I newer used seamonkey but installed it especially for simulate this error.
This is what I understood:
1) The "mozstart" executes seamonkey with "exec" command and immediately
exits.
3) Chmviewer goes to last string and erases all temporary html files.
2) Seamonkey continues running as a separate process but all needed files are erased.
We can use directly "seamonkey" script instead of "mozstart" for solving this problem (IMHO).
SUUM CUIQUE.
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Oh, of course, dumb me.
For SM 2.0.4, /usr/bin/seamonkey is a symlink to /usr/lib/seamonkey/seamonkey, which is a script that runs SM but exits immediately.
The solution is to run the binary executable directly, ex:
/usr/lib/seamonkey/seamonkey-bin file:///usr/share/doc/index.html
...so, if that is put into your script, test that 'gtkmoz' exists, check that it is a symlink to 'mozstart', then check that /usr/lib/seamonkey/seamonkey-bin exists, if all 3 are true then run seamonkey-bin directly.
For SM 2.0.4, /usr/bin/seamonkey is a symlink to /usr/lib/seamonkey/seamonkey, which is a script that runs SM but exits immediately.
The solution is to run the binary executable directly, ex:
/usr/lib/seamonkey/seamonkey-bin file:///usr/share/doc/index.html
...so, if that is put into your script, test that 'gtkmoz' exists, check that it is a symlink to 'mozstart', then check that /usr/lib/seamonkey/seamonkey-bin exists, if all 3 are true then run seamonkey-bin directly.
[url]https://bkhome.org/news/[/url]
-
- Posts: 282
- Joined: Wed 16 Dec 2009, 21:38
- Location: Earth
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
I'm using SeaMonkey 2.0.4.PANZERKOPF wrote:I think that my some researches are wrong. When chmviewer uses defauthtmlviewer script (which also uses "exec" for executing viewer) this problem doesn't appear. It only appears when chmviewer uses mozstart and seamonkey is running at this time (opens files in new tab).
If I run this in a terminal:
# seamonkey file:///usr/share/doc/index.html
#
There is an immediate return to the prompt.
This must be different from how SeaMonkey 1.1.18 works.
Last edited by BarryK on Wed 12 May 2010, 03:29, edited 1 time in total.
[url]https://bkhome.org/news/[/url]
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
I was getting confused about the real cause of the problem. Have sorted it out, see my blog post:
http://bkhome.org/blog/?viewDetailed=01582
I have created pzchmview-1.0c.pet, here is the script:
http://bkhome.org/blog/?viewDetailed=01582
I have created pzchmview-1.0c.pet, here is the script:
- Attachments
-
- pzchmview.gz
- (1.01 KiB) Downloaded 1039 times
[url]https://bkhome.org/news/[/url]
-
- Posts: 282
- Joined: Wed 16 Dec 2009, 21:38
- Location: Earth
I looked into script (but didn't test yet). My opinion:BarryK wrote:I was getting confused about the real cause of the problem. Have sorted it out, see my blog post:
http://bkhome.org/blog/?viewDetailed=01582
I have created pzchmview-1.0c.pet, here is the script:
This procedure kill all seamonkey's processes. If we are browsing
some web pages and also want to view a chm file, an active browser will be killed.
Also:
Yesterday I discovered that Opera web browser has same behavior as Seamonkey.
It allows running only one instance: any next instance opens a document in new
tab and terminates immediately.
I haven't any solution now for these browsers.
I am going to think........
SUUM CUIQUE.
-
- Posts: 282
- Joined: Wed 16 Dec 2009, 21:38
- Location: Earth
Sorry but I Don't understand what means "posting a source". The PZchmview isBarryK wrote:PANZERKOPF,
Could you please post the source? Legally, we have to provide it.
a script which is always a source. Explain me please.
I watch your blog periodically.BarryK wrote: See my post about Pzchmview 1.0d:
http://bkhome.org/blog/?viewDetailed=01611
Helpsurfer is nice html viewer but it can't display correctly non-latin characters.
(possibly can't recognize a charset of page).
SUUM CUIQUE.
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Your PET package includes 'extract_chmLib' binary executable and 'libchm.so.0.0.0' shared library. We need the source for these.PANZERKOPF wrote:Sorry but I Don't understand what means "posting a source". The PZchmview isBarryK wrote:PANZERKOPF,
Could you please post the source? Legally, we have to provide it.
a script which is always a source. Explain me please.
I watch your blog periodically.BarryK wrote: See my post about Pzchmview 1.0d:
http://bkhome.org/blog/?viewDetailed=01611
Helpsurfer is nice html viewer but it can't display correctly non-latin characters.
(possibly can't recognize a charset of page).
[url]https://bkhome.org/news/[/url]