mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
becca conversion WIP
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
const scriptService = require('./script');
|
||||
const repository = require('./repository');
|
||||
const cls = require('./cls');
|
||||
const sqlInit = require('./sql_init');
|
||||
const config = require('./config');
|
||||
const log = require('./log');
|
||||
const sql = require("./sql");
|
||||
const becca = require("./becca/becca");
|
||||
|
||||
function getRunAtHours(note) {
|
||||
try {
|
||||
@@ -17,8 +18,9 @@ function getRunAtHours(note) {
|
||||
}
|
||||
|
||||
function runNotesWithLabel(runAttrValue) {
|
||||
const notes = repository.getEntities(`
|
||||
SELECT notes.*
|
||||
// TODO: should be refactored into becca search
|
||||
const noteIds = sql.getColumn(`
|
||||
SELECT notes.noteId
|
||||
FROM notes
|
||||
JOIN attributes ON attributes.noteId = notes.noteId
|
||||
AND attributes.isDeleted = 0
|
||||
@@ -29,6 +31,8 @@ function runNotesWithLabel(runAttrValue) {
|
||||
notes.type = 'code'
|
||||
AND notes.isDeleted = 0`, [runAttrValue]);
|
||||
|
||||
const notes = becca.getNotes(noteIds);
|
||||
|
||||
const instanceName = config.General ? config.General.instanceName : null;
|
||||
const currentHours = new Date().getHours();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user