Skip to content
Snippets Groups Projects
Commit a5a5f9f8 authored by tuhe's avatar tuhe
Browse files

tmp updates

parent 229ce1f7
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
# beamer-slider
setuptools.setup(
name="coursebox",
version="0.1.15",
version="0.1.16",
author="Tue Herlau",
author_email="tuhe@dtu.dk",
description="A course management system currently used at DTU",
......
Metadata-Version: 2.1
Name: coursebox
Version: 0.1.15
Version: 0.1.16
Summary: A course management system currently used at DTU
Home-page: https://lab.compute.dtu.dk/tuhe/coursebox
Author: Tue Herlau
......
......@@ -378,6 +378,12 @@ def class_information():
ri['latex_long'] = f"{nd.strftime('%A')} {nd.day}{ab} {nd.strftime('%B')}, {nd.year}"
ri['latex_short'] = f"{nd.strftime('%B')} {nd.day}{ab}, {nd.year}"
d['reports_info'][k] = ri
ppi = core_conf.get('post_process_info', None)
if ppi is not None:
d = ppi(paths, d)
return d
def fix_instructor_comma(dd, instructors):
......
......@@ -306,7 +306,7 @@ def fix_shared(paths, output_dir, pdf2png=False,dosvg=True,verbose=False, compil
# Perform sync here.
for rel in source:
if rel.endswith("_partial.tex"):
if "_partial." in rel:
continue
if rel not in target or target[rel]['hash'] != source[rel]['hash']:
......@@ -335,11 +335,13 @@ def fix_shared(paths, output_dir, pdf2png=False,dosvg=True,verbose=False, compil
def jinjafy_shared_templates_dir(paths, info):
tpd = paths['shared'] + "/templates"
for f in glob.glob(tpd + "/*.tex"):
print(f)
ex = "_partial.tex"
if f.endswith(ex):
jinjafy_template(info, file_in=f, file_out=f"{tpd}/{os.path.basename(f)[:-len(ex)]}.tex")
for f in glob.glob(tpd + "/*.*"):
# ex = "_partial."
if "_partial." in f:
ff = os.path.basename(f)
ff = ff[:ff.rfind("_partial.")]
jinjafy_template(info, file_in=f, file_out=f"{tpd}/{ff}.{f.split('.')[-1]}")
def get_filters():
......
......@@ -5,7 +5,7 @@ def setup_coursebox(working_dir, course_number="02450", semester='spring', year=
slides_includelabels=False,
continuing_education_mode = False,
slides_shownotes=False,
continuing_education_month = "March", **kwargs):
continuing_education_month = "March", post_process_info=None, **kwargs):
info_paths.core_conf['working_dir'] = working_dir
info_paths.core_conf['course_number'] = course_number
......@@ -16,5 +16,7 @@ def setup_coursebox(working_dir, course_number="02450", semester='spring', year=
info_paths.core_conf['continuing_education_mode'] = continuing_education_mode
info_paths.core_conf['continuing_education_month'] = continuing_education_month
info_paths.core_conf['slides_shownotes'] = slides_shownotes
info_paths.core_conf['post_process_info'] = post_process_info
for a, val in kwargs.items():
info_paths.core_conf[a] = val
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment