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