mirror of
https://github.com/outline/outline.git
synced 2026-11-21 05:24:03 +03:00
* feat: Add Open Knowledge Format (OKF) export Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Separate OKF frontmatter from body, use team URL for resource Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Use OKF initials avatar in export dialog Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Use GlobeIcon for OKF export format Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
32 lines
937 B
TypeScript
32 lines
937 B
TypeScript
import type { NavigationNode } from "@shared/types";
|
|
import { FileOperationFormat } from "@shared/types";
|
|
import type { Collection, FileOperation } from "@server/models";
|
|
import type { Document } from "@server/models";
|
|
import ExportDocumentTreeTask from "./ExportDocumentTreeTask";
|
|
|
|
export default class ExportOKFZipTask extends ExportDocumentTreeTask {
|
|
public async exportCollections(
|
|
collections: Collection[],
|
|
fileOperation: FileOperation
|
|
) {
|
|
return await this.addCollectionsToArchive(
|
|
collections,
|
|
FileOperationFormat.OKFZip,
|
|
fileOperation.options?.includeAttachments
|
|
);
|
|
}
|
|
|
|
public async exportDocument(
|
|
document: Document,
|
|
documentStructure: NavigationNode[],
|
|
includeAttachments: boolean
|
|
): Promise<string> {
|
|
return await this.addDocumentToArchive({
|
|
document,
|
|
documentStructure,
|
|
format: FileOperationFormat.OKFZip,
|
|
includeAttachments,
|
|
});
|
|
}
|
|
}
|