
    f	                        d Z ddlmZ g dZddlZddlmZmZ ddlm	Z	m
Z
mZmZmZmZmZmZmZmZmZmZ ddlmZ ddlmZ dd	lmZ dd
lmZ dd
lmZ ddlmZ ddlmZ  dd	lmZ! dd
lmZ" dd
lmZ# d Z$y)z(The main API for the v3 notebook format.    )annotations)NotebookNodenew_code_cellnew_text_cellnew_notebook
new_outputnew_worksheetnew_metadata
new_authornew_heading_cellnbformatnbformat_minornbformat_schema
reads_jsonwrites_json	read_json
write_jsonto_notebook_jsonreads_py	writes_pyread_pywrite_pyto_notebook_py	downgradeupgradeparse_filenameN   )r   r   )r   r   r   r   r   r   r   r
   r   r   r   r	   )reads)to_notebook)writesc                    t         j                  j                  |       \  }}|dv rd}n|dk(  rd}n	| }| dz   } d}| ||fS )a  Parse a notebook filename.

    This function takes a notebook filename and returns the notebook
    format (json/py) and the notebook name. This logic can be
    summarized as follows:

    * notebook.ipynb -> (notebook.ipynb, notebook, json)
    * notebook.json  -> (notebook.json, notebook, json)
    * notebook.py    -> (notebook.py, notebook, py)
    * notebook       -> (notebook.ipynb, notebook, json)

    Parameters
    ----------
    fname : unicode
        The notebook filename. The filename can use a specific filename
        extension (.ipynb, .json, .py) or none, in which case .ipynb will
        be assumed.

    Returns
    -------
    (fname, name, format) : (unicode, unicode, unicode)
        The filename, notebook name and format.
    ).ipynbz.jsonjsonz.pypyr"   )ospathsplitext)fnamebasenameextformat_s       O/var/www/cvtools/html/venv/lib/python3.12/site-packages/nbformat/v3/__init__.pyr   r   @   sW    0 GG$$U+MHc
!!	 (G##    )%__doc__
__future__r   __all__r%   convertr   r   nbbaser   r   r   r   r   r   r   r
   r   r   r   r	   nbjsonr   r   r   r   r   r    r   r   nbpyr   r   r   r   r   r    r-   r,   <module>r6      sU    . #8 
 '    ' ' 3 ( ) " # / $ %!$r-   