Reads and converts ONE source notebook into a single-notebook `DeepnoteFile`.
(
format: ConvertDirectoryOptions['format'],
inputFilePath: string,
options: { projectName: string; projectId?: string }
)
| 202 | |
| 203 | /** Reads and converts ONE source notebook into a single-notebook `DeepnoteFile`. */ |
| 204 | function readAndConvertOne( |
| 205 | format: ConvertDirectoryOptions['format'], |
| 206 | inputFilePath: string, |
| 207 | options: { projectName: string; projectId?: string } |
| 208 | ): Promise<DeepnoteFile> { |
| 209 | switch (format) { |
| 210 | case 'jupyter': |
| 211 | return readAndConvertIpynbFile(inputFilePath, options) |
| 212 | case 'quarto': |
| 213 | return readAndConvertQuartoFile(inputFilePath, options) |
| 214 | case 'percent': |
| 215 | return readAndConvertPercentFile(inputFilePath, options) |
| 216 | case 'marimo': |
| 217 | return readAndConvertMarimoFile(inputFilePath, options) |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | /** |
| 222 | * Converts every notebook in a directory to its own single-notebook `.deepnote` file — |
no test coverage detected