Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/project/conat/api/editor.ts
1450 views
1
export { jupyter_strip_notebook as jupyterStripNotebook } from "@cocalc/jupyter/nbgrader/jupyter-parse";
2
export { jupyter_run_notebook as jupyterRunNotebook } from "@cocalc/jupyter/nbgrader/jupyter-run";
3
export { nbconvert as jupyterNbconvert } from "../../jupyter/convert";
4
export { run_formatter_string as formatterString } from "../../formatters";
5
export { logo as jupyterKernelLogo } from "@cocalc/jupyter/kernel/logo";
6
export { get_kernel_data as jupyterKernels } from "@cocalc/jupyter/kernel/kernel-data";
7
export { newFile } from "@cocalc/backend/misc/new-file";
8
9
import { printSageWS as printSageWS0 } from "@cocalc/project/print_to_pdf";
10
import { filename_extension } from "@cocalc/util/misc";
11
export async function printSageWS(opts): Promise<string> {
12
let pdf;
13
const ext = filename_extension(opts.path);
14
if (ext) {
15
pdf = `${opts.path.slice(0, opts.path.length - ext.length)}pdf`;
16
} else {
17
pdf = opts.path + ".pdf";
18
}
19
20
await printSageWS0({
21
path: opts.path,
22
outfile: pdf,
23
title: opts.options?.title,
24
author: opts.options?.author,
25
date: opts.options?.date,
26
contents: opts.options?.contents,
27
subdir: opts.options?.subdir,
28
extra_data: opts.options?.extra_data,
29
timeout: opts.options?.timeout,
30
});
31
return pdf;
32
}
33
34
export { createTerminalService } from "@cocalc/project/conat/terminal";
35
36