Skip to content

Commit 6ac9175

Browse files
committed
Update
1 parent f338154 commit 6ac9175

24 files changed

Lines changed: 382 additions & 409 deletions

‎.github/workflows/pre-commit-workflow.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
pull_request:
1212

1313
push:
14-
branches: ["*"]
14+
branches: ['*']
1515

1616
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1717
jobs:
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup Python - https://github.com/actions/setup-python
2929
uses: actions/setup-python@v6
3030
with:
31-
python-version: "3.x" # Latest stable major version of Python
31+
python-version: '3.x' # Latest stable major version of Python
3232

3333
- name: Install Python dependencies
3434
run: |

‎.pre-commit-config.yaml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repos:
88
hooks:
99
- id: prettier
1010
name: prettier
11-
entry: prettier --write --print-width 220 --ignore-unknown
11+
entry: prettier --write --print-width 220 --prose-wrap never --semi true --single-quote true --tab-width 2 --trailing-comma es5 --ignore-unknown
1212
language: node
1313
types_or: [javascript, jsx, ts, tsx, json, css, scss, html, markdown, yaml]
1414
additional_dependencies:
@@ -18,7 +18,7 @@ repos:
1818
rev: v6.0.0
1919
hooks:
2020
- id: check-added-large-files
21-
args: ["--maxkb=500"]
21+
args: ['--maxkb=500']
2222
- id: check-ast
2323
- id: check-builtin-literals
2424
- id: check-case-conflict
@@ -38,12 +38,12 @@ repos:
3838
- id: file-contents-sorter
3939
- id: fix-byte-order-marker
4040
- id: forbid-submodules
41-
args: ["--fix=lf"]
41+
args: ['--fix=lf']
4242
- id: forbid-new-submodules
4343
- id: mixed-line-ending
44-
args: ["--fix=lf"]
44+
args: ['--fix=lf']
4545
- id: pretty-format-json
46-
args: ["--autofix"]
46+
args: ['--autofix']
4747
- id: requirements-txt-fixer
4848
- id: sort-simple-yaml
4949

@@ -57,15 +57,15 @@ repos:
5757
rev: 4.0.0a1
5858
hooks:
5959
- id: sqlfluff-fix
60-
args: ["--dialect=mysql", "--exclude-rules=ambiguous.column_count, layout.long_lines, references.keywords"]
60+
args: ['--dialect=mysql', '--exclude-rules=ambiguous.column_count, layout.long_lines, references.keywords']
6161

6262
- repo: https://github.com/astral-sh/ruff-pre-commit
6363
rev: v0.14.3
6464
hooks:
6565
- id: ruff
66-
args: ["--fix", "--exit-non-zero-on-fix", "--ignore=B007,B023,C408,D103,E203,E266,E402,E501,F821,S105,S110,S310,SIM105"] # ruff-pre-commit does not recognize these rule selectors: B902,CM001,S410,SCS109,W503,W504
66+
args: ['--fix', '--exit-non-zero-on-fix', '--ignore=B007,B023,C408,D103,E203,E266,E402,E501,F821,S105,S110,S310,SIM105'] # ruff-pre-commit does not recognize these rule selectors: B902,CM001,S410,SCS109,W503,W504
6767
- id: ruff-format
68-
args: ["--line-length=220", "--config", "format.quote-style='single'", "--config", "format.indent-style='space'"]
68+
args: ['--line-length=220', '--config', "format.quote-style='single'", '--config', "format.indent-style='space'"]
6969

7070
- repo: https://github.com/pre-commit/pygrep-hooks
7171
rev: v1.10.0
@@ -85,7 +85,7 @@ repos:
8585
rev: v3.21.0
8686
hooks:
8787
- id: pyupgrade
88-
args: ["--py314-plus"]
88+
args: ['--py314-plus']
8989

9090
default_language_version:
9191
python: python3

‎documents/dhl/dhl-geschaftskundenportal-invoices-download.js‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// DHL Geschäftskundenportal Invoices Download - Puppeteer script that logs in, filters invoices for the previous month, and extracts their details for download
22
// Last update: 2025-10-03
33

4-
const puppeteer = require("puppeteer");
4+
const puppeteer = require('puppeteer');
55

