remove extraction date
fix index of some sorted properties
This commit is contained in:
@@ -437,7 +437,7 @@ async function processArrayProperty(outputPath, propertyName, arr) {
|
|||||||
const indexData = {
|
const indexData = {
|
||||||
count: arr.length,
|
count: arr.length,
|
||||||
itemTypes: [],
|
itemTypes: [],
|
||||||
extractedAt: new Date().toISOString(),
|
//extractedAt: new Date().toISOString(),
|
||||||
order: propertyName,
|
order: propertyName,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -482,10 +482,10 @@ async function processArrayProperty(outputPath, propertyName, arr) {
|
|||||||
let fileInfo;
|
let fileInfo;
|
||||||
if (typeof item === 'string') {
|
if (typeof item === 'string') {
|
||||||
fileInfo = await saveStringProperty(dirPath, itemName, item);
|
fileInfo = await saveStringProperty(dirPath, itemName, item);
|
||||||
indexData.itemTypes.push({ index: originalIndex, type: fileInfo.type, fileName: `${itemName}.${fileInfo.type}` });
|
indexData.itemTypes.push({ index: sortedIndex, type: fileInfo.type, fileName: `${itemName}.${fileInfo.type}` });
|
||||||
} else if (typeof item === 'object' && item !== null) {
|
} else if (typeof item === 'object' && item !== null) {
|
||||||
fileInfo = await saveJsonProperty(dirPath, itemName, item);
|
fileInfo = await saveJsonProperty(dirPath, itemName, item);
|
||||||
indexData.itemTypes.push({ index: originalIndex, type: 'json', fileName: `${itemName}.json` });
|
indexData.itemTypes.push({ index: sortedIndex, type: 'json', fileName: `${itemName}.json` });
|
||||||
// Additional processing for some items (e.g. extract XML from strings inside objects)
|
// Additional processing for some items (e.g. extract XML from strings inside objects)
|
||||||
for (const [key, value] of Object.entries(item)) {
|
for (const [key, value] of Object.entries(item)) {
|
||||||
if (typeof value === 'string' && isXmlContent(value)) {
|
if (typeof value === 'string' && isXmlContent(value)) {
|
||||||
@@ -496,7 +496,7 @@ async function processArrayProperty(outputPath, propertyName, arr) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fileInfo = await saveJsonProperty(dirPath, itemName, item);
|
fileInfo = await saveJsonProperty(dirPath, itemName, item);
|
||||||
indexData.itemTypes.push({ index: originalIndex, type: typeof item, fileName: `${itemName}.json` });
|
indexData.itemTypes.push({ index: sortedIndex, type: typeof item, fileName: `${itemName}.json` });
|
||||||
}
|
}
|
||||||
|
|
||||||
result.files.push(fileInfo.filepath);
|
result.files.push(fileInfo.filepath);
|
||||||
@@ -569,7 +569,7 @@ async function processProperty(outputPath, propertyName, value) {
|
|||||||
*/
|
*/
|
||||||
async function createManifest(outputPath, data, processedProperties) {
|
async function createManifest(outputPath, data, processedProperties) {
|
||||||
const manifest = {
|
const manifest = {
|
||||||
extractedAt: new Date().toISOString(),
|
//extractedAt: new Date().toISOString(),
|
||||||
scriptVersion: CONFIG.VERSION,
|
scriptVersion: CONFIG.VERSION,
|
||||||
properties: {},
|
properties: {},
|
||||||
summary: {
|
summary: {
|
||||||
|
|||||||
Reference in New Issue
Block a user