first release?

This commit is contained in:
2025-02-09 01:55:39 +02:00
parent 7c7ac9257d
commit ebbfadfcdf
7 changed files with 502 additions and 497 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
*.pdf template.pdf

View File

@ -1,4 +1,6 @@
# Typst template for NURE works. # Typst template for NURE works.
> [!WARNING] > [!INFO]
> Still WIP, but you can use it. > Need some more work to be done, but already can be used.
!TODO - Add more info about the template.

BIN
coursework_example.pdf Normal file

Binary file not shown.

View File

@ -1,13 +1,11 @@
#import "template.typ": * #import "template.typ": *
#let authors = ( #let author = (
(
name: "Ситник Є. С.", name: "Ситник Є. С.",
full_name_gen: "Ситника Єгора Сергійовича", full_name_gen: "Ситника Єгора Сергійовича",
variant: 13, variant: 13,
group: "ПЗПІ-23-2", group: "ПЗПІ-23-2",
gender: "m", gender: "m",
),
) )
#let mentors = ( #let mentors = (
@ -77,13 +75,12 @@
), ),
) )
#show: conf.with( #show: cw-template.with(
doctype: "КП",
title: "Інформаційна система «Помічник класного керівника». Керування класом", title: "Інформаційна система «Помічник класного керівника». Керування класом",
subject_shorthand: "БД", subject_shorthand: "БД",
department_gen: "Програмної інженерії", department_gen: "Програмної інженерії",
edu_program: "ПЗПІ", edu_program_shorthand: "ПЗПІ",
authors: authors, author: author,
mentors: mentors, mentors: mentors,
task_list: task_list, task_list: task_list,
calendar_plan: calendar_plan, calendar_plan: calendar_plan,
@ -91,37 +88,3 @@
bib_path: "bibl.yml", bib_path: "bibl.yml",
appendices: appendices, appendices: appendices,
) )
#heading(depth: 1, numbering: none)[Вступ]
У сучасному освітньому середовищі інформаційні системи відіграють
ключову роль у забезпеченні ефективного управління та автоматизації процесів.
Особливо це важливо для шкіл, де необхідно систематизувати облік даних про
учнів, планувати навчальний процес і створювати звіти. Відсутність зручних
інструментів ускладнює роботу класного керівника, змушуючи його витрачати
багато часу на тяганину з документами, зокрема на складання звітів, ведення
обліку даних про учнів і підготовку розкладу, що потребує сучасних рішень для
організації взаємодії між учасниками освітнього процесу.
Метою цієї курсової роботи є розробка інформаційної системи «Помічник
класного керівника. Керування класом», яка спрощує процес управління класом,
дозволяючи автоматизувати складання звітів, зберігати та обробляти дані про
учнів, а також планувати навчальний процес у зручному форматі, забезпечує
зручний облік даних про учнів і сприяє ефективному плануванню навчального
процесу. У процесі роботи над системою було проведено аналіз потреб
користувачів, спроєктовано реляційну базу даних і розроблено веб-додаток, який
дозволяє обліковувати особисті дані учнів та їхніх опікунів, відстежувати
успішність і відвідуваність, планувати розклад занять, формувати звіти та
переглядати статистичні дані.
Основну серверну логіку написано мовою програмування Go@go, а для
забезпечення роботи інтерфейсу застосовано HTMX@htmx. Дані зберігаються у базі
даних MySQL@mysql, взаємодія з якою здійснюється через бібліотеку Go SQLx@sqlx.
Для створення REST API використано веб-фреймворк Go Echo@echo.
Розробка виконувалася у середовищі Neovim@neovim.
= Аналіз та концептуальне моделювання предметної області
#v(-1em)
== test
test
== test

BIN
lab_example.pdf Normal file

Binary file not shown.

39
lab_example.typ Normal file
View File

