fix pngquant for linux-x64

This commit is contained in:
zadam 2019-06-23 09:10:06 +02:00
parent 154a575701
commit 6833e84d55
2 changed files with 8 additions and 3 deletions

View file

@ -7,6 +7,9 @@ rm -r node_modules/sqlite3/lib/binding/*
cp -r bin/deps/linux-x64/sqlite/* node_modules/sqlite3/lib/binding/
# rebuild binaries for image operations (pngquant ...)
npm rebuild
./node_modules/.bin/electron-packager . --asar --out=dist --executable-name=trilium --platform=linux --arch=x64 --overwrite
mv "./dist/Trilium Notes-linux-x64" $BUILD_DIR

View file

@ -8,7 +8,7 @@ const imageService = require('../../services/image');
async function createNote(req) {
console.log(req.body);
const {title, html, source_url} = req.body;
const {title, html, url} = req.body;
const todayNote = await dateNoteService.getDateNote(dateUtils.localNowDate());
@ -17,7 +17,7 @@ async function createNote(req) {
{
type: 'label',
name: 'sourceUrl',
value: source_url
value: url
}
]
});
@ -37,13 +37,15 @@ async function createScreenshot(req) {
const todayNote = await dateNoteService.getDateNote(dateUtils.localNowDate());
const {note} = await imageService.saveImage(buffer, title, todayNote.noteId, true);
const {note} = await imageService.saveImage(buffer, title + ".png", todayNote.noteId, true);
await note.setLabel('sourceUrl', url);
}
else {
console.log("Unrecognized prefix");
}
return {};
}
async function ping(req, res) {