mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	fix pngquant for linux-x64
This commit is contained in:
		| @@ -7,6 +7,9 @@ rm -r node_modules/sqlite3/lib/binding/* | |||||||
|  |  | ||||||
| cp -r bin/deps/linux-x64/sqlite/* 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 | ./node_modules/.bin/electron-packager . --asar --out=dist --executable-name=trilium --platform=linux --arch=x64 --overwrite | ||||||
|  |  | ||||||
| mv "./dist/Trilium Notes-linux-x64" $BUILD_DIR | mv "./dist/Trilium Notes-linux-x64" $BUILD_DIR | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ const imageService = require('../../services/image'); | |||||||
| async function createNote(req) { | async function createNote(req) { | ||||||
|     console.log(req.body); |     console.log(req.body); | ||||||
|  |  | ||||||
|     const {title, html, source_url} = req.body; |     const {title, html, url} = req.body; | ||||||
|  |  | ||||||
|     const todayNote = await dateNoteService.getDateNote(dateUtils.localNowDate()); |     const todayNote = await dateNoteService.getDateNote(dateUtils.localNowDate()); | ||||||
|  |  | ||||||
| @@ -17,7 +17,7 @@ async function createNote(req) { | |||||||
|             { |             { | ||||||
|                 type: 'label', |                 type: 'label', | ||||||
|                 name: 'sourceUrl', |                 name: 'sourceUrl', | ||||||
|                 value: source_url |                 value: url | ||||||
|             } |             } | ||||||
|         ] |         ] | ||||||
|     }); |     }); | ||||||
| @@ -37,13 +37,15 @@ async function createScreenshot(req) { | |||||||
|  |  | ||||||
|         const todayNote = await dateNoteService.getDateNote(dateUtils.localNowDate()); |         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); |         await note.setLabel('sourceUrl', url); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|         console.log("Unrecognized prefix"); |         console.log("Unrecognized prefix"); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     return {}; | ||||||
| } | } | ||||||
|  |  | ||||||
| async function ping(req, res) { | async function ping(req, res) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user