-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to exclude or include specific tags while reading metadata #44
Comments
Removing tag values from the result isn't a supported operation. The current args are simply added to the command, which includes a lot of other required parameters, including Removing a few tags from a JSON parse call will be inconsequential in overall performance compared to running the perl interpreter in an external process. |
one suggestion, can you remove "-all" at the end by default in ReadTask rather it can be passed read method along with "-fast"(["-fast", "-all"]) in ExifTool. Let me know if you have any concerns with this approach. The issue is, I want to extract only specific attributes but it returns all attributes. // Comment out below code in readTask // add -all option in read() method of exifTool |
That will be a breaking change for anyone using the second parameter, so no.
I'd suggest that your use case is pretty specific--if you don't want all the tags you get from ExifTool, you should consider using a simpler metadata extraction library (that doesn't spawn perl!). Have you looked at how much time you're trying to save if you fetch the 20-odd tags in your list, rather than the full list? I'd be interested to know if the time saved was even measurable. If you still want to continue down this path, you'll need to
|
@subbagudipalli I thought of a way to implement this and not break the API. See https://exiftool-vendored.js.org/classes/exiftool.html#readraw |
Here is code snippet to create an instance of exif tool. From this command, am expecting only format tag should be returned from the response. However, am getting all tags.
var exiftool_vendored = require("exiftool-vendored")
//const exifTool = new exiftool_vendored.ExifTool()
const exifTool = new exiftool_vendored.ExifTool({ exiftoolArgs: ["-stay_open", "True","-format","-@", "-"] });
console.log(exifTool.options)
However, am getting the response using Exiftool command:
Exiftool -stay_open True -format
INDD file path
Response:
Format : application/x-indesign
I would like fetch only below metadata fields to avoid performance issues. I have tried passing only "format" attribute but that didn't work. can you let me know how to exclude or include specific tags?
var includeTags = ['subject',
'document_id',
'original_document_id',
'derived_from_document_id',
'derived_from_original_document_id',
'image*',
'format',
'thumbnail*',
'icc_profile_name',
'color*',
'file_size',
'file_type',
'creator*',
'drm*',
'x_resolution',
'y_resolution',
'file_type_extension',
'file_name']
The text was updated successfully, but these errors were encountered: