Project

General

Profile

Bug #1136

exiv2 -ps (default) output does not respect the -g (--grep) option

Added by Robin Mills about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
documentation
Target version:
Start date:
13 Nov 2015
Due date:
% Done:

100%

Estimated time:
2.00 h

Description

The -g (--grep) option is applied to the keys of most output reports (such as -pa). However, it isn't applied when using the -pa (default) option.

The reason is because the -ps report is a summary and doesn't report in the Family.Key.Subkey data format. Example of -ps (the default)

1047 rmills@rmillsmbp:~/gnu/exiv2/0.24 $ exiv2 -ps ~/Downloads/YIMGP2303.DNG 
File name       : /Users/rmills/Downloads/YIMGP2303.DNG
File size       : 89857541 Bytes
MIME type       : image/tiff
Image size      : 8384 x 6208
Camera make     : RICOH IMAGING COMPANY, LTD.  
Camera model    : PENTAX 645Z        
Image timestamp : 2014:08:29 01:55:20
Image number    : 
Example of -pa output
1052 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -pa -g Lens  ~/Downloads/YIMGP2303.DNG 
Exif.PentaxDng.LensType                      Byte        4  smc PENTAX-FA 645 Macro 120mm F4
Exif.PentaxDng.LensInfo                      Undefined 128  0 139 160 90 0 7 3 192 0 0 0 0 0 0 0 0 31 180 43 56 0 116 5 79 131 193 138 120 164 129 63 5 255 255 255 7 3 116 4 111 0 186 9 116 4 109 0 27 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 207 160 2 96 7 235 234 0 4 255 64 60 250 2 3 138 236 104 132 8 146 68 170 98 146 131 128 3 58 80 112 17 206 231 15 180 182 164 144 71 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1053 rmills@rmillsmbp:~/gnu/exiv2/trunk $ 
I have examined the code in actions.cpp printSummary(). I think we should leave this alone as it is only intended to report a summary. If the user wished to filter this, he should use the system pipe grep.

I will add a sentence to the exiv2 man page to clarify this.


Related issues

Related to Exiv2 - Bug #1135: Read MakernotesClosed12 Nov 2015

Actions

Associated revisions

Revision 4017 (diff)
Added by Robin Mills about 6 years ago

#1136. Fix submitted. -g does not apply to -ps report. Clarification to man page that -g is only applied to keys.

Revision 4020 (diff)
Added by Robin Mills about 6 years ago

#1136. Fix submitted - see issue report for explanation.

History

#1

Updated by Robin Mills about 6 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100
  • Estimated time set to 1.00 h

Fix submitted: r4017.

#2

Updated by Robin Mills about 6 years ago

  • Estimated time changed from 1.00 h to 2.00 h

r4020 There is something else wrong here. This command appears to generating the

549 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -g a http://dev.exiv2.org/attachments/download/805/DSC_7154.jpg
Exif.Image.Make                              Ascii      18  NIKON CORPORATION
Exif.Image.Model                             Ascii      12  NIKON D5300
...
Is producing the output you would expect from the command
exiv2 -pa --grep a http://...
I think this is very confusing. We are changing the output report based on the use of parameter --grep and this behaviour has not been documented. I've changed the code appropriately and it passes the test suite.

#3

Updated by Robin Mills almost 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF