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 = {
|
||||
count: arr.length,
|
||||
itemTypes: [],
|
||||
extractedAt: new Date().toISOString(),
|
||||
//extractedAt: new Date().toISOString(),
|
||||
order: propertyName,
|
||||
};
|
||||
|
||||
@@ -482,10 +482,10 @@ async function processArrayProperty(outputPath, propertyName, arr) {
|
||||
let fileInfo;
|
||||
if (typeof item === 'string') {
|
||||
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) {
|
||||
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)
|
||||
for (const [key, value] of Object.entries(item)) {
|
||||
if (typeof value === 'string' && isXmlContent(value)) {
|
||||
@@ -496,7 +496,7 @@ async function processArrayProperty(outputPath, propertyName, arr) {
|
||||
}
|
||||
} else {
|
||||
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);
|
||||
@@ -569,7 +569,7 @@ async function processProperty(outputPath, propertyName, value) {
|
||||
*/
|
||||
async function createManifest(outputPath, data, processedProperties) {
|
||||
const manifest = {
|
||||
extractedAt: new Date().toISOString(),
|
||||
//extractedAt: new Date().toISOString(),
|
||||
scriptVersion: CONFIG.VERSION,
|
||||
properties: {},
|
||||
summary: {
|
||||
|
||||
Reference in New Issue
Block a user