- corretto footer catalogo
- corretti il path delle immagini (quando hanno lo spazio nel nomefile). - aggiunto colore di sfondo per il testo descrittivo, in trasparenza
This commit is contained in:
@@ -73,6 +73,7 @@ const CatalogSchema = new Schema({
|
||||
pagina_introduttiva_sfondo_nero: {
|
||||
type: Boolean,
|
||||
},
|
||||
backcolor: String,
|
||||
|
||||
pdf_generato: String,
|
||||
pdf_generato_stampa: String,
|
||||
|
||||
@@ -49,7 +49,6 @@ class CronMod {
|
||||
|
||||
const AmazonBookScraper = require('../modules/Scraping');
|
||||
|
||||
|
||||
let mystr = "";
|
||||
|
||||
try {
|
||||
@@ -59,8 +58,8 @@ class CronMod {
|
||||
} else if (mydata.dbop === "ScraperMultipleDataAmazon") {
|
||||
mystr = await AmazonBookScraper.ScraperMultipleDataAmazon(idapp, {update: true, aggiornasoloSeVuoti: true, forzaricarica: false});
|
||||
ris = { mystr };
|
||||
} else if (mydata.dbop === "ScraperMultipleDataDBStored") {
|
||||
mystr = await AmazonBookScraper.ScraperMultipleDataDBStored(idapp, {update: true, aggiornasoloSeVuoti: true, forzaricarica: false, dbstored: true});
|
||||
} else if (mydata.dbop === "ScraperEstraiDatiAmazon-NoUpdate") {
|
||||
mystr = await AmazonBookScraper.ScraperMultipleDataAmazon(idapp, {update: false, aggiornasoloSeVuoti: false, forzaricarica: true, caricatutti: true});
|
||||
ris = { mystr };
|
||||
} else if (mydata.dbop === "ScraperGeneraCSV") {
|
||||
mystr = await AmazonBookScraper.ScraperGeneraCSV(idapp, mydata.options, res);
|
||||
|
||||
@@ -474,7 +474,7 @@ class AmazonBookScraper {
|
||||
let isbn = product.isbn;
|
||||
|
||||
if (this.includiNelControlloIlRecProduct(product)) {
|
||||
if (this.datiMancanti(product)) {
|
||||
if (this.datiMancanti(product) || options.caricatutti) {
|
||||
// console.log(`${quanti} / ${products.length} - Scraping: ${product.idProductInfo.name}`);
|
||||
const data = await this.scrapeISBN(product, isbn, options);
|
||||
|
||||
|
||||
@@ -2353,6 +2353,7 @@ function uploadFile(req, res, version) {
|
||||
// Create Dir if doesn't exist:
|
||||
const rismk = await tools.mkdirpath(mydir);
|
||||
|
||||
|
||||
let filename = file.originalFilename;
|
||||
let ext = path.extname(filename);
|
||||
|
||||
@@ -2389,7 +2390,8 @@ function uploadFile(req, res, version) {
|
||||
// allora mi conviene che lo faccio dopo, manualmente.
|
||||
|
||||
console.log('Dovresti copiare fromfile', fromfile, 'tofile', tofile);
|
||||
console.log('sudo cp -R ' + fromfile + ' ' + tofile);
|
||||
console.log('sudo cp -R \'' + fromfile + '\' \'' + tofile + '\'');
|
||||
await tools.execScriptNoOutput('sudo cp -R \'' + fromfile + '\' \'' + tofile + '\'');
|
||||
// await tools.execScriptNoOutput('sudo cp -R ' + fromfile + ' ' + tofile)
|
||||
res.end();
|
||||
return;
|
||||
|
||||
@@ -456,7 +456,6 @@ module.exports = {
|
||||
MYAPPS: [],
|
||||
INITDB_FIRSTIME: true,
|
||||
ACAPO: '\n',
|
||||
|
||||
|
||||
ENABLE_CRONTAB: 'CRONTAB',
|
||||
UPDATE_GRADUATORIA: 'UPDATE_GRAD',
|
||||
@@ -560,7 +559,6 @@ module.exports = {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
gettranslate: function (text, lang) {
|
||||
try {
|
||||
@@ -590,7 +588,7 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
|
||||
getres__: function(text, res) {
|
||||
getres__: function (text, res) {
|
||||
let lang = this.getlangbyres(res);
|
||||
try {
|
||||
return textlang[lang][text];
|
||||
@@ -4632,18 +4630,18 @@ module.exports = {
|
||||
});
|
||||
});
|
||||
},
|
||||
execScriptNoOutput: async function (script) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
execScriptNoOutput: function (script) {
|
||||
return new Promise((resolve, reject) => {
|
||||
console.log('execScriptNoOutput:', script);
|
||||
exec(script, async (error, stdout, stderr) => {
|
||||
// Aggiunto async qui
|
||||
exec(script, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error(`error: ${error}`);
|
||||
console.error(`Exec error: ${error.message}`);
|
||||
return reject(error);
|
||||
}
|
||||
if (stderr) {
|
||||
console.error(`stderr: ${stderr}`);
|
||||
console.warn(`Stderr (non bloccante): ${stderr}`);
|
||||
}
|
||||
resolve(!error && !stderr);
|
||||
resolve(true);
|
||||
});
|
||||
});
|
||||
},
|
||||
@@ -5908,7 +5906,6 @@ module.exports = {
|
||||
dirmain = server_constants.DIR_PUBLIC_LOCALE;
|
||||
}
|
||||
|
||||
|
||||
/*if (true) {
|
||||
const prova = await this.isFileExistsAsync('prova');
|
||||
console.log('PROVA:', prova);
|
||||
@@ -5977,6 +5974,7 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let fileesistente = false;
|
||||
if (productInfo.imagefile) {
|
||||
// controlla se esiste il file
|
||||
@@ -6118,5 +6116,5 @@ module.exports = {
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.2.48
|
||||
1.2.49
|
||||
Reference in New Issue
Block a user