ipypublish.convert.main module

ipypublish.convert.main.create_config(exporter_data, replacements)[source]
ipypublish.convert.main.dict_to_config(config, unflatten=True)[source]
ipypublish.convert.main.export_notebook(final_nb, exporter_cls, config, jinja_template)[source]
ipypublish.convert.main.postprocess_nb(body, resources)[source]
ipypublish.convert.main.publish(ipynb_path, conversion='latex_ipypublish_main', outpath=None, dump_files=False, ignore_prefix='_', clear_existing=False, create_pdf=False, pdf_in_temp=False, pdf_debug=False, plugin_folder_paths=(), dry_run=False)[source]

convert one or more Jupyter notebooks to a published format

paths can be string of an existing file or folder, or a pathlib.Path like object

all files linked in the documents are placed into a single folder

  • ipynb_path – notebook file or directory
  • outformat (str) – output format to use
  • outpath (str or pathlib.Path) – path to output converted files
  • dump_files (bool) – whether to write files from nbconvert (images, etc) to outpath
  • ignore_prefix (str) – ignore ipynb files with this prefix
  • clear_existing (str) – whether to clear existing external files in outpath folder
  • create_pdf (bool) – whether to convert to pdf (if converting to latex)
  • pdf_in_temp (bool) – whether to run pdf conversion in a temporary folder
  • pdf_debug (bool) – if True, run latexmk in interactive mode
  • dry_run (bool) – if True, do not create any files

  • outpath (str) – path to output file
  • exporter (nbconvert.exporters.Exporter) – the exporter used

ipypublish.convert.main.write_output(body, resources, outdir, main_file_name, output_external, files_folder, internal_files, clear_existing)[source]