
    @=dD                     2    d dl Z d dlZd dlZd dlZd Zd ZdS )    Nc                      dddddgS )z&Metadata for notebook bundlerextensiontarball_bundlerz!nbclassic.bundler.tarball_bundlerzNotebook Tarball (tar.gz)download)namemodule_namelabelgroup r
       Alib/python3.11/site-packages/nbclassic/bundler/tarball_bundler.py_jupyter_bundlerextension_pathsr      s$     ":-	 	 	 	r   c                    |d         }t          j        |d                                       d          }t          j                            |          d         }d                    |          }t          j        |          }t          |          |_
        t          j                    5 }t          j        |d|          5 }|                    |t          j        |                     ddd           n# 1 swxY w Y   |                     |           |                     d	d
           |                     |                                           ddd           dS # 1 swxY w Y   dS )a
  Create a compressed tarball containing the notebook document.
    
    Parameters
    ----------
    handler : tornado.web.RequestHandler
        Handler that serviced the bundle request
    model : dict
        Notebook model from the configured ContentManager
    r   contentzutf-8r   z	{}.tar.gzzw:gz)fileobjNzContent-Typezapplication/gzip)nbformatwritesencodeospathsplitextformattarfileTarInfolensizeioBytesIOopenaddfileset_attachment_header
set_headerfinishgetvalue)	handlermodelnotebook_filenamenotebook_contentnotebook_nametar_filenameinfo
tar_buffertars	            r   bundler-      s    fuY'788??HHG$$%677:M%%m44L?,--D$%%DI	 .\,
CCC 	<sKKbj)9::;;;	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	%%l333>+=>>> 	z**,,---. . . . . . . . . . . . . . . . . .s7   +E")C8,E"8C<	<E"?C<	 AE""E&)E&)r   r   r   r   r   r-   r
   r   r   <module>r.      sS    
			 				    . . . . .r   