1+ """QuartoReportView class for generating Quarto reports."""
2+
13import os
24import subprocess
35import sys
1113from . import table_utils
1214from .utils import create_folder , get_relative_file_path , is_url , sort_imports
1315
16+ GITHUB_ORG_URL = "https://github.com/Multiomics-Analytics-Group"
17+ ORG = "Multiomics Network Analytics Group (MoNA)"
18+ GITHUB_ORG_URL_BRACKETS = "{https://github.com/Multiomics-Analytics-Group}"
19+ REPO_URL = "https://github.com/Multiomics-Analytics-Group/vuegen"
20+ LOGO_URL = (
21+ "https://raw.githubusercontent.com/Multiomics-Analytics-Group/"
22+ "vuegen/main/docs/images/vuegen_logo.svg"
23+ )
24+
1425
1526class QuartoReportView (r .ReportView ):
1627 """
@@ -321,9 +332,10 @@ def _create_yaml_header(self) -> str:
321332 format:"""
322333 )
323334 # Define format-specific YAML configurations
335+ # \u007b is { and \u007d is }
324336 format_configs = {
325337 r .ReportType .HTML : textwrap .dedent (
326- """
338+ f """
327339 html:
328340 toc: true
329341 toc-location: left
@@ -333,39 +345,43 @@ def _create_yaml_header(self) -> str:
333345 include-in-header:
334346 text: |
335347 <style type="text/css">
336- .footer {
348+ .footer \u007b
337349 position: relative;
338350 left: 0;
339351 width: 100%;
340352 text-align: center;
341353 margin-top: 20px;
342- }
354+ \u007d
343355 </style>
344356 include-after-body:
345357 text: |
346358 <footer class="footer">
347359 This report was generated with
348- <a href="https://github.com/Multiomics-Analytics-Group/vuegen " target="_blank">
349- <img src="https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg " alt="VueGen" width="65px">
360+ <a href="{ REPO_URL } " target="_blank">
361+ <img src="{ LOGO_URL } " alt="VueGen" width="65px">
350362 </a>
351- | Copyright 2025 <a href="https://github.com/Multiomics-Analytics-Group" target="_blank">Multiomics Network Analytics Group (MoNA)</a>
363+ | Copyright 2025 <a href="{ GITHUB_ORG_URL } " target="_blank">
364+ { ORG } </a>
352365 </footer>"""
353366 ),
367+ # \u007b is { and \u007d is }
354368 r .ReportType .PDF : textwrap .indent (
355369 textwrap .dedent (
356- """
370+ f """
357371 pdf:
358372 toc: false
359373 fig-align: center
360374 margin:
361375 - bottom=40mm
362376 include-in-header:
363377 text: |
364- \\ usepackage{scrlayer-scrpage}
365- \\ usepackage{hyperref}
378+ \\ usepackage{{ scrlayer-scrpage} }
379+ \\ usepackage{{ hyperref} }
366380 \\ clearpairofpagestyles
367- \\ lofoot{This report was generated with \\ href{https://github.com/Multiomics-Analytics-Group/vuegen}{VueGen} | \\ copyright{} 2025 \\ href{https://github.com/Multiomics-Analytics-Group}{Multiomics Network Analytics Group}}
368- \\ rofoot{\\ pagemark}"""
381+ \\ lofoot\u007b This report was generated with
382+ \\ href{{{ REPO_URL } }}{{VueGen}} | \\ copyright{{}} 2025
383+ \\ href{ GITHUB_ORG_URL_BRACKETS } \u007b { ORG } \u007d \u007d
384+ \\ rofoot{{\\ pagemark}}"""
369385 ),
370386 " " ,
371387 ),
@@ -386,7 +402,7 @@ def _create_yaml_header(self) -> str:
386402 " " ,
387403 ),
388404 r .ReportType .REVEALJS : textwrap .dedent (
389- """
405+ f """
390406 revealjs:
391407 toc: false
392408 smaller: true
@@ -397,22 +413,23 @@ def _create_yaml_header(self) -> str:
397413 include-in-header:
398414 text: |
399415 <style type="text/css">
400- .footer {
416+ .footer \u007b
401417 position: fixed;
402418 left: 0;
403419 bottom: 0;
404420 width: 100%;
405421 text-align: center;
406- }
422+ \u007d
407423 </style>
408424 include-after-body:
409425 text: |
410426 <footer class="footer">
411427 This report was generated with
412- <a href="https://github.com/Multiomics-Analytics-Group/vuegen " target="_blank">
413- <img src="https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg " alt="VueGen" width="65px">
428+ <a href="{ REPO_URL } " target="_blank">
429+ <img src="{ LOGO_URL } " alt="VueGen" width="65px">
414430 </a>
415- | Copyright 2025 <a href="https://github.com/Multiomics-Analytics-Group" target="_blank">Multiomics Network Analytics Group (MoNA)</a>
431+ | Copyright 2025 <a href="{ GITHUB_ORG_URL } "
432+ target="_blank">{ ORG } </a>
416433 </footer>"""
417434 ),
418435 r .ReportType .PPTX : textwrap .indent (
@@ -425,7 +442,7 @@ def _create_yaml_header(self) -> str:
425442 " " ,
426443 ),
427444 r .ReportType .JUPYTER : textwrap .dedent (
428- """
445+ f """
429446 html:
430447 toc: true
431448 toc-location: left
@@ -435,22 +452,23 @@ def _create_yaml_header(self) -> str:
435452 include-in-header:
436453 text: |
437454 <style type="text/css">
438- .footer {
455+ .footer \u007b
439456 position: relative;
440457 left: 0;
441458 width: 100%;
442459 text-align: center;
443460 margin-top: 20px;
444- }
461+ \u007d
445462 </style>
446463 include-after-body:
447464 text: |
448465 <footer class="footer">
449466 This report was generated with
450- <a href="https://github.com/Multiomics-Analytics-Group/vuegen " target="_blank">
451- <img src="../docs/images/vuegen_logo.svg " alt="VueGen" width="65px">
467+ <a href="{ REPO_URL } " target="_blank">
468+ <img src="{ LOGO_URL } " alt="VueGen" width="65px">
452469 </a>
453- | Copyright 2025 <a href="https://github.com/Multiomics-Analytics-Group" target="_blank">Multiomics Network Analytics Group (MoNA)</a>
470+ | Copyright 2025 <a href="{ GITHUB_ORG_URL } "
471+ target="_blank">{ ORG } </a>
454472 </footer>"""
455473 ),
456474 }
0 commit comments