Add darktable ghost publish plugin

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-12-22 21:39:55 +02:00
parent 98ce774210
commit f44dac4158
17 changed files with 2624 additions and 19 deletions

View File

@@ -0,0 +1,50 @@
export const createTextNode = (text: string) => ({
detail: 0,
format: 0,
mode: "normal",
style: "",
text,
type: "extended-text",
version: 1,
});
export const createHeadingNode = (text: string, level: string) => ({
children: [createTextNode(text)],
direction: "ltr",
format: "",
indent: 0,
type: "extended-heading",
version: 1,
tag: level,
});
export interface ImageInput {
src: string;
caption: string;
}
export const createImageNode = (image: ImageInput) => {
return {
type: "image",
version: 1,
cardWidth: "regular",
...image,
};
};
export interface FileInput {
src: string;
name: string;
size: number;
}
export const createFileNode = (file: FileInput) => {
return {
type: "file",
src: file.src,
fileTitle: file.name,
fileName: file.name,
fileCaption: "",
fileSize: file.size,
};
};