Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions quarto/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,44 @@

from quarto.quarto import find_quarto

def render_to_path(input,
output_format = None,
output_file = None,
execute = True,
execute_params = None,
execute_dir = None,
cache = None,
cache_refresh = False,
kernel_keepalive = None,
kernel_restart = False,
debug = False,
quiet = False,
pandoc_args = None,
output_dir_path=None):

render(input=input,
output_format=output_format,
output_file=output_file,
execute=execute,
execute_params=execute_params,
execute_dir=execute_dir,
cache=cache,
cache_refresh=cache_refresh,
kernel_keepalive=kernel_keepalive,
kernel_restart=kernel_restart,
debug=debug,
quiet=quiet,
pandoc_args=pandoc_args)

if output_dir_path is not None:
output_file_path = os.path.join(output_folder, output_file)
if output_file is None:
output_file = os.path.basename(input)
os.makedirs(output_dir_path, exist_ok=True)
os.rename(output_file, output_file_path)

return output_file_path

def render(input,
output_format = None,
output_file = None,
Expand Down