ipypublish.convert.main module¶
-
ipypublish.convert.main.
handle_error
(msg, err_type, raise_msg=None, log_msg=None)[source]¶ handle an error, by logging it, then raising
-
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
Parameters: - 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
Returns: - outpath (str) – path to output file
- exporter (nbconvert.exporters.Exporter) – the exporter used