exiftool_vendored 11.86.0 → 11.88.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of exiftool_vendored might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/bin/Changes +38 -16
- data/bin/MANIFEST +3 -0
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +34 -33
- data/bin/config_files/acdsee.config +1 -3
- data/bin/config_files/depthmap.config +56 -0
- data/bin/config_files/example.config +2 -0
- data/bin/config_files/gps2utm.config +1 -1
- data/bin/config_files/tiff_version.config +1 -1
- data/bin/exiftool +56 -39
- data/bin/fmt_files/gpx_wpt.fmt +1 -1
- data/bin/lib/Image/ExifTool.pm +32 -7
- data/bin/lib/Image/ExifTool.pod +53 -52
- data/bin/lib/Image/ExifTool/AIFF.pm +1 -1
- data/bin/lib/Image/ExifTool/Apple.pm +1 -1
- data/bin/lib/Image/ExifTool/BuildTagLookup.pm +3 -3
- data/bin/lib/Image/ExifTool/CanonVRD.pm +1 -1
- data/bin/lib/Image/ExifTool/DNG.pm +1 -1
- data/bin/lib/Image/ExifTool/Exif.pm +3 -3
- data/bin/lib/Image/ExifTool/FITS.pm +1 -1
- data/bin/lib/Image/ExifTool/FLIR.pm +5 -5
- data/bin/lib/Image/ExifTool/Flash.pm +1 -1
- data/bin/lib/Image/ExifTool/FlashPix.pm +1 -1
- data/bin/lib/Image/ExifTool/Font.pm +2 -2
- data/bin/lib/Image/ExifTool/FujiFilm.pm +23 -7
- data/bin/lib/Image/ExifTool/GIF.pm +1 -1
- data/bin/lib/Image/ExifTool/GeoTiff.pm +1 -1
- data/bin/lib/Image/ExifTool/ICC_Profile.pm +1 -1
- data/bin/lib/Image/ExifTool/JPEGDigest.pm +1 -1
- data/bin/lib/Image/ExifTool/MIE.pm +1 -1
- data/bin/lib/Image/ExifTool/Minolta.pm +1 -1
- data/bin/lib/Image/ExifTool/Nikon.pm +1 -1
- data/bin/lib/Image/ExifTool/NikonCustom.pm +2 -2
- data/bin/lib/Image/ExifTool/Olympus.pm +4 -2
- data/bin/lib/Image/ExifTool/PDF.pm +2 -2
- data/bin/lib/Image/ExifTool/PNG.pm +10 -5
- data/bin/lib/Image/ExifTool/Panasonic.pm +1 -1
- data/bin/lib/Image/ExifTool/Pentax.pm +3 -3
- data/bin/lib/Image/ExifTool/Photoshop.pm +1 -1
- data/bin/lib/Image/ExifTool/QuickTime.pm +9 -4
- data/bin/lib/Image/ExifTool/QuickTimeStream.pl +1 -1
- data/bin/lib/Image/ExifTool/README +51 -51
- data/bin/lib/Image/ExifTool/RIFF.pm +2 -2
- data/bin/lib/Image/ExifTool/RTF.pm +1 -1
- data/bin/lib/Image/ExifTool/Samsung.pm +1 -1
- data/bin/lib/Image/ExifTool/Sony.pm +1 -1
- data/bin/lib/Image/ExifTool/TagLookup.pm +1725 -1617
- data/bin/lib/Image/ExifTool/TagNames.pod +307 -9
- data/bin/lib/Image/ExifTool/Text.pm +59 -10
- data/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
- data/bin/lib/Image/ExifTool/WritePNG.pl +1 -1
- data/bin/lib/Image/ExifTool/WriteQuickTime.pl +27 -12
- data/bin/lib/Image/ExifTool/WriteXMP.pl +1 -1
- data/bin/lib/Image/ExifTool/Writer.pl +25 -7
- data/bin/lib/Image/ExifTool/XMP.pm +6 -1
- data/bin/lib/Image/ExifTool/XMP2.pl +213 -1
- data/bin/lib/Image/ExifTool/ZIP.pm +1 -1
- data/bin/perl-Image-ExifTool.spec +30 -30
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +3 -2
@@ -12,7 +12,7 @@ meta information extracted from or written to a file.
|
|
12
12
|
=head1 TAG TABLES
|
13
13
|
|
14
14
|
The tables listed below give the names of all tags recognized by ExifTool.
|
15
|
-
They contain a total of
|
15
|
+
They contain a total of 23338 tags, with 15293 unique tag names.
|
16
16
|
|
17
17
|
B<Tag ID>, B<Index#> or B<Sequence> is given in the first column of each
|
18
18
|
table. A B<Tag ID> is the computer-readable equivalent of a tag name, and
|
@@ -1225,6 +1225,7 @@ L<http://www.adobe.com/devnet/xmp/> for the official XMP specification.
|
|
1225
1225
|
creatorAtom XMP creatorAtom
|
1226
1226
|
crs XMP crs
|
1227
1227
|
dc XMP dc
|
1228
|
+
Device XMP Device
|
1228
1229
|
dex XMP dex
|
1229
1230
|
DICOM XMP DICOM
|
1230
1231
|
digiKam XMP digiKam
|
@@ -2390,6 +2391,291 @@ These tags belong to the ExifTool XMP-dc family 1 group.
|
|
2390
2391
|
Title lang-alt
|
2391
2392
|
Type string+
|
2392
2393
|
|
2394
|
+
=head3 XMP Device Tags
|
2395
|
+
|
2396
|
+
Google depth-map Device tags. See
|
2397
|
+
L<https://developer.android.com/training/camera2/Dynamic-depth-v1.0.pdf> for
|
2398
|
+
the specification.
|
2399
|
+
|
2400
|
+
These tags belong to the ExifTool XMP-Device family 1 group.
|
2401
|
+
|
2402
|
+
Tag Name Writable
|
2403
|
+
-------- --------
|
2404
|
+
AppInfo AppInfo Struct
|
2405
|
+
AppInfoApplication string_
|
2406
|
+
AppInfoItemURI string_
|
2407
|
+
AppInfoVersion string_
|
2408
|
+
Cameras DeviceCameras Struct+
|
2409
|
+
Camera DeviceCamera Struct_+
|
2410
|
+
CameraAppInfo AppInfo Struct_+
|
2411
|
+
CameraAppInfoApplication string_+
|
2412
|
+
CameraAppInfoItemURI string_+
|
2413
|
+
CameraAppInfoVersion string_+
|
2414
|
+
CameraDepthMap DeviceDepthMap Struct_+
|
2415
|
+
CameraDepthMapConfidenceURI string_+
|
2416
|
+
CameraDepthMapDepthURI string_+
|
2417
|
+
CameraDepthMapFar real_+
|
2418
|
+
CameraDepthMapFocalTable string_+
|
2419
|
+
CameraDepthMapFocalTableEntryCount integer_+
|
2420
|
+
CameraDepthMapFormat string_+
|
2421
|
+
CameraDepthMapItemSemantic string_+
|
2422
|
+
CameraDepthMapMeasureType string_+
|
2423
|
+
CameraDepthMapNear real_+
|
2424
|
+
CameraDepthMapSoftware string_+
|
2425
|
+
CameraDepthMapUnits string_+
|
2426
|
+
CameraImage DeviceImage Struct_+
|
2427
|
+
CameraImageItemSemantic string_+
|
2428
|
+
CameraImageItemURI string_+
|
2429
|
+
CameraImagingModel DeviceImagingModel Struct_+
|
2430
|
+
CameraImagingModelDistortion string_+
|
2431
|
+
CameraImagingModelDistortionCount integer_+
|
2432
|
+
CameraImagingModelFocalLengthX real_+
|
2433
|
+
CameraImagingModelFocalLengthY real_+
|
2434
|
+
CameraImagingModelImageHeight integer_+
|
2435
|
+
CameraImagingModelImageWidth integer_+
|
2436
|
+
CameraImagingModelPixelAspectRatio real_+
|
2437
|
+
CameraImagingModelPrincipalPointX real_+
|
2438
|
+
CameraImagingModelPrincipalPointY real_+
|
2439
|
+
CameraImagingModelSkew real_+
|
2440
|
+
CameraLightEstimate DeviceLightEstimate Struct_+
|
2441
|
+
CameraLightEstimateColorCorrectionB real_+
|
2442
|
+
CameraLightEstimateColorCorrectionG real_+
|
2443
|
+
CameraLightEstimateColorCorrectionR real_+
|
2444
|
+
CameraLightEstimatePixelIntensity real_+
|
2445
|
+
CameraPointCloud DevicePointCloud Struct_+
|
2446
|
+
CameraPointCloudMetric boolean_+
|
2447
|
+
CameraPointCloudPointCloud integer_+
|
2448
|
+
CameraPointCloudPoints string_+
|
2449
|
+
CameraPose Pose Struct_+
|
2450
|
+
CameraPosePositionX real_+
|
2451
|
+
CameraPosePositionY real_+
|
2452
|
+
CameraPosePositionZ real_+
|
2453
|
+
CameraPoseRotationW real_+
|
2454
|
+
CameraPoseRotationX real_+
|
2455
|
+
CameraPoseRotationY real_+
|
2456
|
+
CameraPoseRotationZ real_+
|
2457
|
+
CameraPoseTimestamp integer_+
|
2458
|
+
CameraTrait string_+
|
2459
|
+
CameraVendorInfo VendorInfo Struct_+
|
2460
|
+
CameraVendorInfoManufacturer string_+
|
2461
|
+
CameraVendorInfoModel string_+
|
2462
|
+
CameraVendorInfoNotes string_+
|
2463
|
+
Container DeviceContainer Struct
|
2464
|
+
ContainerDirectory DeviceDirectory Struct_+
|
2465
|
+
ContainerDirectoryItem DeviceItem Struct_+
|
2466
|
+
ContainerDirectoryItemDataURI string_+
|
2467
|
+
ContainerDirectoryItemLength integer_+
|
2468
|
+
ContainerDirectoryItemMime string_+
|
2469
|
+
ContainerDirectoryItemPadding integer_+
|
2470
|
+
EarthPos EarthPose Struct
|
2471
|
+
EarthPosAltitude real_
|
2472
|
+
EarthPosLatitude real_
|
2473
|
+
EarthPosLongitude real_
|
2474
|
+
EarthPosRotationW real_
|
2475
|
+
EarthPosRotationX real_
|
2476
|
+
EarthPosRotationY real_
|
2477
|
+
EarthPosRotationZ real_
|
2478
|
+
EarthPosTimestamp integer_
|
2479
|
+
Planes DevicePlanes Struct+
|
2480
|
+
Plane DevicePlane Struct_+
|
2481
|
+
PlaneBoundary string_+
|
2482
|
+
PlaneBoundaryVertexCount integer_+
|
2483
|
+
PlaneExtentX real_+
|
2484
|
+
PlaneExtentZ real_+
|
2485
|
+
PlanePose Pose Struct_+
|
2486
|
+
PlanePosePositionX real_+
|
2487
|
+
PlanePosePositionY real_+
|
2488
|
+
PlanePosePositionZ real_+
|
2489
|
+
PlanePoseRotationW real_+
|
2490
|
+
PlanePoseRotationX real_+
|
2491
|
+
PlanePoseRotationY real_+
|
2492
|
+
PlanePoseRotationZ real_+
|
2493
|
+
PlanePoseTimestamp integer_+
|
2494
|
+
Pose Pose Struct
|
2495
|
+
PosePositionX real_
|
2496
|
+
PosePositionY real_
|
2497
|
+
PosePositionZ real_
|
2498
|
+
PoseRotationW real_
|
2499
|
+
PoseRotationX real_
|
2500
|
+
PoseRotationY real_
|
2501
|
+
PoseRotationZ real_
|
2502
|
+
PoseTimestamp integer_
|
2503
|
+
Profiles DeviceProfiles Struct+
|
2504
|
+
Profile DeviceProfile Struct_+
|
2505
|
+
ProfileCameraIndices integer_+
|
2506
|
+
ProfileType string_+
|
2507
|
+
VendorInfo VendorInfo Struct
|
2508
|
+
VendorInfoManufacturer string_
|
2509
|
+
VendorInfoModel string_
|
2510
|
+
VendorInfoNotes string_
|
2511
|
+
|
2512
|
+
=head3 XMP AppInfo Struct
|
2513
|
+
|
2514
|
+
Field Name Writable
|
2515
|
+
---------- --------
|
2516
|
+
Application string
|
2517
|
+
ItemURI string
|
2518
|
+
Version string
|
2519
|
+
|
2520
|
+
=head3 XMP DeviceCameras Struct
|
2521
|
+
|
2522
|
+
Field Name Writable
|
2523
|
+
---------- --------
|
2524
|
+
Camera DeviceCamera Struct
|
2525
|
+
|
2526
|
+
=head3 XMP DeviceCamera Struct
|
2527
|
+
|
2528
|
+
Field Name Writable
|
2529
|
+
---------- --------
|
2530
|
+
AppInfo AppInfo Struct
|
2531
|
+
DepthMap DeviceDepthMap Struct
|
2532
|
+
Image DeviceImage Struct
|
2533
|
+
ImagingModel DeviceImagingModel Struct
|
2534
|
+
LightEstimate DeviceLightEstimate Struct
|
2535
|
+
PointCloud DevicePointCloud Struct
|
2536
|
+
Pose Pose Struct
|
2537
|
+
Trait string
|
2538
|
+
VendorInfo VendorInfo Struct
|
2539
|
+
|
2540
|
+
=head3 XMP DeviceDepthMap Struct
|
2541
|
+
|
2542
|
+
Field Name Writable
|
2543
|
+
---------- --------
|
2544
|
+
ConfidenceURI string
|
2545
|
+
DepthURI string
|
2546
|
+
Far real
|
2547
|
+
FocalTable string
|
2548
|
+
FocalTableEntryCount integer
|
2549
|
+
Format string
|
2550
|
+
ItemSemantic string
|
2551
|
+
MeasureType string
|
2552
|
+
Near real
|
2553
|
+
Software string
|
2554
|
+
Units string
|
2555
|
+
|
2556
|
+
=head3 XMP DeviceImage Struct
|
2557
|
+
|
2558
|
+
Field Name Writable
|
2559
|
+
---------- --------
|
2560
|
+
ItemSemantic string
|
2561
|
+
ItemURI string
|
2562
|
+
|
2563
|
+
=head3 XMP DeviceImagingModel Struct
|
2564
|
+
|
2565
|
+
Field Name Writable
|
2566
|
+
---------- --------
|
2567
|
+
Distortion string
|
2568
|
+
DistortionCount integer
|
2569
|
+
FocalLengthX real
|
2570
|
+
FocalLengthY real
|
2571
|
+
ImageHeight integer
|
2572
|
+
ImageWidth integer
|
2573
|
+
PixelAspectRatio real
|
2574
|
+
PrincipalPointX real
|
2575
|
+
PrincipalPointY real
|
2576
|
+
Skew real
|
2577
|
+
|
2578
|
+
=head3 XMP DeviceLightEstimate Struct
|
2579
|
+
|
2580
|
+
Field Name Writable
|
2581
|
+
---------- --------
|
2582
|
+
ColorCorrectionB real
|
2583
|
+
ColorCorrectionG real
|
2584
|
+
ColorCorrectionR real
|
2585
|
+
PixelIntensity real
|
2586
|
+
|
2587
|
+
=head3 XMP DevicePointCloud Struct
|
2588
|
+
|
2589
|
+
Field Name Writable
|
2590
|
+
---------- --------
|
2591
|
+
Metric boolean
|
2592
|
+
PointCloud integer
|
2593
|
+
Points string
|
2594
|
+
|
2595
|
+
=head3 XMP Pose Struct
|
2596
|
+
|
2597
|
+
Field Name Writable
|
2598
|
+
---------- --------
|
2599
|
+
PositionX real
|
2600
|
+
PositionY real
|
2601
|
+
PositionZ real
|
2602
|
+
RotationW real
|
2603
|
+
RotationX real
|
2604
|
+
RotationY real
|
2605
|
+
RotationZ real
|
2606
|
+
Timestamp integer
|
2607
|
+
|
2608
|
+
=head3 XMP VendorInfo Struct
|
2609
|
+
|
2610
|
+
Field Name Writable
|
2611
|
+
---------- --------
|
2612
|
+
Manufacturer string
|
2613
|
+
Model string
|
2614
|
+
Notes string
|
2615
|
+
|
2616
|
+
=head3 XMP DeviceContainer Struct
|
2617
|
+
|
2618
|
+
Field Name Writable
|
2619
|
+
---------- --------
|
2620
|
+
Directory DeviceDirectory Struct+
|
2621
|
+
|
2622
|
+
=head3 XMP DeviceDirectory Struct
|
2623
|
+
|
2624
|
+
Field Name Writable
|
2625
|
+
---------- --------
|
2626
|
+
Item DeviceItem Struct
|
2627
|
+
|
2628
|
+
=head3 XMP DeviceItem Struct
|
2629
|
+
|
2630
|
+
Field Name Writable
|
2631
|
+
---------- --------
|
2632
|
+
DataURI string
|
2633
|
+
Length integer
|
2634
|
+
Mime string
|
2635
|
+
Padding integer
|
2636
|
+
|
2637
|
+
=head3 XMP EarthPose Struct
|
2638
|
+
|
2639
|
+
Field Name Writable
|
2640
|
+
---------- --------
|
2641
|
+
Altitude real
|
2642
|
+
Latitude real
|
2643
|
+
Longitude real
|
2644
|
+
RotationW real
|
2645
|
+
RotationX real
|
2646
|
+
RotationY real
|
2647
|
+
RotationZ real
|
2648
|
+
Timestamp integer
|
2649
|
+
|
2650
|
+
=head3 XMP DevicePlanes Struct
|
2651
|
+
|
2652
|
+
Field Name Writable
|
2653
|
+
---------- --------
|
2654
|
+
Plane DevicePlane Struct
|
2655
|
+
|
2656
|
+
=head3 XMP DevicePlane Struct
|
2657
|
+
|
2658
|
+
Field Name Writable
|
2659
|
+
---------- --------
|
2660
|
+
Boundary string
|
2661
|
+
BoundaryVertexCount integer
|
2662
|
+
ExtentX real
|
2663
|
+
ExtentZ real
|
2664
|
+
Pose Pose Struct
|
2665
|
+
|
2666
|
+
=head3 XMP DeviceProfiles Struct
|
2667
|
+
|
2668
|
+
Field Name Writable
|
2669
|
+
---------- --------
|
2670
|
+
Profile DeviceProfile Struct
|
2671
|
+
|
2672
|
+
=head3 XMP DeviceProfile Struct
|
2673
|
+
|
2674
|
+
Field Name Writable
|
2675
|
+
---------- --------
|
2676
|
+
CameraIndices integer+
|
2677
|
+
Type string
|
2678
|
+
|
2393
2679
|
=head3 XMP dex Tags
|
2394
2680
|
|
2395
2681
|
Description Explorer namespace tags. These tags are not very common. The
|
@@ -3541,7 +3827,7 @@ These tags belong to the ExifTool XMP-photoshop family 1 group.
|
|
3541
3827
|
|
3542
3828
|
=head3 XMP PixelLive Tags
|
3543
3829
|
|
3544
|
-
PixelLive namespace tags. These tags are not writable
|
3830
|
+
PixelLive namespace tags. These tags are not writable because they are very
|
3545
3831
|
uncommon and I haven't been able to locate a reference which gives the
|
3546
3832
|
namespace URI.
|
3547
3833
|
|
@@ -9048,6 +9334,7 @@ Tags extracted from FLIR Public image Format (FPF) files.
|
|
9048
9334
|
0x1048 ColorChromeEffect int32s
|
9049
9335
|
0x1049 BWAdjustment int8s
|
9050
9336
|
0x104d CropMode int16u
|
9337
|
+
0x104e ColorChromeFXBlue int32s
|
9051
9338
|
0x1050 ShutterType int16u
|
9052
9339
|
0x1100 AutoBracketing int16u
|
9053
9340
|
0x1101 SequenceNumber int16u
|
@@ -22731,6 +23018,11 @@ other text chunks here. For this reason, when writing, ExifTool 11.63 and
|
|
22731
23018
|
later create new text chunks (including XMP) before IDAT, and move existing
|
22732
23019
|
text chunks to before IDAT.
|
22733
23020
|
|
23021
|
+
The PNG format contains CRC checksums that are validated when reading with
|
23022
|
+
either the Verbose or Validate option. When writing, these checksums are
|
23023
|
+
validated by default, but the FastScan option may be used to bypass this
|
23024
|
+
check if speed is more of a concern.
|
23025
|
+
|
22734
23026
|
Tag ID Tag Name Writable
|
22735
23027
|
------ -------- --------
|
22736
23028
|
'IHDR' ImageHeader PNG ImageHeader
|
@@ -22779,7 +23071,7 @@ text chunks to before IDAT.
|
|
22779
23071
|
|
22780
23072
|
=head3 PNG AnimationControl Tags
|
22781
23073
|
|
22782
|
-
Tags found in the Animation
|
23074
|
+
Tags found in the Animation Control chunk. See
|
22783
23075
|
L<https://wiki.mozilla.org/APNG_Specification> for details.
|
22784
23076
|
|
22785
23077
|
Index4 Tag Name Writable
|
@@ -33328,19 +33620,24 @@ name. See L<http://tools.ietf.org/html/rfc5545> for the official iCalendar
|
|
33328
33620
|
=head2 Text Tags
|
33329
33621
|
|
33330
33622
|
Although basic text files contain no metadata, the following tags are
|
33331
|
-
determined from a simple analysis of the
|
33332
|
-
are generated only for 8-bit encodings, but the FastScan (-fast)
|
33333
|
-
be used to limit processing to the first 64 kB in which case
|
33334
|
-
are not produced. To avoid long processing delays, ExifTool will issue
|
33335
|
-
minor warning and process only the first 64 kB of any file larger than 20
|
33336
|
-
unless the IgnoreMinorErrors (-m)
|
33623
|
+
determined from a simple analysis of the data in TXT and CSV files.
|
33624
|
+
Statistics are generated only for 8-bit encodings, but the FastScan (-fast)
|
33625
|
+
option may be used to limit processing to the first 64 kB in which case some
|
33626
|
+
tags are not produced. To avoid long processing delays, ExifTool will issue
|
33627
|
+
a minor warning and process only the first 64 kB of any file larger than 20
|
33628
|
+
MB unless the IgnoreMinorErrors (-m)
|
33629
|
+
option is used.
|
33337
33630
|
|
33338
33631
|
Tag Name Writable
|
33339
33632
|
-------- --------
|
33340
33633
|
ByteOrderMark no
|
33634
|
+
ColumnCount no
|
33635
|
+
Delimiter no
|
33341
33636
|
LineCount no
|
33342
33637
|
MIMEEncoding no
|
33343
33638
|
Newlines no
|
33639
|
+
Quoting no
|
33640
|
+
RowCount no
|
33344
33641
|
WordCount no
|
33345
33642
|
|
33346
33643
|
=head2 RSRC Tags
|
@@ -33852,6 +34149,7 @@ FileName.
|
|
33852
34149
|
SymLink - yes!
|
33853
34150
|
TestName - yes!
|
33854
34151
|
ThumbnailImage File no
|
34152
|
+
Trailer File yes!
|
33855
34153
|
Validate ExifTool no
|
33856
34154
|
Warning ExifTool no
|
33857
34155
|
XMP XMP yes!
|
@@ -1,9 +1,10 @@
|
|
1
1
|
#------------------------------------------------------------------------------
|
2
2
|
# File: Text.pm
|
3
3
|
#
|
4
|
-
# Description: Deduce characteristics of
|
4
|
+
# Description: Deduce characteristics of TXT and CSV files
|
5
5
|
#
|
6
6
|
# Revisions: 2019-11-01 - P. Harvey Created
|
7
|
+
# 2020-02-13 - PH Added CSV file support
|
7
8
|
#
|
8
9
|
# References: 1) https://github.com/file/file
|
9
10
|
#------------------------------------------------------------------------------
|
@@ -15,7 +16,7 @@ use vars qw($VERSION);
|
|
15
16
|
use Image::ExifTool qw(:DataAccess :Utils);
|
16
17
|
use Image::ExifTool::XMP;
|
17
18
|
|
18
|
-
$VERSION = '1.
|
19
|
+
$VERSION = '1.03';
|
19
20
|
|
20
21
|
# Text tags
|
21
22
|
%Image::ExifTool::Text::Main = (
|
@@ -23,12 +24,13 @@ $VERSION = '1.01';
|
|
23
24
|
GROUPS => { 0 => 'File', 1 => 'File', 2 => 'Document' },
|
24
25
|
NOTES => q{
|
25
26
|
Although basic text files contain no metadata, the following tags are
|
26
|
-
determined from a simple analysis of the
|
27
|
-
are generated only for 8-bit encodings, but the L<FastScan|../ExifTool.html#FastScan> (-fast)
|
28
|
-
be used to limit processing to the first 64 kB in which case
|
29
|
-
are not produced. To avoid long processing delays, ExifTool will issue
|
30
|
-
minor warning and process only the first 64 kB of any file larger than 20
|
31
|
-
unless the L<IgnoreMinorErrors|../ExifTool.html#IgnoreMinorErrors> (-m)
|
27
|
+
determined from a simple analysis of the data in TXT and CSV files.
|
28
|
+
Statistics are generated only for 8-bit encodings, but the L<FastScan|../ExifTool.html#FastScan> (-fast)
|
29
|
+
option may be used to limit processing to the first 64 kB in which case some
|
30
|
+
tags are not produced. To avoid long processing delays, ExifTool will issue
|
31
|
+
a minor warning and process only the first 64 kB of any file larger than 20
|
32
|
+
MB unless the L<IgnoreMinorErrors|../ExifTool.html#IgnoreMinorErrors> (-m)
|
33
|
+
option is used.
|
32
34
|
},
|
33
35
|
MIMEEncoding => { Groups => { 2 => 'Other' } },
|
34
36
|
Newlines => {
|
@@ -42,6 +44,10 @@ $VERSION = '1.01';
|
|
42
44
|
ByteOrderMark => { PrintConv => { 0 => 'No', 1 => 'Yes' } },
|
43
45
|
LineCount => { },
|
44
46
|
WordCount => { },
|
47
|
+
Delimiter => { PrintConv => { '' => '(none)', ',' => 'Comma', ';' => 'Semicolon', "\t" => 'Tab' }},
|
48
|
+
Quoting => { PrintConv => { '' => '(none)', '"' => 'Double quotes', "'" => 'Single quotes' }},
|
49
|
+
RowCount => { },
|
50
|
+
ColumnCount => { },
|
45
51
|
);
|
46
52
|
|
47
53
|
#------------------------------------------------------------------------------
|
@@ -116,6 +122,49 @@ sub ProcessTXT($$)
|
|
116
122
|
$et->HandleTag($tagTablePtr, Newlines => $nl);
|
117
123
|
|
118
124
|
return 1 if $fast or not defined $isUTF8;
|
125
|
+
#
|
126
|
+
# generate stats for CSV files
|
127
|
+
#
|
128
|
+
if ($$et{FileType} eq 'CSV') {
|
129
|
+
my ($delim, $quot, $ncols);
|
130
|
+
my $nrows = 0;
|
131
|
+
while ($raf->ReadLine($buff)) {
|
132
|
+
if (not defined $delim) {
|
133
|
+
my %count = ( ',' => 0, ';' => 0, "\t" => 0 );
|
134
|
+
++$count{$_} foreach $buff =~ /[,;\t]/g;
|
135
|
+
if ($count{','} > $count{';'} and $count{','} > $count{"\t"}) {
|
136
|
+
$delim = ',';
|
137
|
+
} elsif ($count{';'} > $count{"\t"}) {
|
138
|
+
$delim = ';';
|
139
|
+
} elsif ($count{"\t"}) {
|
140
|
+
$delim = "\t";
|
141
|
+
} else {
|
142
|
+
$delim = '';
|
143
|
+
$ncols = 1;
|
144
|
+
}
|
145
|
+
unless ($ncols) {
|
146
|
+
# account for delimiters in quotes (simplistically)
|
147
|
+
while ($buff =~ /(^|$delim)(["'])(.*?)\2(?=$delim|$)/sg) {
|
148
|
+
$quot = $2;
|
149
|
+
my $field = $3;
|
150
|
+
$count{$delim} -= () = $field =~ /$delim/g;
|
151
|
+
}
|
152
|
+
$ncols = $count{$delim} + 1;
|
153
|
+
}
|
154
|
+
} elsif (not $quot) {
|
155
|
+
$quot = $2 if $buff =~ /(^|$delim)(["'])(.*?)\2(?=$delim|$)/sg;
|
156
|
+
}
|
157
|
+
if (++$nrows == 1000 and $et->Warn('Not counting rows past 1000', 2)) {
|
158
|
+
undef $nrows;
|
159
|
+
last;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
$et->HandleTag($tagTablePtr, Delimiter => ($delim || ''));
|
163
|
+
$et->HandleTag($tagTablePtr, Quoting => ($quot || ''));
|
164
|
+
$et->HandleTag($tagTablePtr, ColumnCount => $ncols);
|
165
|
+
$et->HandleTag($tagTablePtr, RowCount => $nrows) if $nrows;
|
166
|
+
return 1;
|
167
|
+
}
|
119
168
|
return 1 if $$et{VALUE}{FileSize} and $$et{VALUE}{FileSize} > 20000000 and
|
120
169
|
$et->Warn('Not counting lines/words in text file larger than 20 MB', 2);
|
121
170
|
#
|
@@ -128,7 +177,7 @@ sub ProcessTXT($$)
|
|
128
177
|
++$lines;
|
129
178
|
++$words while $buff =~ /\S+/g;
|
130
179
|
if (not $nl and $buff =~ /(\r\n|\r|\n)$/) {
|
131
|
-
# (the first line must have been longer than
|
180
|
+
# (the first line must have been longer than 64 kB)
|
132
181
|
$$et{VALUE}{Newlines} = $nl = $1;
|
133
182
|
}
|
134
183
|
next if $raf->Tell() < 65536;
|
@@ -170,7 +219,7 @@ This module is used by Image::ExifTool
|
|
170
219
|
=head1 DESCRIPTION
|
171
220
|
|
172
221
|
This module contains definitions required by Image::ExifTool to deduce some
|
173
|
-
characteristics of
|
222
|
+
characteristics of TXT and CSV files.
|
174
223
|
|
175
224
|
=head1 AUTHOR
|
176
225
|
|