PZCHMView

Word processors, spreadsheets, presentations, translation, etc.
Message
Author
PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

PZCHMView

#1 Post by PANZERKOPF »

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).
Attachments
pzchmview-1.0.pet
(14.63 KiB) Downloaded 1230 times
SUUM CUIQUE.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

What is a CHM file?

#2 Post by bigpup »

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!

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

Re: What is a CHM file?

#3 Post by PANZERKOPF »

bigpup wrote:What is a CHM file?
Microsoft compiled HTML help 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.

User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

#4 Post by jrb »

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! :D 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"
Now I can click on a .chm file and it will open in defaulthtmlviewer.

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 1144 times
Last edited by jrb on Thu 06 May 2010, 12:58, edited 1 time in total.

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#5 Post by jemimah »

Nice, I'm adding this to Puppeee.

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#6 Post by chrome307 »

@ jrb

Can you upload your updated PET file for members?

Thanks in advance :)

User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

#7 Post by jrb »

Reworked .pet attached to post above.

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#8 Post by PANZERKOPF »

jrb wrote:Reworked .pet attached to post above.
Thanks for addition!
SUUM CUIQUE.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#9 Post by BarryK »

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.
Attachments
pzchmview.gz
(900 Bytes) Downloaded 1056 times
[url]https://bkhome.org/news/[/url]

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#10 Post by PANZERKOPF »

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).
SUUM CUIQUE.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#11 Post by BarryK »

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.
[url]https://bkhome.org/news/[/url]

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#12 Post by PANZERKOPF »

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).
SUUM CUIQUE.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#13 Post by BarryK »

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).
I'm using SeaMonkey 2.0.4.

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]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#14 Post by BarryK »

Ah, I think that I will fix it in my seamonkey package. I'll make /usr/bin/seamonkey a link to /usr/lib/seamonkey/seamonkey-bin. I don't think that there is any need to run the /usr/lib/seamonkey/seamonkey startup script.

Then your script will work.
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#15 Post by BarryK »

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:
Attachments
pzchmview.gz
(1.01 KiB) Downloaded 1039 times
[url]https://bkhome.org/news/[/url]

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#16 Post by PANZERKOPF »

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:
I looked into script (but didn't test yet). My opinion:
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.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#17 Post by BarryK »

See my post about Pzchmview 1.0d:

http://bkhome.org/blog/?viewDetailed=01611
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#18 Post by BarryK »

PANZERKOPF,
Could you please post the source? Legally, we have to provide it.
[url]https://bkhome.org/news/[/url]

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#19 Post by PANZERKOPF »

BarryK wrote:PANZERKOPF,
Could you please post the source? Legally, we have to provide it.
Sorry but I Don't understand what means "posting a source". The PZchmview is
a script which is always a source. Explain me please. :)
BarryK wrote: See my post about Pzchmview 1.0d:
http://bkhome.org/blog/?viewDetailed=01611
I watch your blog periodically.
Helpsurfer is nice html viewer but it can't display correctly non-latin characters.
(possibly can't recognize a charset of page).
SUUM CUIQUE.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#20 Post by BarryK »

PANZERKOPF wrote:
BarryK wrote:PANZERKOPF,
Could you please post the source? Legally, we have to provide it.
Sorry but I Don't understand what means "posting a source". The PZchmview is
a script which is always a source. Explain me please. :)
BarryK wrote: See my post about Pzchmview 1.0d:
http://bkhome.org/blog/?viewDetailed=01611
I watch your blog periodically.
Helpsurfer is nice html viewer but it can't display correctly non-latin characters.
(possibly can't recognize a charset of page).
Your PET package includes 'extract_chmLib' binary executable and 'libchm.so.0.0.0' shared library. We need the source for these.
[url]https://bkhome.org/news/[/url]

Post Reply