Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

album-exif-analyzer

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

album-exif-analyzer - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

32

index.js

@@ -6,5 +6,12 @@ #!/usr/bin/env node

const fs = require("fs");
// const cr2Raw = require("cr2-raw");
const filestream = readdirp(process.cwd(), {
fileFilter: ["*.png", "*.jpg", "*.jpeg", "*.cr2"],
fileFilter: (entry) => {
if (/\.(png|jp(e)?g|cr2)$/i.exec(entry.fullPath)) {
return true;
} else {
return false;
}
},
depth: 50,

@@ -14,3 +21,3 @@ });

let gotHeader = false;
const separator = "|";
const separator = ",";

@@ -37,7 +44,12 @@ const outputFile = `${Date.now()}-album-exif-analyzer.csv`;

}
let tempS;
if (Buffer.isBuffer(exifData[j][i])) {
s += exifData[j][i].toString("hex");
tempS = exifData[j][i].toString("hex");
} else {
s += exifData[j][i].toString();
tempS = exifData[j][i].toString();
}
if (tempS.includes(",")) {
tempS = `"${tempS}"`;
}
s += tempS;
}

@@ -58,8 +70,18 @@ s += "\n";

try {
data = await exif.read(entry.path);
if (/cr2/i.exec(entry.fullPath)) {
console.log(`CR2 format isn't supported currently; cannot parse ${entry.fullPath}`);
numProcessing--;
return;
// const o = cr2Raw(entry.fullPath).fetchMeta("exif");
} else {
data = await exif.read(entry.fullPath, true);
}
} catch (e) {
console.log(`No EXIF data in ${entry.fullPath}`);
numProcessing--;
return;
}
console.log(data);
if (data === null) {
console.log(`No EXIF data in ${entry.fullPath}`);
numProcessing--;

@@ -66,0 +88,0 @@ return;

3

package.json
{
"name": "album-exif-analyzer",
"version": "1.0.5",
"version": "1.0.6",
"description": "Recursively extracts EXIF data of all of the photos in a directory into a analyzable format",

@@ -10,2 +10,3 @@ "main": "index.js",

"dependencies": {
"cr2-raw": "^1.1.0",
"fast-exif": "^1.0.1",

@@ -12,0 +13,0 @@ "lock": "^1.1.0",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc