1
0

Compare commits

...

2 Commits

Author SHA1 Message Date
86f71bf178 fix: Some minor fixes
All checks were successful
Remote Deploy / deploy (push) Successful in 3m39s
2026-03-25 08:51:38 +01:00
65998935ce fix: Login taking forever
All checks were successful
Remote Deploy / deploy (push) Successful in 1m30s
2026-03-20 16:16:12 +01:00
3 changed files with 13 additions and 6 deletions

View File

@@ -318,7 +318,7 @@ function extractTakesPlace(sheet: Worksheet) {
const cellTry = sheet.getCell(`${cellTest}${i}`) const cellTry = sheet.getCell(`${cellTest}${i}`)
const cellValue = (typeof cellTry?.value === 'string' ? cellTry.value.trim() : "") || ""; const cellValue = (typeof cellTry?.value === 'string' ? cellTry.value.trim() : "") || "";
if (cellValue.length >= threshold) { if (cellValue.length >= threshold || cellTry.isMerged) {
str += `\n${cellValue}`; str += `\n${cellValue}`;
con = true; con = true;
break; break;
@@ -353,12 +353,16 @@ function extractReservedRooms(sheet: Worksheet) {
cells.forEach((address) => { cells.forEach((address) => {
const row = sheet.getRow(Number(sheet.getCell(address).row)); const row = sheet.getRow(Number(sheet.getCell(address).row));
row.eachCell((cell) => { function numToChar(n: number) {
if (cell.address === address) return; return String.fromCharCode(n + 66);
}
for (let i = 0; i < 10; i++) {
const cell = row.getCell(numToChar(i));
const val = cell.value?.toString().trim(); const val = cell.value?.toString().trim();
result.push(!val || val.length == 0 ? null : val) result.push(!val || val.length == 0 ? null : val)
}); }
}); });
while (result.length < 10) { while (result.length < 10) {
@@ -424,4 +428,4 @@ function formatNowTime() {
); );
} }
//parseV3("db/current.xlsx") //parseV3("volume/db/current.xlsx")

View File

@@ -37,7 +37,8 @@ const client = wrapper(axios.create({
withCredentials: true, withCredentials: true,
headers: { headers: {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.9",
} }
})); }));

View File

@@ -8,6 +8,8 @@ TocOpen: true
Ječná Rozvrh API má svoji Rust knihovnu pro komunikaci s API. Obsahuje mappings pro Kotlin. Pro další jazyky budou mappingy v budoucnu. Ječná Rozvrh API má svoji Rust knihovnu pro komunikaci s API. Obsahuje mappings pro Kotlin. Pro další jazyky budou mappingy v budoucnu.
[Zdrojový kód knihovny](https://gitea.local.jzitnik.dev/jzitnik/jecna-supl-client)
## Usage ## Usage
### `JecnaSuplClient` struct ### `JecnaSuplClient` struct