Compare commits
2 Commits
570f8f0aaa
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
86f71bf178
|
|||
|
65998935ce
|
@@ -318,7 +318,7 @@ function extractTakesPlace(sheet: Worksheet) {
|
||||
const cellTry = sheet.getCell(`${cellTest}${i}`)
|
||||
const cellValue = (typeof cellTry?.value === 'string' ? cellTry.value.trim() : "") || "";
|
||||
|
||||
if (cellValue.length >= threshold) {
|
||||
if (cellValue.length >= threshold || cellTry.isMerged) {
|
||||
str += `\n${cellValue}`;
|
||||
con = true;
|
||||
break;
|
||||
@@ -353,12 +353,16 @@ function extractReservedRooms(sheet: Worksheet) {
|
||||
cells.forEach((address) => {
|
||||
const row = sheet.getRow(Number(sheet.getCell(address).row));
|
||||
|
||||
row.eachCell((cell) => {
|
||||
if (cell.address === address) return;
|
||||
function numToChar(n: number) {
|
||||
return String.fromCharCode(n + 66);
|
||||
}
|
||||
|
||||
for (let i = 0; i < 10; i++) {
|
||||
const cell = row.getCell(numToChar(i));
|
||||
|
||||
const val = cell.value?.toString().trim();
|
||||
result.push(!val || val.length == 0 ? null : val)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
while (result.length < 10) {
|
||||
@@ -424,4 +428,4 @@ function formatNowTime() {
|
||||
);
|
||||
}
|
||||
|
||||
//parseV3("db/current.xlsx")
|
||||
//parseV3("volume/db/current.xlsx")
|
||||
|
||||
@@ -37,7 +37,8 @@ const client = wrapper(axios.create({
|
||||
withCredentials: true,
|
||||
headers: {
|
||||
"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",
|
||||
}
|
||||
}));
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
[Zdrojový kód knihovny](https://gitea.local.jzitnik.dev/jzitnik/jecna-supl-client)
|
||||
|
||||
## Usage
|
||||
|
||||
### `JecnaSuplClient` struct
|
||||
|
||||
Reference in New Issue
Block a user