PK)K.$00multi_rise/.__init__.py.swpb0VIM 8.0sYDympacerrrcs-24-103-236-65.nyc.biz.rr.com~mpacer/jupyter/multi_rise/multi_rise/__init__.pyutf-8 3210#"! Utpad Q d('v4 | G  Q combine_nbs(nb_files=parse_index(args.index), output=args.output) args = ap.parse_args(argv) default='combined_nb.ipynb') ap.add_argument('--output', nargs='?', type=Path, default='index.txt') ap.add_argument('--index', nargs='?', type=Path, ap = argparse.ArgumentParser(description='Combine notebooks and make slides')def main(argv=None): return nb_files if Path(fname.rstrip()).is_file()] nb_files = [fname.rstrip() for fname in f.readlines() with fp.open() as f: if isinstance(fp, Path):def parse_index(fp):__version__ = '0.1'from .combine import combine_nbsfrom pathlib import Pathimport argparseso that the notebooks don't cause issues for each other."""presentation. It adds a cell in between each notebook to reset the environment"""This is a quick shortcut to combine Jupyter notebooks into a single risePKKhe7e7multi_rise/.__init__.py.un~VimUnDo 5\dj7obkNjt"from multi_rise import combine_nbsYs_Y5_Y__version__ = '0.1'5_Y5_vbY"""This is """5_ vbY"""This is """5_'vbY'Q"""This is a quick shortcut to combine notebooks into a single rise presentation.5_vbY*!It adds a cell in between each"""5_ !vbYBY"""This is a quick shortcut to combine Jupyter notebooks into a single rise presentation.VIt adds a cell in between each notebook to reset the environment so that the notebooks%don't cause issues for each other."""5_ vbY5_ vbYL5_ vbYMfrom multi_rise import main5_ vbYN 5_  vbY]  5_ vbYl  5_vbYl 5_vbYnimport argparse5_vbYo5_vbYp__version__ = '0.1'5_vbYq 5_vbYr  5_ vbYv  5_vbY5_ vbY  5_ vbY 5_ vbY 5_vbY "from multi_rise import combine_nbs5_vbY from import combine_nbs5_vbYn from combine import combine_nbs5_vbYo from import combine_nbs5_vbYr from . import combine_nbs5_vbYdef parse_index(fp): if isinstance(fp, Path): with fp.open() as f:A nb_files = [fname.rstrip() for fname in f.readlines(): if Path(fname.rstrip()).is_file()] return nb_files5PK)KNh00multi_rise/.combine.py.swpb0VIM 8.0fYDympacerrrcs-24-103-236-65.nyc.biz.rr.com~mpacer/jupyter/multi_rise/multi_rise/combine.pyutf-8 3210#"! Utp-ad -a`;  yxWV<  p ; Z - j L $ main() from . import mainif __name__ == '__main__': nbformat.write(combined_nb, str(output)) combined_nb.cells.append(cell) cell.metadata.origin = file for cell in nb.cells: })) } "slide_type": 'slide' "slideshow": { metadata={ new_markdown_cell("Execute for next speaker", nb.cells.append( })) } "slide_type": 'slide' "slideshow": { metadata={ new_code_cell("%reset -f", nb.cells.append( combined_nb.metadata.merge(nb.metadata) nb = nbformat.read(file, as_version=4) for file in nb_files: combined_nb = new_notebook() './Untitled3.ipynb'] './Untitled2.ipynb', nb_files = ['./Untitled.ipynb', if nb_files is None: output = output.with_suffix(".ipynb") if "ipynb" not in output.suffix:def combine_nbs(nb_files=None, output=None):from nbformat.v4 import new_code_cell, new_markdown_cell, new_notebookimport nbformat# -*- coding: utf-8 -*-PKKbWmulti_rise/__init__.py"""This is a quick shortcut to combine Jupyter notebooks into a single rise presentation. It adds a cell in between each notebook to reset the environment so that the notebooks don't cause issues for each other.""" import argparse from pathlib import Path from .combine import combine_nbs __version__ = '0.1' def parse_index(fp): if isinstance(fp, Path): with fp.open() as f: nb_files = [fname.rstrip() for fname in f.readlines() if Path(fname.rstrip()).is_file()] return nb_files def main(argv=None): ap = argparse.ArgumentParser(description='Combine notebooks and make slides') ap.add_argument('--index', nargs='?', type=Path, default='index.txt') ap.add_argument('--output', nargs='?', type=Path, default='combined_nb.ipynb') args = ap.parse_args(argv) combine_nbs(nb_files=parse_index(args.index), output=args.output) PKKYj ttmulti_rise/combine.py# -*- coding: utf-8 -*- import nbformat from nbformat.v4 import new_code_cell, new_markdown_cell, new_notebook def combine_nbs(nb_files=None, output=None): if "ipynb" not in output.suffix: output = output.with_suffix(".ipynb") if nb_files is None: nb_files = ['./Untitled.ipynb', './Untitled2.ipynb', './Untitled3.ipynb'] combined_nb = new_notebook() for file in nb_files: nb = nbformat.read(file, as_version=4) combined_nb.metadata.merge(nb.metadata) nb.cells.append( new_code_cell("%reset -f", metadata={ "slideshow": { "slide_type": 'slide' } })) nb.cells.append( new_markdown_cell("Execute for next speaker", metadata={ "slideshow": { "slide_type": 'slide' } })) for cell in nb.cells: cell.metadata.origin = file combined_nb.cells.append(cell) nbformat.write(combined_nb, str(output)) if __name__ == '__main__': from . import main main() PK!HWr)0)multi_rise-0.1.dist-info/entry_points.txtN+I/N.,()-)Ɍ/,NUU@pr3PK!H}0RRmulti_rise-0.1.dist-info/WHEEL1 0 RZtMDtPI{w<wUnbaKM*A1ѭ g\Ic c~PK!HXR!multi_rise-0.1.dist-info/METADATAURn0+^Hn'4qcaQrYG% H| "gxE{h'6I~l/Sv4 E>@}d؃7k3SzRd!*o #sHb7< ).y0\ϵ,;X`,ITO=M44dDslfU{>Os:x|CCJ6#Z+>?5)wF;%qw&qho3՘r :2:w_vF>J%n$ N1jaP a*GgPKAjSƲdKmO8=AAZiڎΪ,ж{3cy)ƾ4~/٦Cך0t~M3}<+PK!Hzdžmulti_rise-0.1.dist-info/RECORDur@} (