Add title page. Modify conf.py.
3 unresolved threads
3 unresolved threads
Default title page for calibration report is substituted by manually written. A config file conf.py
tells sphinx
to use a manual title page. Corresponding tex
file is created by the python function make_titlepage
.
In suggest code default config file is modified by make_report
with the same way, as it is done for index.rst
.
Merge request reports
Activity
Filter activity
- Resolved by Mikhail Karnevskiy
- Resolved by Mikhail Karnevskiy
- Resolved by Mikhail Karnevskiy
- Resolved by Mikhail Karnevskiy
- Resolved by Mikhail Karnevskiy
- Resolved by Mikhail Karnevskiy
added 34 commits
-
3de8576f...eeb57d91 - 30 commits from branch
master
- 5ae6113d - Add title page. Modify conf.py.
- 1ce1c133 - Add logo
- ffc7004a - New logo for report
- efcfe680 - Use different approach to edit conf.py file
Toggle commit list-
3de8576f...eeb57d91 - 30 commits from branch
@haufs Suggested changes were introduces. Branch is re-based on master. Could you review it again.
5 from shutil import copy, move, rmtree, copytree 8 6 from queue import Queue 9 import re 10 import shutil 11 from subprocess import Popen, PIPE, check_output, check_call 7 from collections import OrderedDict 8 import glob 9 from jinja2 import Template 12 10 import textwrap 13 from time import sleep 14 import time 15 from uuid import uuid4 16 11 import tabulate 12 from importlib.machinery import SourceFileLoader 13 from xfel_calibrate import settings 208 with open("{}/conf.py.tmp".format(run_path), "w") as mf: 209 latex_elements = {'extraclassoptions': ',openany, oneside', 210 'maketitle': r'\input{titlepage.tex.txt}'} 211 mf.write("latex_elements = {}\n".format(latex_elements)) 212 mf.write("latex_logo = '{}/{}'\n".format(module_path, 213 settings.logo_path)) 214 mf.write("latex_additional_files = ['titlepage.tex.txt']\n") 215 216 for var in l_var: 217 if var in ['latex_elements', 'latex_logo', 218 'latex_additional_files']: 219 continue 220 tmpl = '{} = {}\n' 221 v = getattr(conf, var, None) 222 if isinstance(v, str): 223 print(var, v) changed this line in version 6 of the diff
234 254 os.chdir(run_path) 235 255 try: 236 import subprocess 237 subprocess.check_call(["make", "latexpdf"]) 256 check_call(["make", "latexpdf"]) 238 257 239 except subprocess.CalledProcessError: 258 except CalledProcessError: 240 259 print("Failed to make pdf documentation") 241 print("Temp files will not be deleted and "+ 260 print("Temp files will not be deleted and " + 242 261 "can be inspected at: {}".format(run_path)) 243 262 return 244 263 print("Moving report to final location: {}".format(out_path)) 245 264 for f in glob.glob(r'{}/_build/latex/*.pdf'.format(run_path)): 246 265 print(f) changed this line in version 6 of the diff
mentioned in commit aa52736a
Please register or sign in to reply