Google Группы больше не поддерживают новые публикации и подписки в сети Usenet. Опубликованный ранее контент останется доступен.

Another Image Viewer/OS X Question

3 просмотра
Перейти к первому непрочитанному сообщению

Emily Jackson

не прочитано,
23 дек. 2002 г., 06:28:4223.12.2002
I wrote a shell script for Pine to use for viewing attachments:

#!/bin/sh
open "$1"
sleep 5

When Pine invokes this script (to view a .gif, for instance),
Preview.app starts up but no picture appears. I haven't been able to
figure out why this script doens't work as Pine's image viewer.

Thanks,

Emily

--
"If it seem slow, wait for it; it will surely come, it will not delay."
Emily Jackson
<http://home.hiwaay.net/~emilyj/missjackson.html>

David Sewell

не прочитано,
23 дек. 2002 г., 09:35:5223.12.2002
In article <Pine.OSX.4.51.0...@svir.tencuvgrvznp.pbz>,

Emily Jackson <m5comp@fastmail-REMOVE_THIS-.fm.invalid> wrote:
> I wrote a shell script for Pine to use for viewing attachments:
>
> #!/bin/sh
> open "$1"
> sleep 5
>
> When Pine invokes this script (to view a .gif, for instance),
> Preview.app starts up but no picture appears. I haven't been able to
> figure out why this script doens't work as Pine's image viewer.

Things are a bit more complicated. Allan Streib posted one solution
here a few months ago; see

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=Pine.OSX.4.44.0207161623350.827-100000%40ranger.uits.indiana.edu

or if that URL causes problems, search groups.google.com for "pine
'os x' image streib".

DS

--
David Sewell, University of Virginia
Charlottesville, VA USA

paul killey

не прочитано,
23 дек. 2002 г., 21:47:2923.12.2002


David Sewell wrote:

> In article ,


> Emily Jackson wrote:
>
> >I wrote a shell script for Pine to use for viewing attachments:
> >
> >#!/bin/sh
> >open "$1"
> >sleep 5
> >
> >When Pine invokes this script (to view a .gif, for instance),
> >Preview.app starts up but no picture appears. I haven't been able to
> >figure out why this script doens't work as Pine's image viewer.
>
>

> Things are a bit more complicated. Allan Streib posted one solution
> here a few months ago; see
>
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=Pine.OSX.4.44.0207161623350.827-100000%40ranger.uits.indiana.edu
>
> or if that URL causes problems, search groups.google.com for "pine
> 'os x' image streib".
>
> DS
>

Re: using the open command and Preview.app.

in the course of figuring out that pine removes the /tmp file w/ the
attachment in it i changed pine to not rm the file, hence did not have
to have scripts that copied the file. in my (limited) experience, open
works fine w/ word and excel docs from pine.

while open will work with word and excel files _without_ the .doc or
.xls suffixes, open does not seem to work w/, e.g., preview and .pdf
files without the .pdf suffix. so, you would need a script as described
in the posting refered to in google to get the suffix right.

open -a preview foo.pdf does OK.
open -a preview foo (where foo is a pdf file) does not.

--paul

Emily Jackson

не прочитано,
28 дек. 2002 г., 10:00:3528.12.2002
On 23 Dec 2002, David Sewell (dse...@virginia.edu) wrote:

> In article <Pine.OSX.4.51.0...@svir.tencuvgrvznp.pbz>,
> Emily Jackson <m5comp@fastmail-REMOVE_THIS-.fm.invalid> wrote:
> > I wrote a shell script for Pine to use for viewing attachments:
> >
> > #!/bin/sh
> > open "$1"
> > sleep 5
> >
> > When Pine invokes this script (to view a .gif, for instance),
> > Preview.app starts up but no picture appears. I haven't been able to
> > figure out why this script doens't work as Pine's image viewer.
>
> Things are a bit more complicated. Allan Streib posted one solution
> here a few months ago; see
>
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=Pine.OSX.4.44.0207161623350.827-100000%40ranger.uits.indiana.edu

I tried the script referred to in that post; absolutely *nothing*
happens when the viewer is invoked.

David Sewell

не прочитано,
28 дек. 2002 г., 10:44:5428.12.2002
In article <Pine.OSX.4.51.02...@svir.tencuvgrvznp.pbz>,

Emily Jackson <m5comp@fastmail-REMOVE_THIS-.fm.invalid> wrote:
> On 23 Dec 2002, David Sewell (dse...@virginia.edu) wrote:
>
[...]

> > Things are a bit more complicated. Allan Streib posted one solution
> > here a few months ago; see
> >
> >
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=Pine.OSX.4.44.0207161623350.827-100000%40ranger.uits.indiana.edu
>
> I tried the script referred to in that post; absolutely *nothing*
> happens when the viewer is invoked.

Do you have a value for "mailcap-search-path" set in your .pinerc?
After I created a .mailcap file as in the posting, I set that value
to point to the file (giving the full pathname to the file).

Emily Jackson

не прочитано,
28 дек. 2002 г., 12:12:5128.12.2002

Yes, I have mailcap-search-path=~/.mailcap in my .pinerc. This is the
contents of my .mailcap:

