Skip to content

Commit

Permalink
fix titlemap replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
derchrisuk committed Apr 4, 2021
1 parent 2224b23 commit 305398f
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions make-blender.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@
import platform
from shutil import copyfile

titlemap = {
'id': "11404", 'title': "Attacking CPUs with Power Side Channels from Software",
'id': "205", 'title': "Attacking CPUs with Power Side Channels from Software",
}
titlemap = {}

#titlemap = {
# "205" : {
# "title" : "Attacking CPUs with Power Side Channels from Software"
# },
# "20" : {
# "title" : "New title for Talk id 20"
# }
#}

# Parse arguments
parser = argparse.ArgumentParser(
Expand Down Expand Up @@ -217,23 +223,23 @@ def enqueue_job(event):

if platform.system() == 'Darwin':
if args.debug:
print("running: Blender.app --background %s --python-use-system-env --python %s --use-extension 1 --threads 0 --render-output %s --render-anim" % (work_source, work_doc, intermediate_clip))
run(r'/Applications/Blender.app/Contents/MacOS/Blender --background {source} --python-use-system-env --python {jobpath} --use-extension 1 --threads 0 --render-output {locationpath} --render-anim',
print("running: Blender.app --background %s --python-use-system-env --python %s --use-extension 0 --threads 0 --render-output %s --render-anim" % (work_source, work_doc, intermediate_clip))
run(r'/Applications/Blender.app/Contents/MacOS/Blender --background {source} --python-use-system-env --python {jobpath} --use-extension 0 --threads 0 --render-output {locationpath} --render-anim',
source=work_source,
jobpath=work_doc,
locationpath=intermediate_clip)

if platform.system() == 'Windows':
if args.debug:
print("running: blender.exe --background %s --python-use-system-env --python %s --use-extension 1 --threads 0 --render-output %s --render-anim" % (work_source, work_doc, intermediate_clip))
run(r'C:/Program\ Files/Blender\ Foundation/Blender\ 2.92/blender.exe --background {source} --python-use-system-env --python {jobpath} --use-extension 1 --threads 0 --render-output {locationpath} --render-anim',
print("running: blender.exe --background %s --python-use-system-env --python %s --use-extension 0 --threads 0 --render-output %s --render-anim" % (work_source, work_doc, intermediate_clip))
run(r'C:/Program\ Files/Blender\ Foundation/Blender\ 2.92/blender.exe --background {source} --python-use-system-env --python {jobpath} --use-extension 0 --threads 0 --render-output {locationpath} --render-anim',
source=work_source,
jobpath=work_doc,
locationpath=intermediate_clip)
if platform.system() == 'Linux':
if args.debug:
print("running: blender --background %s --python-use-system-env --python %s --use-extension 1 --threads 0 --render-output %s --render-anim" % (work_source, work_doc, intermediate_clip))
run(r'blender --background {source} --python-use-system-env --python {jobpath} --use-extension 1 --threads 0 --render-output {locationpath} --render-anim',
print("running: blender --background %s --python-use-system-env --python %s --use-extension 0 --threads 0 --render-output %s --render-anim" % (work_source, work_doc, intermediate_clip))
run(r'blender --background {source} --python-use-system-env --python {jobpath} --use-extension 0 --threads 0 --render-output {locationpath} --render-anim',
source=work_source,
jobpath=work_doc,
locationpath=intermediate_clip)
Expand Down Expand Up @@ -302,9 +308,10 @@ def finalize_job(job_id, event):
print("skipping day %s (%s)" % (event['day'], event['title']))
continue

if str(event['id']) in str(titlemap['id']):
for replace_id, replace_title in titlemap.items():
if str(event['id']) == str(replace_id):
event_print(event, "titlemap replacement")
event['title'] = titlemap['title']
event['title'] = str(replace_title['title'])

event_print(event, "enqueued as " + str(event['id']))

Expand Down

0 comments on commit 305398f

Please sign in to comment.