Fix sixeof
This commit is contained in:
parent
d5b21a137e
commit
175dca1670
|
@ -1,47 +1,15 @@
|
|||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("dotenv/config");
|
||||
const log_1 = require("./log");
|
||||
const promises_1 = require("fs/promises");
|
||||
const path_1 = require("path");
|
||||
const sizeOf = __importStar(require("image-size"));
|
||||
const util_1 = require("util");
|
||||
const shell_1 = require("./shell");
|
||||
const files3_1 = require("./files3");
|
||||
const env_1 = require("./env");
|
||||
const db_1 = require("./db");
|
||||
const sizeOf = (0, util_1.promisify)(require('image-size'));
|
||||
class Generate {
|
||||
constructor() {
|
||||
this.inbox = (0, env_1.envString)('INBOX', '~/Photos/toprocess');
|
||||
|
@ -145,7 +113,7 @@ class Generate {
|
|||
//2024_12_02_35mm_Kodak-Gold-200_Somerville-MA_Walk-with-Charlie#000061280009.tif
|
||||
parseFilename(filename) {
|
||||
const halves = filename.split('#');
|
||||
const parts = halves[0].split('');
|
||||
const parts = halves[0].split('_');
|
||||
let meta = {};
|
||||
for (let i = 0; i < parts.length; i++) {
|
||||
switch (i) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yBAAuB;AACvB,+BAAkC;AAElC,0CAA0D;AAC1D,+BAAsC;AACtC,mDAAqC;AAErC,mCAAgC;AAEhC,qCAAiC;AACjC,+BAAkC;AAClC,6BAA0B;AAe1B,MAAM,QAAQ;IAQb;QALQ,UAAK,GAAY,IAAA,eAAS,EAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;QAC1D,WAAM,GAAY,IAAA,eAAS,EAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;QAKnE,IAAI,CAAC,GAAG,GAAG,IAAA,eAAS,EAAC,UAAU,CAAC,CAAC;QACjC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;QAChD,IAAI,CAAC,EAAE,GAAG,IAAI,OAAE,EAAE,CAAC;QACnB,IAAI,CAAC,EAAE,GAAG,IAAI,eAAM,CAAC,IAAA,eAAS,EAAC,WAAW,EAAE,mBAAmB,CAAC,EAAE,IAAI,CAAC,CAAC;QACxE,IAAI,CAAC,QAAQ,EAAE,CAAC;IACjB,CAAC;IAEO,KAAK,CAAC,QAAQ;QACrB,eAAe;QAEf,MAAM;QACN,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QACxB,UAAU;IAC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L,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBACjD,MAAM;YACR,CAAC;QACF,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AAED,IAAI,QAAQ,EAAE,CAAC"}
|
|
@ -3,7 +3,6 @@ import { createLog } from './log';
|
|||
import type { Logger } from 'winston';
|
||||
import { readFile, readdir, realpath } from 'fs/promises';
|
||||
import { join, basename } from 'path';
|
||||
import * as sizeOf from 'image-size';
|
||||
import { promisify } from 'util';
|
||||
import { Shell } from './shell';
|
||||
import { hash } from './hash';
|
||||
|
@ -11,6 +10,8 @@ import { Files3 } from './files3'
|
|||
import { envString } from './env';
|
||||
import { DB } from './db';
|
||||
|
||||
const sizeOf = promisify(require('image-size'));
|
||||
|
||||
interface Metadata {
|
||||
year? : number;
|
||||
month? : number;
|
||||
|
@ -144,7 +145,7 @@ class Generate {
|
|||
|
||||
private parseFilename (filename : string) : Metadata {
|
||||
const halves : string[] = filename.split('#')
|
||||
const parts : string[] = halves[0].split('');
|
||||
const parts : string[] = halves[0].split('_');
|
||||
let meta : Metadata = {};
|
||||
for (let i = 0; i < parts.length; i++) {
|
||||
switch (i) {
|
||||
|
|
Loading…
Reference in New Issue