User Feedback :: Fix for wordview xls2html and pptview



See below for some "diffs" that fix the "can't view a file with a space in the name" problem.

Basically, I just added some hard quotes \' in appropriate places for wordview and added some double quotes in appropraite places for xls2html and pptview

wordview.lua.diff:
Code Sample
17,18c17,18
<     execute('/usr/bin/antiword -p letter ' .. input.value .. ' > '.. input.value .. ".ps")
<     execute('/usr/local/bin/ps2pdf ' .. input.value .. ".ps")
---
>     execute('/usr/bin/antiword -p letter \'' .. input.value .. '\' > \''.. input.value .. ".ps\'")
>     execute('/usr/local/bin/ps2pdf \'' .. input.value .. ".ps\'")
24c24
<     execute('/usr/bin/antiword -p letter ' .. input.value .. ' > '.. input.value .. ".ps")
---
>     execute('/usr/bin/antiword -p letter \'' .. input.value .. '\' > \''.. input.value .. ".ps\'")
64c64
<     execute('/usr/bin/antiword -p letter ' .. input.value .. ' > ' .. workfile)
---
>     execute('/usr/bin/antiword -p letter \'' .. input.value .. '\' > ' .. workfile)



xls2html.sh.diff:
Code Sample
19c19
< xlhtml $source > $html
---
> xlhtml "$source" > $html



pptview.sh.diff:
Code Sample
19c19
< ppthtml $source > $html
---
> ppthtml "$source" > $html


I tested all three and they seem to work fine for me.

Please test and add to a future version of DSL if you agree.

I concur. I was going to suggest escaping it and using quotes but never got around to it. Army's had me this weekend.
I didn't realize ppthtml and xlshtml scripts had the same "problem".
I looked into the lua script as well but didn't really get it right with only the " quotes , thx cbagger!

When I wrote
Quote
Sorry, I don't consider that a bug. But a currently unsupported filename nameing convention primarly used by MS. For now there is a feature called rename file.
It was not because of lack of ability or know how but on principle.

It is kinda like the forest and the trees. These three scripts being the trees and DSL being the forest. If I allow spaces in filenames then given that an OS should be consistent should we not also allow spaces in fileanames everywhere. Given that unix traditionally does not allow spaces in filenames and given the fact that most features have been designed not with "spaces" in mind. Would I be so inclined to review each and every feature of the OS from Klaus's scripts to John's perl scripts, to my bash and flua scripts to insure consistency. Really, I don't have that motivation but instead wish to presue new features and continue the development of DSL and not worry about this. I know my standards may be too high to be not practical. It would not be the first time that I have been told that. But it is something that I think about, especially when my name is associated with DSL. Something to think about. It is OK to tell me that I worry too much that this should be an exception. I just don't want to hear next that the myDSL is broken because it doesn't allow spaces in filenames too, or some other such feature is broken because of this.

Something to think about. Thought you should know my thoughts on this subject.

Yea, after reading your point of view, it's best to keep the support of spaces in names out of DSL Roberts. You should keep the high standards. And you won't hear me say anything about it anymore ;)

But those doc files are all full of spaces! :s
Heh I'll just get me a rename tool and let the spaces be replaced by _ ... why didn't I think of that earlier?

grtz

Next Page...
original here.