@ -0,0 +1,39 @@
#import "template.typ": *
#import "@preview/indenta:0.0.3": fix-indent
#show: lab-pz-template.with(
doctype: "ЛБ",
title: "Інформаційна система «Помічник класного керівника». Керування класом",
subject_shorthand: "БД",
department_gen: "Програмної інженерії",
authors: (
(
name: "Ситник Є. С.",
full_name_gen: "Ситника Єгора Сергійовича",
variant: 13,
group: "ПЗПІ-23-2",
gender: "m",
),
),
mentor: (
name: "Черепанова Ю. Ю.",
gender: "f",
degree: "Ст. викл. каф. ПІ",
),
worknumber: 1,
)
#show: fix-indent()
#v(-spacing)
== Мета роботи
Супер важлива мета
== Висновки
Супер важливий висновок
== Хід роботи
== Контрольні запитання
Супер важливі контрольні запитання

View File

@ -1,27 +1,35 @@
#import "@preview/indenta:0.0.3": fix-indent
/// numberless heading
#let nheading(title) = heading(depth: 1, numbering: none, title)
/// fill horizontal space with a box and not an empty space
#let hfill(width) = box(width: width, repeat("")) // NOTE: This is a HAIR SPACE (U+200A), not a regular space #let hfill(width) = box(width: width, repeat("")) // NOTE: This is a HAIR SPACE (U+200A), not a regular space
#let uline(align: center, content) = underline([ /// make underlined cell with filled value
#let uline(align: center, content) = underline[
#if align != left { hfill(1fr) } #if align != left { hfill(1fr) }
#content #content
#if align != right { hfill(1fr) } #if align != right { hfill(1fr) }
]) ]
/// bold text
#let bold(content) = text(weight: "bold")[#content] #let bold(content) = text(weight: "bold")[#content]
#let fig(path, caption) = [ /// insert fig with label and caption
#figure( #let fig(path, caption) = {
figure(
image(path), image(path),
caption: caption, caption: caption,
) )
#label(path.split("/").last().split(".").first()) label(path.split("/").last().split(".").first())
] }
/// subjects list
#let subjects = ( #let subjects = (
"БД": "Бази даних", "БД": "Бази даних",
) )
/// education programs list
#let edu_programs = ( #let edu_programs = (
"ПЗПІ": ( "ПЗПІ": (
name: "Інженерія програмного забезпечення", name: "Інженерія програмного забезпечення",
@ -44,39 +52,10 @@
"грудня", "грудня",
).at(month - 1) ).at(month - 1)
/// spacing between lines
#let spacing = 0.95em #let spacing = 0.95em
/// DSTU 3008:2015 Template for NURE #let style(it) = {
/// -> content
/// - doc (content): Content to apply the template to.
/// - doctype ("ЛБ" | "ПЗ" | "КП"): Document type.
/// - title (str): Title of the document.
/// - subject_shorthand (str): Subject name.
/// - department_gen (str): Department name in genitive form.
/// - edu_program_number (int): Education program number.
/// - worknumber (int): Number of the work, can be omitted.
/// - authors ((name: str, full_name_gen: str, variant: int, group: str, gender: str),): List of Authors dicts.
/// - task_list (done_date: datetime, initial_data: datetime, source: str, content: str, graphics: str): Task list.
/// - calendar_plan (plan_table: list, approval_date: datetime): Calendar plan.
/// - abstract (keywords: (str,), text: [str,]): Abstract.
#let conf(
doc,
title: "NONE",
doctype: "NONE",
subject_shorthand: "NONE",
department_gen: "Програмної інженерії",
worknumber: 1,
authors: (),
mentors: (),
edu_program: "NONE",
task_list: (),
calendar_plan: (),
abstract: (),
bib_path: "bibl.yml",
appendices: (),
) = {
set document(title: title, author: authors.at(0).name)
set page( set page(
paper: "a4", paper: "a4",
margin: (top: 20mm, right: 10mm, bottom: 20mm, left: 25mm), margin: (top: 20mm, right: 10mm, bottom: 20mm, left: 25mm),
@ -115,14 +94,6 @@
set list(indent: 1.35cm, body-indent: 0.5cm, marker: [--]) set list(indent: 1.35cm, body-indent: 0.5cm, marker: [--])
// citations
let bib-count = state("citation-counter", ())
show cite: it => {
it
bib-count.update(((..c)) => (..c, it.key))
}
let cit = context bib-count.final().dedup().len()
// figures // figures
set figure.caption(separator: [ -- ]) set figure.caption(separator: [ -- ])
@ -132,13 +103,13 @@
show figure.where(kind: image): set figure( show figure.where(kind: image): set figure(
numbering: (..) => { numbering: (..) => {
img.step() img.step()
context str(counter(heading).get().at(0) + worknumber - 1) + "." + context img.display() context str(counter(heading).get().at(0)) + "." + context img.display()
}, },
) )
show figure.where(kind: table): set figure( show figure.where(kind: table): set figure(
numbering: (..) => { numbering: (..) => {
tab.step() tab.step()
context str(counter(heading).get().at(0) + worknumber - 1) + "." + context tab.display() context str(counter(heading).get().at(0)) + "." + context tab.display()
}, },
) )
@ -158,8 +129,7 @@
} }
// headings // headings
// HACK: I can't set initial value for headers counter, so change is only visual. If this style is changed do not forget to fix images and tables numbering as well. set heading(numbering: "1.1")
set heading(numbering: (n1, ..x) => numbering("1.1", n1 - 1 + worknumber, ..x))
show heading.where(level: 1): it => { show heading.where(level: 1): it => {
set align(center) set align(center)
@ -181,111 +151,91 @@
v(spacing * 2, weak: true) v(spacing * 2, weak: true)
} }
show: fix-indent() it
}
let subject = subjects.at(subject_shorthand, default: "NONE") /// DSTU 3008:2015 Template for NURE
/// -> content
/// - doc (content): Content to apply the template to.
/// - title (str): Title of the document.
/// - subject_shorthand (str): Subject short name.
/// - department_gen (str): Department name in genitive form.
/// - authors ((name: str, full_name_gen: str, variant: int, group: str, gender: str),): List of Authors dicts.
/// - mentors ((name: str, gender: str, degree: str),): List of mentors dicts.
/// - edu_program_shorthand (str): Education program shorthand.
/// - task_list (done_date: datetime, initial_data: datetime, source: (content | str), content: (content | str), graphics: (content | str)): Task list object.
/// - calendar_plan ( plan_table: (content | str), approval_date: datetime): Calendar plan object.
/// - abstract (keywords: (str, ), text: (content | str)): Abstract object.
/// - bib_path path: Path to the bibliography yaml file.
/// - appendices ((title: str, content: content, ): List of appendices objects.
#let cw-template(
doc,
title: "NONE",
subject_shorthand: "NONE",
department_gen: "Програмної інженерії",
author: (),
mentors: (),
edu_program_shorthand: "ПЗПІ",
task_list: (),
calendar_plan: (),
abstract: (),
bib_path: "bibl.yml",
appendices: (),
) = {
set document(title: title, author: author.name)
if doctype in ("ЛБ", "ПЗ") { show: style
let mentor = subject.mentors.at(0)
align(center)
[
МІНІСТЕРСТВО ОСВІТИ І НАУКИ УКРАЇНИ
ХАРКІВСЬКИЙ НАЦІОНАЛЬНИЙ УНІВЕРСИТЕТ РАДІОЕЛЕКТРОНІКИ let bib-count = state("citation-counter", ())
show cite: it => {
it
bib-count.update(((..c)) => (..c, it.key))
}
show bibliography: it => {
set text(size: 0pt)
it
}
#linebreak()
Кафедра Програмної інженерії
#linebreak()
#linebreak()
#linebreak()
Звіт
з
#if doctype == "ЛБ" [лабораторної роботи] else [практичної роботи]
#if worknumber != none [ #worknumber]
з дисципліни: "#subject.name"
з теми: "#title"
#linebreak()
#linebreak()
#linebreak()
#columns(2)[
#set align(left)
#if authors.len() == 1 [
#let author = authors.at(0)
#if author.gender == "m" { [Виконав:\ ] } else { [Виконала:\ ] }
ст. гр. #author.group\
#author.name\
#if author.variant != none { [Варіант: #author.variant] }
] else [
Виконали:\
ст. гр. #authors.at(0).group\
#authors.map(a => [ #a.name\ ])
]
#colbreak()
#set align(right)
#if mentor.gender == "m" { [Перевірив:\ ] } else { [Перевірила:\ ] }
#mentor.degree #if mentor.degree.len() >= 15 [\ ]
#mentor.name\
]
#v(1fr)
Харків -- #datetime.today().display("[year]")
]
} else if doctype == "КП" {
let head_mentor = mentors.at(0) let head_mentor = mentors.at(0)
let author = authors.at(0) let edu_program = edu_programs.at(edu_program_shorthand)
let edu_program = edu_programs.at(edu_program)
// page 1 // page 1
align(center)[ [
#set align(center)
МІНІСТЕРСТВО ОСВІТИ І НАУКИ УКРАЇНИ МІНІСТЕРСТВО ОСВІТИ І НАУКИ УКРАЇНИ
ХАРКІВСЬКИЙ НАЦІОНАЛЬНИЙ УНІВЕРСИТЕТ РАДІОЕЛЕКТРОНІКИ ХАРКІВСЬКИЙ НАЦІОНАЛЬНИЙ УНІВЕРСИТЕТ РАДІОЕЛЕКТРОНІКИ
#linebreak() \
Кафедра Програмної інженерії Кафедра Програмної інженерії
#linebreak() \
ПОЯСНЮВАЛЬНА ЗАПИСКА ПОЯСНЮВАЛЬНА ЗАПИСКА
ДО КУРСОВОЇ РОБОТИ ДО КУРСОВОЇ РОБОТИ
з дисципліни: "#subject" з дисципліни: "#subjects.at(subject_shorthand, default: "NONE")"
Тема роботи: "#title" Тема роботи: "#title"
#linebreak() \ \ \
#linebreak()
#linebreak()
#columns(2, gutter: 4cm)[ #columns(2, gutter: 4cm)[
#set align(left) #set align(left)
#if authors.len() == 1 [
#if author.gender == "m" { [Виконав\ ] } else { [Виконала\ ] } ст. гр. #author.group #if author.gender == "m" { [Виконав\ ] } else { [Виконала\ ] } ст. гр. #author.group
]
#linebreak() \
Керівник:\ Керівник:\
#head_mentor.degree #head_mentor.degree
#linebreak() \
Робота захищена на оцінку Робота захищена на оцінку
#linebreak() \
Комісія:\ Комісія:\
#for mentor in mentors { #for mentor in mentors {
[#mentor.degree\ [#mentor.degree\
@ -295,18 +245,16 @@
#colbreak() #colbreak()
#set align(left) #set align(left)
#linebreak() \
#author.name #author.name
#linebreak() \ \
#linebreak()
#head_mentor.name #head_mentor.name
#linebreak() \
#underline(" " * 35) #underline(" " * 35)
#linebreak() \ \
#linebreak()
#for mentor in mentors { #for mentor in mentors {
[#mentor.name\ [#mentor.name\
] ]
@ -338,7 +286,7 @@
{ {
uline(align: left, department_gen) uline(align: left, department_gen)
linebreak() linebreak()
uline(align: left, subject) uline(align: left, subjects.at(subject_shorthand))
linebreak() linebreak()
uline(align: left, [#edu_program.number #edu_program.name]) uline(align: left, [#edu_program.number #edu_program.name])
}, },
@ -353,49 +301,45 @@
linebreak() linebreak()
linebreak() linebreak()
align(center)[#bold([ align(center, bold[ЗАВДАННЯ \ на курсову роботу студента])
ЗАВДАННЯ
на курсову роботу студента
])]
linebreak() linebreak()
uline(align: left)[#emph(author.full_name_gen)] uline(align: left)[_#author.full_name_gen _]
linebreak() linebreak()
linebreak() linebreak()
bold([ #"1. "Тема роботи: ]) bold[\1. Тема роботи:]
uline([#title.]) uline[#title.]
linebreak() linebreak()
{ {
bold([ #"2. "Строк здачі закінченої роботи: ]) bold[\2. Строк здачі закінченої роботи:]
uline(task_list.done_date.display("[day].[month].[year]")) uline(task_list.done_date.display("[day].[month].[year]"))
hfill(10fr) hfill(10fr)
} }
linebreak() linebreak()
bold([ #"3. "Вихідні дані для роботи: ]) bold[\3. Вихідні дані для роботи:]
uline(task_list.source) uline(task_list.source)
linebreak() linebreak()
bold([ #"4. "Зміст розрахунково-пояснювальної записки: ]) bold[\4. Зміст розрахунково-пояснювальної записки:]
uline(task_list.content) uline(task_list.content)
linebreak() linebreak()
bold([ #"5. "Перелік графічного матеріалу: ]) bold[\5. Перелік графічного матеріалу:]
uline(task_list.graphics) uline(task_list.graphics)
linebreak() linebreak()
{ {
bold([ #"6. "Строк здачі закінченої роботи: ]) bold[\6. Строк здачі закінченої роботи:]
uline(task_list.done_date.display("[day].[month].[year]")) uline(task_list.done_date.display("[day].[month].[year]"))
hfill(10fr) hfill(10fr)
} }
@ -405,7 +349,7 @@
// page 3 // page 3
{ {
align(center)[#bold([КАЛЕНДАРНИЙ ПЛАН])] align(center, bold[КАЛЕНДАРНИЙ ПЛАН])
linebreak() linebreak()
@ -419,28 +363,22 @@
columns: (1fr, 3fr, 1fr), columns: (1fr, 3fr, 1fr),
gutter: 0.2fr, gutter: 0.2fr,
[ [
Студент Студент \
#linebreak() Керівник \
Керівник #align(center)["#calendar_plan.approval_date.day()"]
#linebreak()
#align(center, ["#calendar_plan.approval_date.day()"])
], ],
[ [
#uline(align: center, []) #uline(align: center, []) \
#linebreak() #uline(align: center, []) \
#uline(align: center, [])
#linebreak()
#uline(align: center, month_gen(calendar_plan.approval_date.month())) #uline(align: center, month_gen(calendar_plan.approval_date.month()))
], ],
{ [
linebreak() \ \
linebreak() #calendar_plan.approval_date.year() р.
[#calendar_plan.approval_date.year() р.] ],
},
), ),
[ [
#author.name, #author.name, \
#linebreak()
#head_mentor.degree #head_mentor.degree
#head_mentor.name. #head_mentor.name.
], ],
@ -451,8 +389,7 @@
// page 4 {{{ // page 4 {{{
[ [
#align(center)[#bold([РЕФЕРАТ])] #align(center, bold([РЕФЕРАТ])) \
#linebreak()
#context [ #context [
#let pages = counter(page).final().at(0) #let pages = counter(page).final().at(0)
@ -470,13 +407,11 @@
Пояснювальна записка до курсової роботи: #counters.join(", "). Пояснювальна записка до курсової роботи: #counters.join(", ").
] ]
#linebreak() \
#{ #{
let keywords = abstract.keywords let keywords = abstract.keywords
let is_cyrillic = word => word let is_cyrillic = word => word.split("").any(char => ("А" <= char and char <= "я"))
.split("")
.any(char => ("А" <= char and char <= "я") or char == "Ё" or char == "ё")
let n = keywords.len() let n = keywords.len()
for i in range(n) { for i in range(n) {
@ -495,36 +430,26 @@
keywords.join(", ") keywords.join(", ")
} }
#linebreak() \
#abstract.text #abstract.text
] ]
// }}} // }}}
// page 5 {{{ // page 5
show outline.entry: it => {
show linebreak: none
it
}
outline( outline(
title: [ title: [
ЗМІСТ ЗМІСТ
#v(spacing * 2) #v(spacing * 2, weak: true)
], ],
depth: 2, depth: 2,
indent: auto, indent: auto,
) )
// }}}
}
doc doc
// bibliography {{{ // bibliography
show bibliography: it => { {
set text(size: 0pt)
it
}
heading(depth: 1, numbering: none)[Перелік джерел посилання] heading(depth: 1, numbering: none)[Перелік джерел посилання]
bibliography( bibliography(
@ -568,18 +493,17 @@
} }
context { context {
let citations = query(ref.where(element: none)).map(r => str(r.target)).dedup() for (i, citation) in query(ref.where(element: none)).map(r => str(r.target)).dedup().enumerate() {
for (i, citation) in citations.enumerate() {
enum.item( enum.item(
i + 1, i + 1,
format-entry(bib_data.at(citation)), format-entry(bib_data.at(citation)),
) )
} }
} }
// }}} }
// appendices {{{ // appendices
{
counter(heading).update(0) counter(heading).update(0)
for (i, appendix) in appendices.enumerate() [ for (i, appendix) in appendices.enumerate() [
@ -592,18 +516,95 @@
#show heading: it => { #show heading: it => {
set align(center) set align(center)
set text(size: 14pt, weight: "regular") set text(size: 14pt, weight: "regular")
pagebreak(weak: true) pagebreak(weak: true)
bold(upper(counter(heading).display(it.numbering))) bold(upper(counter(heading).display(it.numbering)))
linebreak() linebreak()
it.body it.body
v(spacing * 2, weak: true) v(spacing * 2, weak: true)
} }
= #appendix.title #heading(appendix.title)
#appendix.content #appendix.content
] ]
// }}}
} }
}
/// DSTU 3008:2015 Template for NURE
/// -> content
/// - doc (content): Content to apply the template to.
/// - doctype ("ЛБ" | "ПЗ"): Document type.
/// - title (str): Title of the document.
/// - subject_shorthand (str): Subject short name.
/// - department_gen (str): Department name in genitive form.
/// - worknumber (int): Number of the work, can be omitted.
/// - authors ((name: str, full_name_gen: str, variant: int, group: str, gender: str),): List of Authors dicts.
/// - mentor (name: str, gender: str, degree: str): Mentors objects.
#let lab-pz-template(
doc,
doctype: "NONE",
title: "NONE",
subject_shorthand: "NONE",
department_gen: "Програмної інженерії",
worknumber: 1,
authors: (),
mentor: (),
) = {
set document(title: title, author: authors.at(0).name)
show: style
context counter(heading).update(worknumber - 1)
align(center)[
МІНІСТЕРСТВО ОСВІТИ І НАУКИ УКРАЇНИ \
ХАРКІВСЬКИЙ НАЦІОНАЛЬНИЙ УНІВЕРСИТЕТ РАДІОЕЛЕКТРОНІКИ
\ \
Кафедра #department_gen
\ \ \
Звіт \
з
#if doctype == "ЛБ" [лабораторної роботи] else [практичної роботи]
#if worknumber != none [№ #worknumber]
з дисципліни: "#subjects.at(subject_shorthand, default: "UNLNOWN SUBJECT, PLEASE OPEN THE ISSUE")"
з теми: "#title"
\ \ \ \
#columns(2)[
#set align(left)
#if authors.len() == 1 [
#let author = authors.at(0)
#if author.gender == "m" { [Виконав:\ ] } else { [Виконала:\ ] }
ст. гр. #author.group\
#author.name\
#if author.variant != none { [Варіант: №#author.variant] }
] else [
Виконали:\
ст. гр. #authors.at(0).group\
#authors.map(a => [ #a.name\ ])
]
#colbreak()
#set align(right)
#if mentor.gender == "m" { [Перевірив:\ ] } else { [Перевірила:\ ] }
#mentor.degree #if mentor.degree.len() >= 15 [\ ]
#mentor.name\
]
#v(1fr)
Харків -- #datetime.today().display("[year]")
]
pagebreak(weak: true)
heading(title)
doc
}