album-exif-analyzer
Advanced tools
Comparing version 1.0.2 to 1.0.3
35
index.js
@@ -7,3 +7,5 @@ #!/usr/bin/env node | ||
const filestream = readdirp(".", { | ||
console.log(process.cwd()); | ||
const filestream = readdirp(process.cwd(), { | ||
fileFilter: ["*.png", "*.jpg", "*.jpeg", "*.cr2"], | ||
@@ -21,18 +23,22 @@ depth: 50, | ||
filestream.on("end", () => { | ||
fs.writeFileSync(outputFile, header); | ||
let s = ""; | ||
for (let i = 0; i < exifData[0].length; i++) { | ||
for (let j = 0; j < exifData.length; j++) { | ||
if (j > 0) { | ||
s += separator; | ||
if (header && exifData.length > 0) { | ||
fs.writeFileSync(outputFile, header); | ||
let s = ""; | ||
for (let i = 0; i < exifData[0].length; i++) { | ||
for (let j = 0; j < exifData.length; j++) { | ||
if (j > 0) { | ||
s += separator; | ||
} | ||
if (Buffer.isBuffer(exifData[j][i])) { | ||
s += exifData[j][i].toString("hex"); | ||
} else { | ||
s += exifData[j][i].toString(); | ||
} | ||
} | ||
if (Buffer.isBuffer(exifData[j][i])) { | ||
s += exifData[j][i].toString("hex"); | ||
} else { | ||
s += exifData[j][i].toString(); | ||
} | ||
s += "\n"; | ||
} | ||
s += "\n"; | ||
fs.appendFileSync(outputFile, s); | ||
} else { | ||
console.log("No data found"); | ||
} | ||
fs.appendFileSync(outputFile, s); | ||
process.exit(); | ||
@@ -42,2 +48,3 @@ }); | ||
filestream.on("data", async (entry) => { | ||
console.log(entry.path); | ||
const data = await exif.read(entry.path); | ||
@@ -44,0 +51,0 @@ if (data === null) { |
{ | ||
"name": "album-exif-analyzer", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Recursively extracts EXIF data of all of the photos in a directory into a analyzable format", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3336
57