vault backup: 2026-05-25 16:57:50

This commit is contained in:
Dmitry
2026-05-25 16:57:50 +03:00
parent b86cfcfd2e
commit 326e6631c0
2 changed files with 85 additions and 6 deletions
+22 -6
View File
@@ -13,16 +13,32 @@
"state": {
"type": "markdown",
"state": {
"file": "90 Library/Programming/Ruby On Rails/Rails credentials edit не открывает редактор.md",
"file": "AGENTS.md",
"mode": "preview",
"source": false,
"backlinks": false
},
"icon": "lucide-file",
"title": "Rails credentials edit не открывает редактор"
"title": "AGENTS"
}
},
{
"id": "1040e2dbdf162887",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "00 Inbox/Работа с API для проекта Attendance Mephi.md",
"mode": "preview",
"source": false,
"backlinks": false
},
"icon": "lucide-file",
"title": "Работа с API для проекта Attendance Mephi"
}
}
]
],
"currentTab": 1
}
],
"direction": "vertical"
@@ -258,11 +274,12 @@
"terminal:Open terminal": false
}
},
"active": "df1bd513cd92a47d",
"active": "1040e2dbdf162887",
"lastOpenFiles": [
"AGENTS.md",
"00 Inbox/Работа с API для проекта Attendance Mephi.md",
"INDEX.md",
"00 Inbox/Hello.md",
"00 Inbox/Untitled.md",
"00 Inbox/Подготовка Speaking.md",
"99 System/Archive/Подготовка Speaking.md",
"99 System/Archive/Налоги - СР2.md",
@@ -295,7 +312,6 @@
"00 Inbox/UntitledUntitled.md",
"90 Library/08 Study/УИР.md",
"00 Inbox/ВДО no кредитам.md",
"99 System/Archive/ВДО no кредитам.md",
"raw_files_3.txt",
"raw_links_3.txt",
"raw_links_2.txt",
@@ -0,0 +1,63 @@
---
status: seed
type: concept
tags: []
created: 2025-12-17
updated: 2026-05-25
title:
---
**API Импорт**
Команда Rails:
```sh
/home/ada/.local/bin/mise exec ruby -- bin/rails runner '...'
```
Семестр берётся из `Term.actual`. Для старта `2026-02-07` код семестра: `20252`.
**Credentials**
```yaml
api:
home_mephi:
host:
code:
token:
students_mephi:
host:
username:
password:
```
**Endpoints**
```text
GET {home_mephi.host}/study_groups.json?term_code=20252&code=...&token=...
GET {home_mephi.host}/tutors.json?term_code=20252&code=...&token=...
GET {students_mephi.host}/get_list_by_group_name?group=...&term=20252
GET {home_mephi.host}/tutors/{staff_id}/schedules.json?term_code=20252&date=YYYY-MM-DD&code=...&token=...
```
`students_mephi` использует Basic Auth: `username/password`.
**Ручная загрузка**
```sh
/home/ada/.local/bin/mise exec ruby -- bin/rails runner 'ImportGroupsService.execute'
/home/ada/.local/bin/mise exec ruby -- bin/rails runner 'ImportTutorsService.execute'
/home/ada/.local/bin/mise exec ruby -- bin/rails runner 'ImportStudentsService.execute'
/home/ada/.local/bin/mise exec ruby -- bin/rails runner 'term = Term.actual; ImportDisciplineService.execute(nil, term)'
```
Расписание на сегодня:
```sh
/home/ada/.local/bin/mise exec ruby -- bin/rails runner 'term = Term.actual; ImportScheduleService.execute(Date.today, term)'
```
Расписание за весь семестр до сегодня:
```sh
/home/ada/.local/bin/mise exec ruby -- bin/rails runner 'term = Term.actual; finish = [term.get_finish_date, Date.today].min; (term.start_date..finish).each { |date| ImportScheduleService.execute(date, term) unless date.wday == 0 }'
```