
    ^h<                     0    S SK r S SKrS SKrS SKrS rS rg)    Nc                      SSSSS./$ )z&Metadata for notebook bundlerextensiontarball_bundlerz!nbclassic.bundler.tarball_bundlerzNotebook Tarball (tar.gz)download)namemodule_namelabelgroup r
       [/home/james-whalen/.local/lib/python3.13/site-packages/nbclassic/bundler/tarball_bundler.py_jupyter_bundlerextension_pathsr      s     ":-	 	 	r   c                    US   n[         R                  " US   5      R                  S5      n[        R                  R                  U5      S   nSR                  U5      n[        R                  " U5      n[        U5      Ul
        [        R                  " 5        n[        R                  " USUS9 nUR                  U[        R                  " U5      5        SSS5        U R                  U5        U R!                  S	S
5        U R#                  UR%                  5       5        SSS5        g! , (       d  f       NY= f! , (       d  f       g= f)zCreate 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??HGG$$%67:M%%m4L??,-D$%DI	\\,
CsKKbjj)9:; D 	%%l3>+=> 	z**,- 
CC 
s%   D>3'D-A
D>-
D;	7D>>
E)r   r   r   r   r   r-   r
   r   r   <module>r.      s    
 	  .r   