MCPcopy Index your code
hub / github.com/deepnote/deepnote / readAndConvertQuartoFile

Function readAndConvertQuartoFile

packages/convert/src/quarto-to-deepnote.ts:402–419  ·  view source on GitHub ↗
(
  inputFilePath: string,
  options: ReadAndConvertQuartoFileOptions
)

Source from the content-addressed store, hash-verified

400 * @returns A DeepnoteFile object
401 */
402export 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.

Callers 2

readAndConvertOneFunction · 0.90

Calls 2

parseQuartoFormatFunction · 0.85

Tested by

no test coverage detected