mirror of
https://github.com/C4illin/ConvertX.git
synced 2025-11-02 13:03:30 +00:00
Compare commits
11 Commits
fb297f9831
...
9b4f001660
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b4f001660 | ||
|
|
a4e20aa62a | ||
|
|
1cc4862d51 | ||
|
|
c6b64ced91 | ||
|
|
38cbf093e5 | ||
|
|
d8ddfa31e3 | ||
|
|
c3e4f676fc | ||
|
|
e668b828ea | ||
|
|
eaeac2cb78 | ||
|
|
5d74ec59c1 | ||
|
|
645b29e5d1 |
16
CHANGELOG.md
16
CHANGELOG.md
@@ -1,5 +1,21 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.15.0](https://github.com/C4illin/ConvertX/compare/v0.14.1...v0.15.0) (2025-09-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* vtracer implemented and added docker file binaries install ([76c840d](https://github.com/C4illin/ConvertX/commit/76c840dbaa4a26d0623422b61581bb761ad6a6bc))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* add language env ([f789d9d](https://github.com/C4illin/ConvertX/commit/f789d9dfe381780dcc715b70bcf304d570a73e3f))
|
||||||
|
* add lmodern ([761f56b](https://github.com/C4illin/ConvertX/commit/761f56b869d3a4faa7550d90b3da2d853baf8a1d)), closes [#320](https://github.com/C4illin/ConvertX/issues/320)
|
||||||
|
* move color variables to seperate directory ([3bf82b5](https://github.com/C4illin/ConvertX/commit/3bf82b5b86177f95531293cab1dfee1e12c898a1)), closes [#53](https://github.com/C4illin/ConvertX/issues/53)
|
||||||
|
* run qtwebengine without sandbox ([9f2bdad](https://github.com/C4illin/ConvertX/commit/9f2bdadde779d88973296e81af103ed0016f5411))
|
||||||
|
* update favicon ([827f22e](https://github.com/C4illin/ConvertX/commit/827f22e2fc33bf32a02befb3c5bd519511826b38)), closes [#158](https://github.com/C4illin/ConvertX/issues/158)
|
||||||
|
|
||||||
## [0.14.1](https://github.com/C4illin/ConvertX/compare/v0.14.0...v0.14.1) (2025-06-04)
|
## [0.14.1](https://github.com/C4illin/ConvertX/compare/v0.14.0...v0.14.1) (2025-06-04)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ FROM base AS release
|
|||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
assimp-utils \
|
assimp-utils \
|
||||||
calibre \
|
calibre \
|
||||||
|
dasel \
|
||||||
dcraw \
|
dcraw \
|
||||||
dvisvgm \
|
dvisvgm \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ A self-hosted online file converter. Supports over a thousand different formats.
|
|||||||
| [FFmpeg](https://ffmpeg.org/) | Video | ~472 | ~199 |
|
| [FFmpeg](https://ffmpeg.org/) | Video | ~472 | ~199 |
|
||||||
| [Potrace](https://potrace.sourceforge.net/) | Raster to vector | 4 | 11 |
|
| [Potrace](https://potrace.sourceforge.net/) | Raster to vector | 4 | 11 |
|
||||||
| [VTracer](https://github.com/visioncortex/vtracer) | Raster to vector | 8 | 1 |
|
| [VTracer](https://github.com/visioncortex/vtracer) | Raster to vector | 8 | 1 |
|
||||||
|
| [Dasel](https://github.com/TomWright/dasel) | Data Files | 5 | 4 |
|
||||||
|
|
||||||
<!-- many ffmpeg fileformats are duplicates -->
|
<!-- many ffmpeg fileformats are duplicates -->
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "convertx-frontend",
|
"name": "convertx-frontend",
|
||||||
"version": "0.14.1",
|
"version": "0.15.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "bun run --watch src/index.tsx",
|
"dev": "bun run --watch src/index.tsx",
|
||||||
"hot": "bun run --hot src/index.tsx",
|
"hot": "bun run --hot src/index.tsx",
|
||||||
|
|||||||
48
src/converters/dasel.ts
Normal file
48
src/converters/dasel.ts
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
import fs from "fs";
|
||||||
|
import { execFile as execFileOriginal } from "node:child_process";
|
||||||
|
import { ExecFileFn } from "./types";
|
||||||
|
|
||||||
|
export const properties = {
|
||||||
|
from: {
|
||||||
|
document: ["yaml", "toml", "json", "xml", "csv"],
|
||||||
|
},
|
||||||
|
to: {
|
||||||
|
document: ["yaml", "toml", "json", "csv"],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function convert(
|
||||||
|
filePath: string,
|
||||||
|
fileType: string,
|
||||||
|
convertTo: string,
|
||||||
|
targetPath: string,
|
||||||
|
options?: unknown,
|
||||||
|
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
||||||
|
): Promise<string> {
|
||||||
|
const args: string[] = [];
|
||||||
|
|
||||||
|
args.push("--file", filePath);
|
||||||
|
args.push("--read", fileType);
|
||||||
|
args.push("--write", convertTo);
|
||||||
|
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
execFile("dasel", args, (error, stdout, stderr) => {
|
||||||
|
if (error) {
|
||||||
|
reject(`error: ${error}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stderr) {
|
||||||
|
console.error(`stderr: ${stderr}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.writeFile(targetPath, stdout, (err: NodeJS.ErrnoException | null) => {
|
||||||
|
if (err) {
|
||||||
|
reject(`Failed to write output: ${err}`);
|
||||||
|
} else {
|
||||||
|
resolve("Done");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import { MAX_CONVERT_PROCESS } from "../helpers/env";
|
|||||||
import { normalizeFiletype, normalizeOutputFiletype } from "../helpers/normalizeFiletype";
|
import { normalizeFiletype, normalizeOutputFiletype } from "../helpers/normalizeFiletype";
|
||||||
import { convert as convertassimp, properties as propertiesassimp } from "./assimp";
|
import { convert as convertassimp, properties as propertiesassimp } from "./assimp";
|
||||||
import { convert as convertCalibre, properties as propertiesCalibre } from "./calibre";
|
import { convert as convertCalibre, properties as propertiesCalibre } from "./calibre";
|
||||||
|
import { convert as convertDasel, properties as propertiesDasel } from "./dasel";
|
||||||
import { convert as convertDvisvgm, properties as propertiesDvisvgm } from "./dvisvgm";
|
import { convert as convertDvisvgm, properties as propertiesDvisvgm } from "./dvisvgm";
|
||||||
import { convert as convertFFmpeg, properties as propertiesFFmpeg } from "./ffmpeg";
|
import { convert as convertFFmpeg, properties as propertiesFFmpeg } from "./ffmpeg";
|
||||||
import {
|
import {
|
||||||
@@ -82,6 +83,10 @@ const properties: Record<
|
|||||||
properties: propertiesCalibre,
|
properties: propertiesCalibre,
|
||||||
converter: convertCalibre,
|
converter: convertCalibre,
|
||||||
},
|
},
|
||||||
|
dasel: {
|
||||||
|
properties: propertiesDasel,
|
||||||
|
converter: convertDasel,
|
||||||
|
},
|
||||||
libreoffice: {
|
libreoffice: {
|
||||||
properties: propertiesLibreOffice,
|
properties: propertiesLibreOffice,
|
||||||
converter: convertLibreOffice,
|
converter: convertLibreOffice,
|
||||||
|
|||||||
@@ -84,6 +84,16 @@ if (process.env.NODE_ENV === "production") {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
exec("dasel --version", (error, stdout) => {
|
||||||
|
if (error) {
|
||||||
|
console.error("dasel is not installed.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stdout) {
|
||||||
|
console.log(stdout.split("\n")[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
exec("xelatex -version", (error, stdout) => {
|
exec("xelatex -version", (error, stdout) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.error("Tex Live with XeTeX is not installed.");
|
console.error("Tex Live with XeTeX is not installed.");
|
||||||
|
|||||||
Reference in New Issue
Block a user