• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reading contents of a clipping file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading contents of a clipping file?


  • Subject: Re: Reading contents of a clipping file?
  • From: "Steven D.Majewski" <email@hidden>
  • Date: Fri, 12 Nov 2004 12:26:24 -0500


On Nov 12, 2004, at 7:45 AM, Rob Jorgensen wrote:

At 11:06 AM +0100 11/12/04, Emmanuel wrote:
At 8:05 AM +0100 11/12/04, Richard Rönnbäck wrote:

Is there any way to read the text of a clipping file?

Yes.

Is it stored in the resource fork ?

Yes.

If so, how do one read the resource
part?

One installs the Satimage osax.

Extra Suites (not free but reasonably priced) also reads resource files. Both do a fine job.


On OSX, you can also do it with Python  using the Carbon.Res module.
Example script below. If you wanted to call it from 'do shell script',
you could skip the arg processing and trim it down to a couple of lines

-- Steve Majewski

#!/usr/bin/python

from Carbon import Res
import sys

def getclipping( name ):
Res.FSOpenResFile( name, 0 )
return dict([ (t,Res.GetIndResource( t,1 ).data) for t in ( 'url ',
'urln', 'TEXT' ) ])


if __name__ == '__main__' :
for name in sys.argv[1:]: # for each file pathname in arglist
print name
for k,r in getclipping( name ).items(): print ' -',k,':',r





-- Steve Majewski - University of Virginia Alderman Library _______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Reading contents of a clipping file?
      • From: Emmanuel <email@hidden>
References: 
 >Reading contents of a clipping file? (From: Richard Rönnbäck <email@hidden>)
 >Re: Reading contents of a clipping file? (From: Emmanuel <email@hidden>)
 >Re: Reading contents of a clipping file? (From: Rob Jorgensen <email@hidden>)

  • Prev by Date: Re: computing 20! all the way
  • Next by Date: Re: Delete an item in a list ?
  • Previous by thread: Re: Reading contents of a clipping file?
  • Next by thread: Re: Reading contents of a clipping file?
  • Index(es):
    • Date
    • Thread