# Attachment mappings for Pine
image/*; /usr/local/bin/openup %s

I am using the exact script copied from the post archived at Google
Groups, which I named openup. I also have
image-viewer=/usr/local/bin/openup in my .pinerc. After I tried and
failed to get pine to invoke the viewer this morning, I checked my
/var/tmp directory, and there was a file named img-GIF730700.7310, which
probably was the file that I was trying to view. It needed to have a
.gif suffix for open (which openup invokes) to work; I thought the
script was supposed to fix that.(?)

Thanks,

David Sewell

не прочитано,
28 дек. 2002 г., 17:34:4428.12.2002
In article <Pine.OSX.4.51.0...@svir.tencuvgrvznp.pbz>,

Emily Jackson <m5comp@fastmail-REMOVE_THIS-.fm.invalid> wrote:
> Yes, I have mailcap-search-path=~/.mailcap in my .pinerc. This is the
> contents of my .mailcap:
>
> # Attachment mappings for Pine
> image/*; /usr/local/bin/openup %s
>
> I am using the exact script copied from the post archived at Google
> Groups, which I named openup. I also have
> image-viewer=/usr/local/bin/openup in my .pinerc. After I tried and
> failed to get pine to invoke the viewer this morning, I checked my
> /var/tmp directory, and there was a file named img-GIF730700.7310, which
> probably was the file that I was trying to view. It needed to have a
> .gif suffix for open (which openup invokes) to work; I thought the
> script was supposed to fix that.(?)

Okay, I see where the problem is. There are a couple of ways to fix it.
In fact now that I look at my own setup, it looks like I may have run
into this problem already. At any rate, I have separate lines in my
.mailcap for each image type:

image/gif; /Users/me/bin/openit %s gif
image/jpeg; /Users/me/bin/openit %s jpg

This way, the "openit" script adds the proper file suffix to the file
that is passed to the "open" command, allowing "open" to know that it
needs to use Preview to open the file.

There are probably even better ways of handling the interactions among
Pine, MIME type and filename identifications, and OS X's "open" and
Launch Services, but I'm not enough of a guru to know what the optimal
solution is.

Emily Jackson

не прочитано,
31 дек. 2002 г., 06:10:0331.12.2002
On 28 Dec 2002, David Sewell (dse...@virginia.edu) wrote:

I edited my .mailcap as you suggested; it still doesn't work. I guess
I'll officially give up on this.:-((

Emily Jackson

не прочитано,
31 дек. 2002 г., 07:37:4031.12.2002
On 31 Dec 2002, kristian ragndahl (ragn...@postmaster.co.uk) wrote:

> Emily Jackson <m5comp@fastmail-REMOVE_THIS-.fm.invalid> wrote:
> : On 28 Dec 2002, David Sewell (dse...@virginia.edu) wrote:
> :
> :> > I am using the exact script copied from the post archived at Google


> :> > Groups, which I named openup. I also have
> :> > image-viewer=/usr/local/bin/openup in my .pinerc.
>

> :> There are probably even better ways of handling the interactions among


> :> Pine, MIME type and filename identifications, and OS X's "open" and
> :> Launch Services, but I'm not enough of a guru to know what the optimal
> :> solution is.
> :
> : I edited my .mailcap as you suggested; it still doesn't work. I guess
> : I'll officially give up on this.:-((
>

> You did make your 'openup' script executable, right?

Yes; when I type "which openup" at my shell prompt, I get
/usr/local/bin/openup.

Emily Jackson

не прочитано,
4 янв. 2003 г., 06:50:1504.01.2003
On 28 Dec 2002, David Sewell (dse...@virginia.edu) wrote:

> In article <Pine.OSX.4.51.0...@svir.tencuvgrvznp.pbz>,
> Emily Jackson <m5comp@fastmail-REMOVE_THIS-.fm.invalid> wrote:
> > Yes, I have mailcap-search-path=~/.mailcap in my .pinerc. This is the
> > contents of my .mailcap:
> >
> > # Attachment mappings for Pine
> > image/*; /usr/local/bin/openup %s
> >
> > I am using the exact script copied from the post archived at Google
> > Groups, which I named openup. I also have
> > image-viewer=/usr/local/bin/openup in my .pinerc. After I tried and
> > failed to get pine to invoke the viewer this morning, I checked my
> > /var/tmp directory, and there was a file named img-GIF730700.7310, which
> > probably was the file that I was trying to view. It needed to have a
> > .gif suffix for open (which openup invokes) to work; I thought the
> > script was supposed to fix that.(?)
>
> Okay, I see where the problem is. There are a couple of ways to fix it.
> In fact now that I look at my own setup, it looks like I may have run
> into this problem already. At any rate, I have separate lines in my
> .mailcap for each image type:
>
> image/gif; /Users/me/bin/openit %s gif
> image/jpeg; /Users/me/bin/openit %s jpg
>
> This way, the "openit" script adds the proper file suffix to the file
> that is passed to the "open" command, allowing "open" to know that it
> needs to use Preview to open the file.

I found a solution--sort of. I have installed a 3rd-party alternative to
open called launch, and I edited the openup script to call launch
instead of open (/sw/bin/launch -wc prvw $tmpfile) and to use Preview to
view the attachment. Preview opened but still did not display the
attachment because the proper suffix was not being added by the script.
I changed the program specified from Preview to GraphicConverter
(/sw/bin/launch -wc GKON $tmpfile), and since GraphicConverter can
display graphics files that do not have the proper suffix, this setup
works.

thufir

не прочитано,
8 янв. 2005 г., 16:12:1808.01.2005
David Sewell wrote:
> In article <Pine.OSX.4.51.0...@svir.tencuvgrvznp.pbz>,
> Emily Jackson <m5comp@fastmail-REMOVE_THIS-.fm.invalid> wrote:
[..]

> Okay, I see where the problem is. There are a couple of ways to fix
it.
> In fact now that I look at my own setup, it looks like I may have run
> into this problem already. At any rate, I have separate lines in my
> .mailcap for each image type:
>
> image/gif; /Users/me/bin/openit %s gif
> image/jpeg; /Users/me/bin/openit %s jpg
[..]

what's the win2k equivalent, please?


thanks,

Thufir Hawat

0 новых сообщений