66
// Settings
77
const username = $env.DHL_USERNAME;
@@ -11,55 +11,55 @@ const password = $env.DHL_PASSWORD;
1111
async function dhlGeschaftskundenportalInvoicesDownload() {
1212
const browser = await puppeteer.launch({
1313
headless: false,
14-
args: ["--no-sandbox", "--disable-setuid-sandbox", "--start-fullscreen"],
14+
args: ['--no-sandbox', '--disable-setuid-sandbox', '--start-fullscreen'],
1515
});
1616

1717
const page = await browser.newPage();
1818

1919
// Settings
2020
await page.setViewport({ width: 1920, height: 1080 });
21-
await page.setUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36");
21+
await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36');
2222
// page.on('console', msg => console.log('BROWSER CONSOLE:', msg.text()));
2323

2424
// Navigate to login page
25-
await page.goto("https://geschaeftskunden.dhl.de");
25+
await page.goto('https://geschaeftskunden.dhl.de');
2626

2727
// Cookies
2828
await page
29-
.waitForSelector("#onetrust-reject-all-handler", {
29+
.waitForSelector('#onetrust-reject-all-handler', {
3030
visible: true,
3131
timeout: 5000,
3232
})
3333
.catch((e) => {
34-
console.log("Cookie consent button not found or already gone.");
34+
console.log('Cookie consent button not found or already gone.');
3535
});
36-
if (await page.$("#onetrust-reject-all-handler")) {
37-
await page.click("#onetrust-reject-all-handler");
36+
if (await page.$('#onetrust-reject-all-handler')) {
37+
await page.click('#onetrust-reject-all-handler');
3838
await page.waitForNavigation();
3939
}
4040

4141
// "Anmelden"
42-
await page.waitForSelector("#button-noName", { visible: true });
43-
await page.click("#button-noName");
42+
await page.waitForSelector('#button-noName', { visible: true });
43+
await page.click('#button-noName');
4444

4545
// Fill in credentials
46-
await page.waitForSelector("#username", { visible: true, timeout: 10000 });
47-
await page.type("#username", username);
48-
await page.type("#password", password);
46+
await page.waitForSelector('#username', { visible: true, timeout: 10000 });
47+
await page.type('#username', username);
48+
await page.type('#password', password);
4949

5050
// Login
5151
await page.click('button[type="submit"]');
5252
await page.waitForNavigation();
5353

5454
// Navigate to invoice section
55-
await page.goto("https://geschaeftskunden.dhl.de/billing/invoice/overview");
55+
await page.goto('https://geschaeftskunden.dhl.de/billing/invoice/overview');
5656

5757
// Display "Last 3 months" invoices
5858
await page.waitForSelector('[data-testid="date-range-input-field-function-icon-billingView-filter-dateRange"]');
5959
await page.click('[data-testid="date-range-input-field-function-icon-billingView-filter-dateRange"]');
6060
const presetDropdownSelector = '[data-testid="billingView-filter-dateRange-footer-presetRangeSelector"]';
6161
await page.waitForSelector(presetDropdownSelector, { visible: true });
62-
await page.select(presetDropdownSelector, "1");
62+
await page.select(presetDropdownSelector, '1');
6363
const submitButtonSelector = '[data-testid="billingView-filter-dateRange-footer-submit"]';
6464
await page.waitForSelector(submitButtonSelector, {
6565
visible: true,
@@ -79,18 +79,18 @@ async function dhlGeschaftskundenportalInvoicesDownload() {
7979
const invoices = await page.evaluate(
8080
(month, year) => {
8181
const table = document.querySelector('table[data-testid="billingView"]');
82-
const rows = Array.from(table.querySelectorAll("tbody > tr.dhlTable-row-default"));
82+
const rows = Array.from(table.querySelectorAll('tbody > tr.dhlTable-row-default'));
8383
const data = [];
8484

8585
for (const row of rows) {
86-
const dateCell = row.querySelector(".dhlTablecell:nth-child(2)");
87-
const invoiceNumberCell = row.querySelector(".dhlTablecell:nth-child(3)");
88-
const descriptionCell = row.querySelector(".dhlTablecell:nth-child(4)");
89-
const amountCell = row.querySelector(".dhlTablecell:nth-child(5)");
86+
const dateCell = row.querySelector('.dhlTablecell:nth-child(2)');
87+
const invoiceNumberCell = row.querySelector('.dhlTablecell:nth-child(3)');
88+
const descriptionCell = row.querySelector('.dhlTablecell:nth-child(4)');
89+
const amountCell = row.querySelector('.dhlTablecell:nth-child(5)');
9090

9191
if (dateCell && invoiceNumberCell && descriptionCell && amountCell) {
9292
const dateText = dateCell.textContent.trim();
93-
const parts = dateText.split(".");
93+
const parts = dateText.split('.');
9494
const invoiceMonth = parseInt(parts[1], 10) - 1;
9595
const invoiceYear = parseInt(parts[2], 10);
9696

@@ -99,7 +99,7 @@ async function dhlGeschaftskundenportalInvoicesDownload() {
9999
const invoiceDescription = descriptionCell.textContent.trim();
100100
const invoiceAmount = amountCell.textContent.trim();
101101

102-
const downloadButton = row.querySelector("td .svgIcon-pdf").closest("button");
102+
const downloadButton = row.querySelector('td .svgIcon-pdf').closest('button');
103103
const buttonId = downloadButton ? downloadButton.id : null;
104104

105105
data.push({
@@ -115,10 +115,10 @@ async function dhlGeschaftskundenportalInvoicesDownload() {
115115
return data;
116116
},
117117
targetMonth,
118-
targetYear,
118+
targetYear
119119
);
120120

121-
console.log("Filtered Invoices for Last Month:", invoices);
121+
console.log('Filtered Invoices for Last Month:', invoices);
122122

123123
// Close browser
124124
await browser.close();

‎documents/printable-labels-table-generator/printable-labels-table-generator.html‎

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -257,44 +257,44 @@ <h2>Printable Labels Table Generator</h2>
257257
if (langAttr.length === 2) {
258258
language = langAttr;
259259
} else {
260-
language = langAttr.split("-")[0];
260+
language = langAttr.split('-')[0];
261261
}
262262

263263
// Default to "en" if language is not "de" or "en"
264-
if (!["de", "en"].includes(language)) {
265-
language = "en";
264+
if (!['de', 'en'].includes(language)) {
265+
language = 'en';
266266
}
267267

268-
if (language === "de") {
269-
document.querySelectorAll(".language-de").forEach(function (el) {
270-
el.style.display = "block";
268+
if (language === 'de') {
269+
document.querySelectorAll('.language-de').forEach(function (el) {
270+
el.style.display = 'block';
271271
});
272272
} else {
273-
document.querySelectorAll(".language-en").forEach(function (el) {
274-
el.style.display = "block";
273+
document.querySelectorAll('.language-en').forEach(function (el) {
274+
el.style.display = 'block';
275275
});
276276
}
277277

278278
// Add rows
279279
function addRow() {
280280
const cellStart = document.querySelector('input[name="cell-start-input"]').cloneNode(true);
281-
cellStart.removeAttribute("value");
281+
cellStart.removeAttribute('value');
282282

283283
const cellEnd = document.querySelector('input[name="cell-end-input"]').cloneNode(true);
284-
cellEnd.removeAttribute("value");
284+
cellEnd.removeAttribute('value');
285285

286286
const productInput = document.querySelector('select[name="product-input"]').cloneNode(true);
287-
productInput.removeAttribute("value");
287+
productInput.removeAttribute('value');
288288

289-
const tableInput = document.getElementById("table-input");
289+
const tableInput = document.getElementById('table-input');
290290
const row = tableInput.insertRow(-1);
291291

292292
const cellContents = [
293293
cellStart.outerHTML,
294294
cellEnd.outerHTML,
295295
productInput.outerHTML,
296296
`<input type="date" name="date-input" value="${new Date().toISOString().substring(0, 10)}">`,
297-
`<button type="button" onclick="removeRow(this)">${language.includes("language-de") ? "Entfernen" : "Remove"}</button>`,
297+
`<button type="button" onclick="removeRow(this)">${language.includes('language-de') ? 'Entfernen' : 'Remove'}</button>`,
298298
];
299299

300300
cellContents.forEach((content) => {
@@ -367,7 +367,7 @@ <h2>Printable Labels Table Generator</h2>
367367
});
368368

369369
// Check for blank inputs
370-
if (productInputs[i].value === "" || dateInputs[i].value === "") {
370+
if (productInputs[i].value === '' || dateInputs[i].value === '') {
371371
isValid = false;
372372
}
373373

@@ -401,49 +401,49 @@ <h2>Printable Labels Table Generator</h2>
401401
const row = Math.floor(j / 3);
402402
const col = j % 3;
403403
const cell = tableGenerated.rows[row].cells[col];
404-
const productText = productInput + "<br>";
404+
const productText = productInput + '<br>';
405405

406406
const dateText =
407-
"Manufacturing date: " +
408-
dateInput.toLocaleDateString("de-DE", {
409-
year: "numeric",
410-
month: "2-digit",
411-
day: "2-digit",
407+
'Manufacturing date: ' +
408+
dateInput.toLocaleDateString('de-DE', {
409+
year: 'numeric',
410+
month: '2-digit',
411+
day: '2-digit',
412412
}) +
413-
"<br>" +
414-
"Expiration date: " +
415-
validity.toLocaleDateString("de-DE", {
416-
year: "numeric",
417-
month: "2-digit",
418-
day: "2-digit",
413+
'<br>' +
414+
'Expiration date: ' +
415+
validity.toLocaleDateString('de-DE', {
416+
year: 'numeric',
417+
month: '2-digit',
418+
day: '2-digit',
419419
});
420420

421-
let textDescription = "";
421+
let textDescription = '';
422422

423423
switch (productInput) {
424-
case "Product A":
425-
textDescription = "Description A" + "<br>";
424+
case 'Product A':
425+
textDescription = 'Description A' + '<br>';
426426
break;
427-
case "Product B":
428-
textDescription = "Description B" + "<br>";
427+
case 'Product B':
428+
textDescription = 'Description B' + '<br>';
429429
break;
430430
default:
431431
break;
432432
}
433433

434-
if (textDescription !== "") {
435-
cell.innerHTML = "<div>" + productText + textDescription + dateText + "</div>";
434+
if (textDescription !== '') {
435+
cell.innerHTML = '<div>' + productText + textDescription + dateText + '</div>';
436436
} else {
437-
cell.innerHTML = "";
437+
cell.innerHTML = '';
438438
}
439439
}
440440
}
441441

442442
// Enable "table-section" section
443-
document.querySelector('div[id="table-section"]').style.display = "block";
443+
document.querySelector('div[id="table-section"]').style.display = 'block';
444444

445445
// Enable "print-button" section
446-
document.querySelector('div[id="print-button"]').style.display = "block";
446+
document.querySelector('div[id="print-button"]').style.display = 'block';
447447

448448
// printTable()
449449
}
@@ -452,17 +452,17 @@ <h2>Printable Labels Table Generator</h2>
452452
function cleanTableBody() {
453453
// Clean table body
454454
const tableGenerated = document.querySelector('table[id="table-generated"]');
455-
const tableGeneratedCells = tableGenerated.querySelectorAll("td");
455+
const tableGeneratedCells = tableGenerated.querySelectorAll('td');
456456

457457
for (let i = 0; i < tableGeneratedCells.length; i++) {
458-
tableGeneratedCells[i].innerHTML = "";
458+
tableGeneratedCells[i].innerHTML = '';
459459
}
460460

461461
// Disable "table-section" section
462-
document.querySelector('div[id="table-section"]').style.display = "none";
462+
document.querySelector('div[id="table-section"]').style.display = 'none';
463463

464464
// Disable "print-button" section
465-
document.querySelector('div[id="print-button"]').style.display = "none";
465+
document.querySelector('div[id="print-button"]').style.display = 'none';
466466
}
467467

468468
// Print table

‎technology/git/git-tools.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Git Tools
2-
# Last update: 2025-11-03
2+
# Last update: 2025-11-04
33

44

55
# Start Bash (Unix Shell)
@@ -52,7 +52,8 @@ fi
5252

5353

5454
## Prettier
55-
prettier --write --print-width 220 '**/*.{js,jsx,ts,tsx,mjs,cjs,json,css,scss,html,md,yaml}'
55+
prettier --write --print-width 220 --prose-wrap never --semi true --single-quote true --tab-width 2 --trailing-comma es5 '**/*.{js,jsx,ts,tsx,mjs,cjs,json,css,scss,html,md,yaml}'
56+
5657

5758
## PHP
5859
php-cs-fixer fix . --rules=@PSR12

0 commit comments

Comments
 (0)