Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
1 result

Target

Select target project
  • jirikalvoda/binary-paint-shop-problem
1 result
Select Git revision
  • master
1 result
Show changes
Commits on Source (2)
Showing
with 64 additions and 17 deletions
File added
../../../gen.cpp
\ No newline at end of file
../../../algo/greedy.cpp
\ No newline at end of file
../../../lib.cpp
\ No newline at end of file
../../../lib.h
\ No newline at end of file
../../../lib.py
\ No newline at end of file
../../../main.cpp
\ No newline at end of file
../../../main.h
\ No newline at end of file
../../../algo/rg.cpp
\ No newline at end of file
../../../algo/rsg.cpp
\ No newline at end of file
../../../algo/semidef_prog.cpp
\ No newline at end of file
../../../algo/semidef_prog_sage.sage
\ No newline at end of file
......@@ -19,9 +19,12 @@ d = pathlib.Path("/".join(__file__.split("/")[:-1]))
web = jk_web.main.web
copy_file = web.copy_file
Page = web.Page
LangPage = web.LangPage
CZ = jk_web.main.CZ
relative_link = web.relative_link
S = web.S
timer = web.timer
html = web.html
base_page = jk_web.main.base_page
......@@ -30,17 +33,30 @@ base_page = jk_web.main.base_page
with web.Module("bakalarka") as module_bakalarka, web.ctx.add_out_path_prefix(jk_web.main.bakalarka_prefix):
bakalarka_pdf = web.ctx.out_path_prefix + "bakalarka.pdf"
web_index = web.Mpage(d,
"index",
@LangPage(lambda: Page("index.html", short_title="Bakalářská práce", higher_page=jk_web.main.web_projects), CZ)
def web_index():
b = html.Builder()
b.h2("Bakalářská práce: Binární paint shop problém")
with b.ul():
b.li.a(href=relative_link(web_prace))("Práce (web)")
b.li.a(href=relative_link(bakalarka_pdf))("Práce (pdf)")
b.li.a(href=relative_link(web_posudek_vedouci))("Posudek vedoucího")
b.li.a(href=relative_link(web_posudek_oponent))("Posudek oponenta")
b.li.a(href=relative_link(web_prezentace))("Prezentace na obhajobě")
return base_page(b.root)
assert str(web_index) == jk_web.main.web_bakalarka, (str(web_index), jk_web.main.web_bakalarka)
with web.Module("bakalarka-prace"):
bakalarka_pdf = web.ctx.out_path_prefix + "prace.pdf"
web_prace = web.Mpage(d,
"prace",
source="index.md",
bibliography=d/"sample.bib",
page_builder=base_page,
source_code_module=(lambda: ...).__module__,
commands=formatitko_commands,
custom_pdf=bakalarka_pdf,
)
assert str(web_index) == jk_web.main.web_bakalarka, (str(web_index), jk_web.main.web_bakalarka)
web_index.higher_page = jk_web.main.web_projects
@web.add_job(web.PRIORITY_WRITE)
def gen_bakalarka_pdf():
......@@ -48,3 +64,22 @@ with web.Module("bakalarka") as module_bakalarka, web.ctx.add_out_path_prefix(jk
from .bakalarka import main
main(pathlib.Path(tmpdirname), False)
print(web.copy_file(None, bakalarka_pdf, tmpdirname+"/bakalarka.pdf", add_out_path_prefix=False))
web_prace.higher_page = web_index
web_posudek_vedouci = web.copy_file(d, "posudek_vedouci.pdf")
web_posudek_oponent = web.copy_file(d, "posudek_oponent.pdf")
with web.Module("bakalarka-prezentace"):
web_prezentace = web.ctx.out_path_prefix + "prezentace.pdf"
@web.add_job(web.PRIORITY_GENERATE)
def gen_prezentace():
import subprocess
tmpdirname = tempfile.mkdtemp(dir=web.build_dir)
shutil.copytree(d/"prezentace", tmpdirname+"/prezentace")
subprocess.run(["./build.sh"], cwd=tmpdirname+"/prezentace", check=True)
print(web.copy_file(None, web_prezentace, tmpdirname+"/prezentace/main.pdf", add_out_path_prefix=False))
File added
File added
../../prezentace
\ No newline at end of file