diff --git a/app/actions.cpp b/app/actions.cpp index 1f5502dd..0cb99382 100644 --- a/app/actions.cpp +++ b/app/actions.cpp @@ -498,6 +498,12 @@ bool Print::printMetadatum(const Exiv2::Metadatum& md, const Exiv2::Image* pImag first = false; std::cout << std::setw(30) << std::setfill(' ') << std::left << md.tagLabel(); } + if (Params::instance().printItems_ & Params::prDesc) { + if (!first) + std::cout << " "; + first = false; + std::cout << std::setw(30) << std::setfill(' ') << std::left << md.tagDesc(); + } if (Params::instance().printItems_ & Params::prType) { if (!first) std::cout << " "; diff --git a/app/exiv2.cpp b/app/exiv2.cpp index 6f04e6e3..12e1d434 100644 --- a/app/exiv2.cpp +++ b/app/exiv2.cpp @@ -283,14 +283,16 @@ void Params::help(std::ostream& os) const { << _(" X : Extract \"raw\" XMP\n") << _(" -P flgs Print flags for fine control of tag lists ('print' action):\n") << _(" E : Exif tags\n") << _(" I : IPTC tags\n") << _(" X : XMP tags\n") - << _(" x : Tag number (Exif and IPTC only)\n") + << _(" x : Tag number for Exif or IPTC tags (in hexadecimal)\n") << _(" g : Group name (e.g. Exif.Photo.UserComment, Photo)\n") << _(" k : Key (e.g. Exif.Photo.UserComment)\n") << _(" l : Tag label (e.g. Exif.Photo.UserComment, 'User comment')\n") + << _(" d : Tag description\n") << _(" n : Tag name (e.g. Exif.Photo.UserComment, UserComment)\n") << _(" y : Type\n") - << _(" c : Number of components (count)\n") - << _(" s : Size in bytes (Ascii and Comment types include NULL)\n") - << _(" v : Plain data value, untranslated (vanilla)\n") + << _(" y : Type\n") << _(" c : Number of components (count)\n") + << _(" s : Size in bytes of vanilla value (may include NULL)\n") + << _(" v : Plain data value of untranslated (vanilla)\n") + << _(" V : Plain data value, data type and the word 'set'\n") << _(" t : Interpreted (translated) human readable values\n") << _(" h : Hex dump of the data\n") << _(" -d tgt1 Delete target(s) for the 'delete' action. Possible targets are:\n") @@ -720,6 +722,9 @@ int Params::evalPrintFlags(const std::string& optArg) { case 'V': printItems_ |= prSet | prKey | prType | prValue; break; + case 'd': + printItems_ |= prDesc; + break; default: std::cerr << progname() << ": " << _("Unrecognized print item") << " `" << i << "'\n"; rc = 1; diff --git a/app/exiv2app.hpp b/app/exiv2app.hpp index 5c278f9a..02fd72fc 100644 --- a/app/exiv2app.hpp +++ b/app/exiv2app.hpp @@ -151,7 +151,8 @@ class Params : public Util::Getopt { prValue = 256, prTrans = 512, prHex = 1024, - prSet = 2048 + prSet = 2048, + prDesc = 4096 }; //! Enumerates common targets, bitmap diff --git a/exiv2.md b/exiv2.md index 6049327f..86dd7fd2 100644 --- a/exiv2.md +++ b/exiv2.md @@ -566,34 +566,33 @@ as well as data columns included in the print output. Valid flags are: | g | Group name (e.g., for Exif.Photo.UserComment, outputs Photo) | | k | Key (e.g., Exif.Photo.UserComment) | | l | Tag label (human-readable tagname, e.g., for Exif.Photo.UserComment, outputs 'User comment') | -| n | Tagname (e.g., for Exif.Photo.UserComment, outputs UserComment) | +| d | Tag description | +| n | Tag name (e.g., for Exif.Photo.UserComment, outputs UserComment) | | y | Type (for available types, see [Exif/IPTC/XMP types](#exiv2_types)) | | c | Number of components (for single entry types, the number of **sizeof('type')** in 'size'. For multi-entry types, the number of entries. See [Exif/IPTC/XMP types](#exiv2_types)) | | s | Size in bytes of vanilla output (see note in [Exif 'Comment' values](#exif_comment_values)). Some types include a *NULL* character in the size (see [Exif/IPTC/XMP types](#exiv2_types)) | | v | Plain data value (vanilla values, i.e., untranslated) | -| V | Plain data value, data type and the word 'set ' (see ['MODIFY' COMMANDS](#modify_cmds))| +| V | Plain data value, data type and the word 'set' (see ['MODIFY' COMMANDS](#modify_cmds))| | t | Interpreted (translated) human-readable data values (includes plain vanilla values) | | h | Hex dump of the data | +**--Print** *flgs* can be combined with [--grep str](#grep_str) or +[--key key](#key_key) to further filter the output. +