( inputFilePath: string, options: ReadAndConvertIpynbFileOptions )
| 144 | * @returns A DeepnoteFile object |
| 145 | */ |
| 146 | export async function readAndConvertIpynbFile( |
| 147 | inputFilePath: string, |
| 148 | options: ReadAndConvertIpynbFileOptions |
| 149 | ): Promise<DeepnoteFile> { |
| 150 | const notebook = await parseIpynbFile(inputFilePath) |
| 151 | |
| 152 | return convertJupyterNotebookToDeepnote( |
| 153 | { |
| 154 | filename: basename(inputFilePath), |
| 155 | notebook, |
| 156 | }, |
| 157 | { |
| 158 | projectId: options.projectId, |
| 159 | projectName: options.projectName, |
| 160 | } |
| 161 | ) |
| 162 | } |
| 163 | |
| 164 | /** |
| 165 | * Converts a single Jupyter Notebook (.ipynb) file into a Deepnote project file. |
no test coverage detected