( inputFilePath: string, options: ReadAndConvertQuartoFileOptions )
| 400 | * @returns A DeepnoteFile object |
| 401 | */ |
| 402 | export async function readAndConvertQuartoFile( |
| 403 | inputFilePath: string, |
| 404 | options: ReadAndConvertQuartoFileOptions |
| 405 | ): Promise<DeepnoteFile> { |
| 406 | const content = await fs.readFile(inputFilePath, 'utf-8') |
| 407 | const document = parseQuartoFormat(content) |
| 408 | |
| 409 | return convertQuartoDocumentToDeepnote( |
| 410 | { |
| 411 | filename: basename(inputFilePath), |
| 412 | document, |
| 413 | }, |
| 414 | { |
| 415 | projectName: options.projectName, |
| 416 | projectId: options.projectId, |
| 417 | } |
| 418 | ) |
| 419 | } |
| 420 | |
| 421 | /** |
| 422 | * Converts a single Quarto (.qmd) file into a single Deepnote project file. |
no test coverage detected