• 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: How to parse a block of text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to parse a block of text


  • Subject: Re: How to parse a block of text
  • From: Thomas Fischer <email@hidden>
  • Date: Thu, 08 May 2014 16:32:12 +0200

Hi Stefan,

did you look at exiftool's output options?
There is a csv-version available (-csv) which might give you the desired information as items.

Best
Thomas

Am 08.05.2014 um 14:59 schrieb email@hidden:

Hey,


Having a bit of a problem, trying to extract 20+ Exif-fields from a picture from an ordinary digital camera using the exiftool, http://owl.phy.queensu.ca/~phil/exiftool/


When running it from command line exiftool -a -G1 -s /Volumes/Warehouse/IMG_4712.JPG 


This is what is returned


[ExifTool]      ExifToolVersion                 : 9.42

[System]        FileName                        : IMG_4712.JPG

[System]        Directory                       : /Volumes/Warehouse/

[System]        FileSize                        : 2.4 MB

[System]        FileModifyDate                  : 2014:01:21 14:51:40+01:00

[System]        FileAccessDate                  : 2014:05:02 15:22:02+02:00

[System]        FileInodeChangeDate             : 2014:05:02 15:16:13+02:00

[System]        FilePermissions                 : rw-------

[File]          FileType                        : JPEG

[File]          MIMEType                        : image/jpeg

[File]          ExifByteOrder                   : Big-endian (Motorola, MM)

[File]          ImageWidth                      : 2592

[File]          ImageHeight                     : 1936

[File]          EncodingProcess                 : Baseline DCT, Huffman coding

[File]          BitsPerSample                   : 8

[File]          ColorComponents                 : 3

[File]          YCbCrSubSampling                : YCbCr4:2:0 (2 2)

[IFD0]          Make                            : Apple

[IFD0]          Model                           : iPhone 4

[IFD0]          Orientation                     : Rotate 90 CW

[IFD0]          XResolution                     : 72

[IFD0]          YResolution                     : 72

[IFD0]          ResolutionUnit                  : inches

[IFD0]          Software                        : 6.1.3

[IFD0]          ModifyDate                      : 2014:01:21 14:51:40

[IFD0]          YCbCrPositioning                : Centered

[ExifIFD]       ExposureTime                    : 1/15

[ExifIFD]       FNumber                         : 2.8

[ExifIFD]       ExposureProgram                 : Program AE

[ExifIFD]       ISO                             : 1000

[ExifIFD]       ExifVersion                     : 0221

[ExifIFD]       DateTimeOriginal                : 2014:01:21 14:51:40

[ExifIFD]       CreateDate                      : 2014:01:21 14:51:40

[ExifIFD]       ComponentsConfiguration         : Y, Cb, Cr, -

[ExifIFD]       ShutterSpeedValue               : 1/15

[ExifIFD]       ApertureValue                   : 2.8

[ExifIFD]       BrightnessValue                 : -1.262960357

[ExifIFD]       MeteringMode                    : Multi-segment

[ExifIFD]       Flash                           : Auto, Did not fire

[ExifIFD]       FocalLength                     : 3.9 mm

[ExifIFD]       SubjectArea                     : 1295 967 699 696

[ExifIFD]       FlashpixVersion                 : 0100

[ExifIFD]       ColorSpace                      : sRGB

[ExifIFD]       ExifImageWidth                  : 2592

[ExifIFD]       ExifImageHeight                 : 1936

[ExifIFD]       SensingMethod                   : One-chip color area

[ExifIFD]       ExposureMode                    : Auto

[ExifIFD]       WhiteBalance                    : Auto

[ExifIFD]       FocalLengthIn35mmFormat         : 35 mm

[ExifIFD]       SceneCaptureType                : Standard

[IFD1]          Compression                     : JPEG (old-style)

[IFD1]          XResolution                     : 72

[IFD1]          YResolution                     : 72

[IFD1]          ResolutionUnit                  : inches

[IFD1]          ThumbnailOffset                 : 688

[IFD1]          ThumbnailLength                 : 7171

[Composite]     Aperture                        : 2.8

[Composite]     ImageSize                       : 2592x1936

[Composite]     ScaleFactor35efl                : 9.1

[Composite]     ShutterSpeed                    : 1/15

[Composite]     ThumbnailImage                  : (Binary data 7171 bytes, use -b option to extract)

[Composite]     CircleOfConfusion               : 0.003 mm

[Composite]     FOV                             : 54.4 deg

[Composite]     FocalLength35efl                : 3.9 mm (35 mm equivalent: 35.0 mm)

[Composite]     HyperfocalDistance              : 1.60 m

[Composite]     LightValue                      : 3.6


Setting this result to a  string is not a problem, but how do i get certain rows out of this block ?


Have ran the unixcommand with a grep of desired row but accessing the file 20 times is too time-consuming, have also piped it to a textfile and and grep it from there but with same kind of slow result…


Anyone have an approach on how to solve this one !? =)


Thx for your time and have a great day !


/ Stefan

Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users This email sent to email@hidden
References: 
 >How to parse a block of text (From: email@hidden)

  • Prev by Date: Re: How to parse a block of text
  • Next by Date: Re: Mavericks and UI
  • Previous by thread: Re: How to parse a block of text
  • Next by thread: Re: How to parse a block of text
  • Index(es):
    • Date
    • Thread