Skip to content

Commit

Permalink
Minir fixes to templates, new copy script
Browse files Browse the repository at this point in the history
  • Loading branch information
sesquideus committed Nov 23, 2024
1 parent 4a56910 commit 3e772fc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dgs-copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from typing import Tuple


VERSION = "3.04"
DATE = "2023-11-22"
VERSION = "4.0"
DATE = "2024-11-23"


def fire(query):
Expand Down Expand Up @@ -80,7 +80,7 @@ def main():
# rsync everything to server
if not args.dry_run:
fire(f"rsync --recursive --compress --verbose --partial --progress --copy-links --chmod=775 "
f"tasks {args.user}@ksp:/var/www-archiv/trojstenweb/")
f"tasks trojstenweb@ksp:/var/www/trojstenweb/")

# delete the temporary structure
fire("rm -rf tasks")
Expand Down
2 changes: 1 addition & 1 deletion modules/naboj/templates/constants.jtt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<no symbol defined>
(@ endif @) &
(@ if 'value' in constant and 'symbol' in constant @)
$\SI[(@ if 'siextra' in constant @)(* constant.siextra *)(@ endif @)]{(* constant.value *)}{(* constant.unit *)}$
$\qty[(@ if 'siextra' in constant @)(* constant.siextra *)(@ endif @)]{(* constant.value *)}{(* constant.unit *)}$
(@ else @)
\textbf{\textcolor{red}{no value or unit defined}}
(@ endif @) \\
Expand Down
2 changes: 1 addition & 1 deletion modules/scholar/templates/homework-base.jtt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

\titleformat{\section}[block]{\Huge\bfseries\centering}{}{0pt}{}
\titleformat{\subsection}[hang]{\Large\bfseries\vspace{4mm}\vspace*{-4mm}}{\arabic{section}.\arabic{subsection}\quad}{0pt}{}
\titleformat{\subsubsection}[hang]{\bfseries}{}{0pt}{\arabic{section}.\arabic{subsection}\alph{subsubsection}\quad}[]
\titleformat{\subsubsection}[hang]{\bfseries}{}{0pt}{}[]
\titleformat{\paragraph}[hang]{\it\bfseries}{}{0pt}{}[]
\titlespacing{\section}{0pt}{6mm}{2mm}
\titlespacing{\subsection}{0pt}{0mm}{0mm}
Expand Down
3 changes: 2 additions & 1 deletion modules/scholar/templates/homework-students.jtt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

(@ block sections @)
(@ for problem in issue.problems @)
\setActive{\rootDirectory/(* module.id *)/(* course.id *)/(* year.id *)/(* self.typedir() *)/(* issue.id *)/(* problem.id *)}%
\subsection{%
\texorpdfstring{%
(* problem.name *)(@ if 'bonus' in problem and problem.bonus @) (bonus)(@ endif @)%
Expand All @@ -10,7 +11,7 @@
}%
}
\label{sec:(* problem.id *)}
\tryInput{\activeDirectory/(* problem.id *)/problem.tex}
\protectedInput{\activeDirectory/problem.tex}
(@ if problem.subproblems|length == 0 @)
(@ block solution scoped @)(@ endblock solution @)
(@ endif @)
Expand Down

0 comments on commit 3e772fc

Please sign in to comment.