Compare commits
7 Commits
97b84013a0
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 07de16d256 | |||
| 3027cc0532 | |||
| 0f2a879c8c | |||
| 46309e5317 | |||
| 01a5156d7c | |||
| ad435a78a5 | |||
| b1aa3b72fb |
9
Workflow/MyDealz Kommentare/global_functions.js
Normal file
9
Workflow/MyDealz Kommentare/global_functions.js
Normal file
@@ -0,0 +1,9 @@
|
||||
async function button_click_hide(selector) {
|
||||
await $page.locator(selector).click();
|
||||
await $page.waitForSelector(selector, { hidden: true});
|
||||
}
|
||||
|
||||
async function cookie_banner_click(){
|
||||
const banner_reject = 'button[data-t="rejectAll"]';
|
||||
await button_click_hide(banner_reject);
|
||||
}
|
||||
11
Workflow/MyDealz Kommentare/global_image.js
Normal file
11
Workflow/MyDealz Kommentare/global_image.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const imageData = await $page.screenshot({ type: "png", encoding: "base64" });
|
||||
|
||||
const img_binary = {
|
||||
binary: {
|
||||
screenshot: {
|
||||
data: imageData,
|
||||
mimeType: "image/png",
|
||||
fileName: "screenshot.png",
|
||||
},
|
||||
},
|
||||
};
|
||||
4
Workflow/MyDealz Kommentare/global_viewport.js
Normal file
4
Workflow/MyDealz Kommentare/global_viewport.js
Normal file
@@ -0,0 +1,4 @@
|
||||
await $page.setViewport({
|
||||
width: 1920,
|
||||
height: 1080
|
||||
});
|
||||
121
firefly_grafana/dashboard.sql
Normal file
121
firefly_grafana/dashboard.sql
Normal file
@@ -0,0 +1,121 @@
|
||||
SELECT
|
||||
t.id
|
||||
, a.id AS account_id
|
||||
, a.name AS account_name
|
||||
, aty.type
|
||||
, t.amount
|
||||
, tj.description AS tj_descr
|
||||
, tj.date
|
||||
, c.name AS category_name
|
||||
FROM firefly.transactions AS t
|
||||
INNER JOIN firefly.transaction_journals AS tj
|
||||
ON t.transaction_journal_id = tj.id
|
||||
LEFT JOIN firefly.category_transaction_journal as ctj
|
||||
ON tj.id = ctj.transaction_journal_id
|
||||
LEFT JOIN firefly.categories AS c
|
||||
ON c.id = ctj.category_id
|
||||
LEFT JOIN firefly.accounts AS a
|
||||
ON t.account_id = a.id
|
||||
LEFT JOIN firefly.account_types AS aty
|
||||
ON a.account_type_id = aty.id
|
||||
WHERE TRUE
|
||||
AND tj.DATE BETWEEN '2025-11-28' AND '2025-11-28'
|
||||
AND a.id = 1
|
||||
;
|
||||
|
||||
|
||||
/*
|
||||
Total Expanses of the month
|
||||
*/
|
||||
SELECT
|
||||
SUM(t.amount)
|
||||
FROM firefly.transactions AS t
|
||||
INNER JOIN firefly.transaction_journals AS tj
|
||||
ON t.transaction_journal_id = tj.id
|
||||
LEFT JOIN firefly.category_transaction_journal as ctj
|
||||
ON tj.id = ctj.transaction_journal_id
|
||||
LEFT JOIN firefly.categories AS c
|
||||
ON c.id = ctj.category_id
|
||||
LEFT JOIN firefly.accounts AS a
|
||||
ON t.account_id = a.id
|
||||
LEFT JOIN firefly.account_types AS aty
|
||||
ON a.account_type_id = aty.id
|
||||
WHERE TRUE
|
||||
AND tj.DATE BETWEEN ${__from:date:iso} AND ${__to:date:iso}
|
||||
AND a.id = 1
|
||||
;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Barchart with Budget
|
||||
*/
|
||||
SELECT
|
||||
c.name AS category_name
|
||||
, 500 AS budget
|
||||
, ABS(SUM(t.amount)) AS current_status
|
||||
FROM firefly.transactions AS t
|
||||
INNER JOIN firefly.transaction_journals AS tj
|
||||
ON t.transaction_journal_id = tj.id
|
||||
LEFT JOIN firefly.category_transaction_journal as ctj
|
||||
ON tj.id = ctj.transaction_journal_id
|
||||
LEFT JOIN firefly.categories AS c
|
||||
ON c.id = ctj.category_id
|
||||
LEFT JOIN firefly.accounts AS a
|
||||
ON t.account_id = a.id
|
||||
LEFT JOIN firefly.account_types AS aty
|
||||
ON a.account_type_id = aty.id
|
||||
WHERE TRUE
|
||||
AND tj.DATE BETWEEN "${__from:date:iso}" AND "${__to:date:iso}"
|
||||
AND a.id = 1
|
||||
GROUP BY 1,2
|
||||
ORDER BY 3 ASC
|
||||
LIMIT 10
|
||||
;
|
||||
|
||||
|
||||
/*
|
||||
Barchart with Budget difference stacked
|
||||
*/
|
||||
WITH calc_budget AS (
|
||||
SELECT
|
||||
c.name AS category_name
|
||||
, ABS(SUM(t.amount)) AS current_status
|
||||
, CASE
|
||||
WHEN c.name = 'Lebensmittel' THEN ${budget_lebensmittel}
|
||||
WHEN c.name = 'Unterhaltung: Ausgehen' THEN ${budget_unterhaltung_ausgehen}
|
||||
WHEN c.name = 'Sonstiges' THEN ${budget_sonstiges}
|
||||
WHEN c.name = 'Online Einkäufe' THEN ${budget_online_einkaeufe}
|
||||
WHEN c.name = 'Wohnen: Möbel' THEN ${budget_wohnen_moebel}
|
||||
WHEN c.name = 'Drogerie' THEN ${budget_drogerie}
|
||||
ELSE 0
|
||||
END AS budget
|
||||
FROM firefly.transactions AS t
|
||||
INNER JOIN firefly.transaction_journals AS tj
|
||||
ON t.transaction_journal_id = tj.id
|
||||
LEFT JOIN firefly.category_transaction_journal as ctj
|
||||
ON tj.id = ctj.transaction_journal_id
|
||||
LEFT JOIN firefly.categories AS c
|
||||
ON c.id = ctj.category_id
|
||||
LEFT JOIN firefly.accounts AS a
|
||||
ON t.account_id = a.id
|
||||
LEFT JOIN firefly.account_types AS aty
|
||||
ON a.account_type_id = aty.id
|
||||
WHERE TRUE
|
||||
AND tj.DATE BETWEEN "${__from:date:iso}" AND "${__to:date:iso}"
|
||||
AND a.id = 1
|
||||
AND c.name != "Monatliche Einzahlung"
|
||||
GROUP BY 1,3
|
||||
ORDER BY 2 DESC
|
||||
)
|
||||
SELECT
|
||||
category_name
|
||||
, current_status
|
||||
, CASE
|
||||
WHEN budget - current_status > 0 THEN budget - current_status
|
||||
ELSE 0
|
||||
END AS rest_budget
|
||||
FROM calc_budget
|
||||
WHERE TRUE
|
||||
AND budget > 0
|
||||
;
|
||||
86
firefly_grafana/desc_table.txt
Normal file
86
firefly_grafana/desc_table.txt
Normal file
@@ -0,0 +1,86 @@
|
||||
DESC firefly.category_transaction_journal;
|
||||
|
||||
|
||||
0:"id"
|
||||
1:"category_id"
|
||||
2:"transaction_journal_id"
|
||||
|
||||
firefly.transaction_journals
|
||||
|
||||
0:Array[20]
|
||||
0:"id"
|
||||
1:"created_at"
|
||||
2:"updated_at"
|
||||
3:"deleted_at"
|
||||
4:"user_id"
|
||||
5:"user_group_id"
|
||||
6:"transaction_type_id"
|
||||
7:"transaction_group_id"
|
||||
8:"bill_id"
|
||||
9:"transaction_currency_id"
|
||||
10:"description"
|
||||
11:"date"
|
||||
12:"date_tz"
|
||||
13:"interest_date"
|
||||
14:"book_date"
|
||||
15:"process_date"
|
||||
16:"order"
|
||||
17:"tag_count"
|
||||
18:"encrypted"
|
||||
19:"completed"
|
||||
|
||||
DESC firefly.transactions;
|
||||
|
||||
values:Array[6]
|
||||
0:Array[18]
|
||||
0:"id"
|
||||
1:"created_at"
|
||||
2:"updated_at"
|
||||
3:"deleted_at"
|
||||
4:"reconciled"
|
||||
5:"account_id"
|
||||
6:"transaction_journal_id"
|
||||
7:"description"
|
||||
8:"transaction_currency_id"
|
||||
9:"amount"
|
||||
10:"balance_before"
|
||||
11:"balance_after"
|
||||
12:"balance_dirty"
|
||||
13:"foreign_amount"
|
||||
14:"foreign_currency_id"
|
||||
15:"identifier"
|
||||
16:"native_amount"
|
||||
17:"native_foreign_amount"
|
||||
|
||||
firefly.categories
|
||||
|
||||
values:Array[6]
|
||||
0:Array[8]
|
||||
0:"id"
|
||||
1:"created_at"
|
||||
2:"updated_at"
|
||||
3:"deleted_at"
|
||||
4:"user_id"
|
||||
5:"user_group_id"
|
||||
6:"name"
|
||||
7:"encrypted"
|
||||
|
||||
|
||||
firefly.accounts
|
||||
|
||||
values:Array[6]
|
||||
0:Array[14]
|
||||
0:"id"
|
||||
1:"created_at"
|
||||
2:"updated_at"
|
||||
3:"deleted_at"
|
||||
4:"user_id"
|
||||
5:"user_group_id"
|
||||
6:"account_type_id"
|
||||
7:"name"
|
||||
8:"virtual_balance"
|
||||
9:"iban"
|
||||
10:"active"
|
||||
11:"encrypted"
|
||||
12:"order"
|
||||
13:"native_virtual_balance"
|
||||
15
ollama_paperless/prompt.md
Normal file
15
ollama_paperless/prompt.md
Normal file
@@ -0,0 +1,15 @@
|
||||
[Korrespodent Start]
|
||||
{{ JSON.stringify($('getCorrespondent').all().map(i => ({ id: i.json.paperless_id, name: i.json.name }))) }}
|
||||
[Korrespodent End]
|
||||
|
||||
[Tags Start]
|
||||
{{ JSON.stringify($('getTags').all().map(i => ({ id: i.json.paperless_id, name: i.json.name }))) }}
|
||||
[Tags End]
|
||||
|
||||
[Documents Start]
|
||||
{{ JSON.stringify($('getDocuments').all().map(i => ({ id: i.json.paperless_id, name: i.json.name }))) }}
|
||||
[Documents End]
|
||||
|
||||
[Dokument Inhalt Start]
|
||||
{{ $('documentObject').item.json.document[0].content.substring(1,1000) }}
|
||||
[Dokument Inhalt Ende]
|
||||
27
ollama_paperless/system_prompt.md
Normal file
27
ollama_paperless/system_prompt.md
Normal file
@@ -0,0 +1,27 @@
|
||||
Kannst du bitte für dieses Dokument einen Title, Korrespondent, Dokumenttyp und Tags extrahieren. Die ich für mein Paperless verwenden kann?
|
||||
Versuche erst einen passenden Korrespondent und Tag aus meiner Liste was ich anhänge zu finden. Achte auf die Sin Wenn du es nicht findest weise einen passenden Vorschlag zu.
|
||||
|
||||
Stelle sicher das ausschließlich mit purem JSON. Nutze keine Markdown-Formatierung wie ` ` `json. Beginne direkt mit der öffnenden geschweiften Klammer {.
|
||||
|
||||
Beispielantwort 1 wenn eine Korrespondent ID, Document_type und Tags vorhanden sind
|
||||
|
||||
{
|
||||
"Title": "SLK Klinik Beinoperation",
|
||||
"Korrespondent-ID": 1,
|
||||
"Korrespondent": "SLK Klinik",
|
||||
"Tags-ID":[6,8],
|
||||
"Tags:["Arztbriefe", "Medikamente"],
|
||||
"Document_type_id": 8,
|
||||
"Document_typ": "Information"
|
||||
}
|
||||
|
||||
Beispielantwort 2 wenn eine Korrespondent ID, Document_type und Tags nicht vorhanden sind
|
||||
{
|
||||
"Title": "SLK Klinik Beinoperation",
|
||||
"Korrespondent-ID": null,
|
||||
"Korrespondent": "SLK Klinik",
|
||||
"Tags-ID":[null],
|
||||
"Tags:["Operation", "Varatharajan"],
|
||||
"Document_type_id": null,
|
||||
"Dokumenttyp": "Arztbrief"
|
||||
}
|
||||
Reference in New Issue
Block a user