Rename binary

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-02-23 13:59:24 +00:00
parent 4c36307b01
commit 26780273b2
4 changed files with 7 additions and 6 deletions

View File

@@ -93,7 +93,7 @@ local function finalize(_, _, extra_data)
local files_arg = table.concat(extra_data.exported_files, " ")
local command = string.format(
"darktable-publish --title '%s' --slug '%s' %s",
"darktable-ghost-cms-publish --title '%s' --slug '%s' %s",
extra_data.title, extra_data.slug, files_arg
)
if extra_data.keywords ~= "" then
@@ -123,7 +123,7 @@ local function supported(_, _)
end
dt.register_storage(
"ghost_publish",
"ghost_cms_publish",
"publish to Ghost CMS",
store,
finalize,

View File

@@ -51,7 +51,7 @@ const upload = async (
const key = await getAdminApiKey();
const token = createJwt(key);
const f = Bun.file(path, { type });
const f = file(path, { type });
const formData = new FormData();
formData.append("file", f);

View File

@@ -1,4 +1,5 @@
import { basename, extname } from "path";
import { file } from "bun";
export interface FileInfo {
jpegPath: string;
@@ -29,7 +30,7 @@ export const prepareFiles = async (files: string[]): Promise<FileInfo[]> => {
const jpegPath = parts[0].replace(/\\:/g, ":");
const rawPath = parts[1]?.replace(/\\:/g, ":");
const jpegFile = Bun.file(jpegPath);
const jpegFile = file(jpegPath);
if (!(await jpegFile.exists())) {
throw new Error(`JPEG file not found: ${jpegPath}`);
}
@@ -47,7 +48,7 @@ export const prepareFiles = async (files: string[]): Promise<FileInfo[]> => {
continue;
}
const rawFile = Bun.file(rawPath);
const rawFile = file(rawPath);
if (!(await rawFile.exists())) {
throw new Error(`RAW file not found: ${rawPath}`);
}

View File

@@ -5,7 +5,7 @@ import { uploadFile, uploadImage, uploadPost } from "./api";
import { getBasenameWithExtension, prepareFiles } from "./files";
new Command()
.name("darktable-publish")
.name("darktable-ghost-cms-publish")
.description("Publish files to GHOST CMS with optional metadata.")
.option("-t, --title [string]", "Specify the title")
.option("-s, --slug [string]", "Specify the slug")