From 1c9e67fc3201e0e5dee91e8981adf34daaabf33a Mon Sep 17 00:00:00 2001 From: C4illin Date: Sat, 28 Sep 2024 13:02:17 +0200 Subject: [PATCH 001/393] fix: support .awb and clean up, fixes #153, #92 --- src/converters/ffmpeg.ts | 223 ++++++++------------------------------- 1 file changed, 42 insertions(+), 181 deletions(-) diff --git a/src/converters/ffmpeg.ts b/src/converters/ffmpeg.ts index ae2660f..d99d2a7 100644 --- a/src/converters/ffmpeg.ts +++ b/src/converters/ffmpeg.ts @@ -6,6 +6,7 @@ export const properties = { muxer: [ "264", "265", + "266", "302", "3dostr", "3g2", @@ -18,6 +19,7 @@ export const properties = { "aac", "aax", "ac3", + "ac4", "ace", "acm", "act", @@ -48,7 +50,6 @@ export const properties = { "apng", "aptx", "aptxhd", - "aptx_hd", "aqt", "aqtitle", "argo_asf", @@ -63,10 +64,12 @@ export const properties = { "av1", "avc", "avi", + "avif", "avr", "avs", "avs2", "avs3", + "awb", "bcstm", "bethsoftvid", "bfi", @@ -75,8 +78,9 @@ export const properties = { "bink", "binka", "bit", - "bmp_pipe", + "bitpacked", "bmv", + "bonk", "boa", "brender_pix", "brstm", @@ -93,7 +97,7 @@ export const properties = { "codec2", "codec2raw", "concat", - "cri_pipe", + "cri", "dash", "dat", "data", @@ -101,8 +105,9 @@ export const properties = { "dav", "dbm", "dcstr", - "dds_pipe", + "dds", "derf", + "dfpwm", "dfa", "dhav", "dif", @@ -131,6 +136,8 @@ export const properties = { "exr_pipe", "f32be", "f32le", + "ec3", + "evc", "f4v", "f64be", "f64le", @@ -157,13 +164,13 @@ export const properties = { "gdv", "genh", "gif", - "gif_pipe", "gsm", "gxf", "h261", "h263", "h264", "h265", + "h266", "h26l", "hca", "hcom", @@ -180,7 +187,6 @@ export const properties = { "ifv", "ilbc", "image2", - "image2pipe", "imf", "imx", "ingenient", @@ -197,21 +203,14 @@ export const properties = { "ivr", "j2b", "j2k", - "j2k_pipe", "jack", "jacosub", - "jpegls_pipe", - "jpeg_pipe", "jv", - "kmsgrab", + "jxl", "kux", "kvag", "lavfi", - "libcdio", - "libdc1394", - "libgme", - "libopenmpt", - "live_flv", + "laf", "lmlm4", "loas", "lrc", @@ -224,16 +223,13 @@ export const properties = { "m4b", "m4v", "mac", - "matroska", "mca", "mcc", "mdl", "med", - "mgsts", "microdvd", "mj2", "mjpeg", - "mjpeg_2000", "mjpg", "mk3d", "mka", @@ -257,9 +253,6 @@ export const properties = { "mpc", "mpc8", "mpeg", - "mpegts", - "mpegtsraw", - "mpegvideo", "mpg", "mpjpeg", "mpl2", @@ -296,26 +289,15 @@ export const properties = { "omg", "openal", "oss", + "osq", "paf", - "pam_pipe", - "pbm_pipe", - "pcx_pipe", - "pgmyuv_pipe", - "pgm_pipe", - "pgx_pipe", - "photocd_pipe", - "pictor_pipe", + "pdv", "pjs", "plm", "pmp", - "png_pipe", "ppm", - "ppm_pipe", - "pp_bnk", - "psd_pipe", "psm", "psp", - "psxstr", "pt36", "ptm", "pulse", @@ -323,7 +305,6 @@ export const properties = { "pvf", "qcif", "qcp", - "qdraw_pipe", "r3d", "rawvideo", "rco", @@ -335,6 +316,7 @@ export const properties = { "rm", "roq", "rpl", + "rka", "rsd", "rso", "rt", @@ -355,6 +337,7 @@ export const properties = { "sbc", "sbg", "scc", + "sdns", "sdp", "sdr2", "sds", @@ -364,10 +347,8 @@ export const properties = { "sfx", "sfx2", "sga", - "sgi_pipe", "shn", "siff", - "simbiosis_imx", "sln", "smi", "smjpeg", @@ -389,12 +370,8 @@ export const properties = { "stp", "str", "sub", - "subviewer", - "subviewer1", - "sunrast_pipe", "sup", "svag", - "svg_pipe", "svs", "sw", "swf", @@ -404,7 +381,6 @@ export const properties = { "thd", "thp", "tiertexseq", - "tiff_pipe", "tmv", "truehd", "tta", @@ -424,6 +400,7 @@ export const properties = { "ul", "ult", "umx", + "usm", "uw", "v", "v210", @@ -447,12 +424,13 @@ export const properties = { "vql", "vt", "vtt", + "vvc", "w64", + "wa", "wav", + "way", "wc3movie", "webm", - "webm_dash_manifest", - "webp_pipe", "webvtt", "wow", "wsaud", @@ -464,32 +442,31 @@ export const properties = { "x11grab", "xa", "xbin", - "xbm_pipe", "xl", "xm", + "xmd", "xmv", "xpk", - "xpm_pipe", "xvag", - "xwd_pipe", "xwma", "y4m", "yop", "yuv", "yuv10", - "yuv4mpegpipe", ], }, to: { muxer: [ "264", "265", + "266", "302", "3g2", "3gp", "a64", "aac", "ac3", + "ac4", "adts", "adx", "afc", @@ -497,43 +474,31 @@ export const properties = { "aifc", "aiff", "al", - "alaw", - "alp", - "alsa", "amr", "amv", "apm", "apng", "aptx", "aptxhd", - "aptx_hd", - "argo_asf", "asf", - "asf_stream", "ass", "ast", "au", + "aud", "avi", - "avm2", + "avif", "avs", "avs2", + "avs3", "bit", "bmp", "c2", - "caca", "caf", "cavs", - "cavsvideo", "chk", - "chromaprint", - "codec2", - "codec2raw", "cpk", - "crc", - "dash", - "data", - "daud", - "dirac", + "cvg", + "dfpwm", "dnxhd", "dnxhr", "dpx", @@ -542,30 +507,16 @@ export const properties = { "dv", "dvd", "eac3", + "ec3", + "evc", "exr", - "f32be", - "f32le", "f4v", - "f64be", - "f64le", - "fbdev", "ffmeta", - "ffmetadata", - "fifo", - "fifo_test", - "filmstrip", - "film_cpk", "fits", "flac", "flm", "flv", - "framecrc", - "framehash", - "framemd5", "g722", - "g723_1", - "g726", - "g726le", "gif", "gsm", "gxf", @@ -573,32 +524,26 @@ export const properties = { "h263", "h264", "h265", - "hash", - "hds", + "h266", + "hdr", "hevc", - "hls", "ico", - "ilbc", "im1", "im24", "im8", - "image2", - "image2pipe", - "ipod", "ircam", "isma", "ismv", "ivf", "j2c", "j2k", - "jacosub", "jls", "jp2", "jpeg", "jpg", "js", "jss", - "kvag", + "jxl", "latm", "lbc", "ljpg", @@ -613,13 +558,9 @@ export const properties = { "m4a", "m4b", "m4v", - "matroska", - "md5", - "microdvd", "mjpeg", "mjpg", "mkv", - "mkvtimestamp_v2", "mlp", "mmf", "mov", @@ -629,26 +570,17 @@ export const properties = { "mpa", "mpd", "mpeg", - "mpeg1video", - "mpeg2video", - "mpegts", "mpg", - "mpjpeg", "msbc", "mts", - "mulaw", "mxf", - "mxf_d10", - "mxf_opatom", - "null", "nut", + "obu", "oga", "ogg", "ogv", "oma", - "opengl", "opus", - "oss", "pam", "pbm", "pcm", @@ -656,14 +588,14 @@ export const properties = { "pfm", "pgm", "pgmyuv", + "phm", "pix", "png", "ppm", "psp", - "pulse", + "qoi", "ra", "ras", - "rawvideo", "rco", "rcv", "rgb", @@ -671,84 +603,47 @@ export const properties = { "roq", "rs", "rso", - "rtp", - "rtp_mpegts", - "rtsp", - "s16be", - "s16le", - "s24be", - "s24le", - "s32be", - "s32le", - "s8", - "sap", "sb", "sbc", "scc", - "sdl", - "sdl2", - "segment", "sf", "sgi", - "singlejpeg", - "smjpeg", - "smoothstreaming", - "sndio", "sox", "spdif", "spx", "srt", "ssa", - "ssegment", - "streamhash", - "stream_segment", "sub", "sun", "sunras", "sup", - "svcd", "sw", "swf", "tco", - "tee", "tga", "thd", "tif", "tiff", - "truehd", "ts", "tta", "ttml", "tun", - "u16be", - "u16le", - "u24be", - "u24le", - "u32be", - "u32le", - "u8", "ub", "ul", - "uncodedframecrc", "uw", - "v4l2", "vag", + "vbn", "vc1", - "vc1test", "vc2", - "vcd", - "vidc", - "video4linux2", "vob", "voc", "vtt", + "vvc", "w64", "wav", + "wbmp", "webm", - "webm_chunk", - "webm_dash_manifest", "webp", - "webvtt", "wma", "wmv", "wtv", @@ -756,12 +651,10 @@ export const properties = { "xbm", "xface", "xml", - "xv", "xwd", "y", "y4m", "yuv", - "yuv4mpegpipe", ], }, }; @@ -774,38 +667,6 @@ export async function convert( // biome-ignore lint/suspicious/noExplicitAny: options?: any, ): Promise { - // let command = "ffmpeg"; - - // these are containers that can contain multiple formats - // const autoDetect = [ - // "mp4", - // "mkv", - // "avi", - // "mov", - // "m4a", - // "3gp", - // "3g2", - // "mj2", - // "psp", - // "m4b", - // "ism", - // "ismv", - // "isma", - // "f4v", - // ]; - - // if (!(fileType in autoDetect)) { - // command += ` -f "${fileType}"`; - // } - - // command += ` -i "${filePath}"`; - - // if (!(convertTo in autoDetect)) { - // command += ` -f "${convertTo}"`; - // } - - // command += ` "${targetPath}"`; - const command = `ffmpeg -i "${filePath}" "${targetPath}"`; return new Promise((resolve, reject) => { @@ -825,4 +686,4 @@ export async function convert( resolve("success"); }); }); -} +} \ No newline at end of file From 20571675766209ad1251f07e687d29a6791afc8b Mon Sep 17 00:00:00 2001 From: C4illin Date: Sat, 28 Sep 2024 13:13:48 +0200 Subject: [PATCH 002/393] fix: add support for usd for assimp, #144 --- src/converters/assimp.ts | 194 ++++++++++++++++++++------------------- 1 file changed, 99 insertions(+), 95 deletions(-) diff --git a/src/converters/assimp.ts b/src/converters/assimp.ts index ea44b6d..b3c9f1a 100644 --- a/src/converters/assimp.ts +++ b/src/converters/assimp.ts @@ -4,104 +4,109 @@ import { exec } from "node:child_process"; export const properties = { from: { muxer: [ - "3d", - "3ds", - "3mf", - "ac", - "ac3d", - "acc", - "amf", - "ase", - "ask", - "assbin", - "b3d", - "blend", - "bsp", - "bvh", - "cob", - "csm", - "dae", - "dxf", - "enff", - "fbx", - "glb", - "gltf", - "hmp", - "ifc", - "ifczip", - "iqm", - "irr", - "irrmesh", - "lwo", - "lws", - "lxo", - "md2", - "md3", - "md5anim", - "md5camera", - "md5mesh", - "mdc", - "mdl", - "mesh", - "mesh.xml", - "mot", - "ms3d", - "ndo", - "nff", - "obj", - "off", - "ogex", - "pk3", - "ply", - "pmx", - "prj", - "q3o", - "q3s", - "raw", - "scn", - "sib", - "smd", - "step", - "stl", - "stp", - "ter", - "uc", - "vta", - "x", - "x3d", - "x3db", - "xgl", - "xml", - "zae", - "zgl", + "3d", + "3ds", + "3mf", + "ac", + "ac3d", + "acc", + "amf", + "ase", + "ask", + "assbin", + "b3d", + "blend", + "bsp", + "bvh", + "cob", + "csm", + "dae", + "dxf", + "enff", + "fbx", + "glb", + "gltf", + "hmp", + "ifc", + "ifczip", + "iqm", + "irr", + "irrmesh", + "lwo", + "lws", + "lxo", + "md2", + "md3", + "md5anim", + "md5camera", + "md5mesh", + "mdc", + "mdl", + "mesh.xml", + "mesh", + "mot", + "ms3d", + "ndo", + "nff", + "obj", + "off", + "ogex", + "pk3", + "ply", + "pmx", + "prj", + "q3o", + "q3s", + "raw", + "scn", + "sib", + "smd", + "step", + "stl", + "stp", + "ter", + "uc", + "usd", + "usda", + "usdc", + "usdz", + "vta", + "x", + "x3d", + "x3db", + "xgl", + "xml", + "zae", + "zgl", ], }, to: { muxer: [ - "collada", - "x", - "stp", - "obj", - "objnomtl", - "stl", - "stlb", - "ply", - "plyb", - "3ds", - "gltf2", - "glb2", - "gltf", - "glb", - "assbin", - "assxml", - "x3d", - "fbx", - "fbxa", - "m3d", - "m3da", - "3mf", - "pbrt", - "assjson", + "3ds", + "3mf", + "assbin", + "assjson", + "assxml", + "collada", + "dae", + "fbx", + "fbxa", + "glb", + "glb2", + "gltf", + "gltf2", + "m3d", + "m3da", + "obj", + "objnomtl", + "pbrt", + "ply", + "plyb", + "stl", + "stlb", + "stp", + "x", + "x3d", ], }, }; @@ -116,7 +121,6 @@ export async function convert( ): Promise { // let command = "ffmpeg"; - const command = `assimp export "${filePath}" "${targetPath}"`; return new Promise((resolve, reject) => { From ae1dfafc9d9116a57b08c2f7fc326990e00824b0 Mon Sep 17 00:00:00 2001 From: C4illin Date: Mon, 30 Sep 2024 15:51:11 +0200 Subject: [PATCH 003/393] fix: cleanup formats and add opus, fixes #159 --- src/converters/ffmpeg.ts | 25 +++++++++++++++++++++++++ src/helpers/normalizeFiletype.ts | 3 +++ 2 files changed, 28 insertions(+) diff --git a/src/converters/ffmpeg.ts b/src/converters/ffmpeg.ts index d99d2a7..23287d8 100644 --- a/src/converters/ffmpeg.ts +++ b/src/converters/ffmpeg.ts @@ -1,5 +1,6 @@ import { exec } from "node:child_process"; + // This could be done dynamically by running `ffmpeg -formats` and parsing the output export const properties = { from: { @@ -80,6 +81,7 @@ export const properties = { "bit", "bitpacked", "bmv", + "bmp", "bonk", "boa", "brender_pix", @@ -206,7 +208,10 @@ export const properties = { "jack", "jacosub", "jv", + "jpegls", + "jpeg", "jxl", + "kmsgrab", "kux", "kvag", "lavfi", @@ -287,17 +292,30 @@ export const properties = { "okt", "oma", "omg", + "opus", "openal", "oss", "osq", "paf", "pdv", + "pam", + "pbm", + "pcx", + "pgmyuv", + "pgm", + "pgx", + "photocd", + "pictor", "pjs", "plm", "pmp", + "png", "ppm", + "pp", + "psd", "psm", "psp", + "psxstr", "pt36", "ptm", "pulse", @@ -305,6 +323,7 @@ export const properties = { "pvf", "qcif", "qcp", + "qdraw", "r3d", "rawvideo", "rco", @@ -347,6 +366,7 @@ export const properties = { "sfx", "sfx2", "sga", + "sgi", "shn", "siff", "sln", @@ -372,6 +392,7 @@ export const properties = { "sub", "sup", "svag", + "svg", "svs", "sw", "swf", @@ -381,6 +402,8 @@ export const properties = { "thd", "thp", "tiertexseq", + "tif", + "tiff", "tmv", "truehd", "tta", @@ -431,6 +454,7 @@ export const properties = { "way", "wc3movie", "webm", + "webp", "webvtt", "wow", "wsaud", @@ -485,6 +509,7 @@ export const properties = { "ast", "au", "aud", + "av1", "avi", "avif", "avs", diff --git a/src/helpers/normalizeFiletype.ts b/src/helpers/normalizeFiletype.ts index 9b4cc1d..2c3dee4 100644 --- a/src/helpers/normalizeFiletype.ts +++ b/src/helpers/normalizeFiletype.ts @@ -23,6 +23,9 @@ export const normalizeOutputFiletype = (filetype: string): string => { return "jpg"; case "latex": return "tex"; + case "markdown_phpextra": + case "markdown_strict": + case "markdown_mmd": case "markdown": return "md"; default: From 291cfc80c6d6baae5c622a290f860c15020b00bc Mon Sep 17 00:00:00 2001 From: C4illin Date: Mon, 30 Sep 2024 15:56:33 +0200 Subject: [PATCH 004/393] chore: update deps --- bun.lockb | Bin 224932 -> 224932 bytes package.json | 6 +++--- 2 files changed, 3 ins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zco^*JZGI8BOl6<>TeHQ&l`fe}+bqLY9mt+=u3+Ygjn^5MIm*|)h=?ua#ETK1Pq-M)DB_O%9#=06yF0|6(H<^f`EAjT#y02Jp3Vm@^F>8S=xt0h6k=>RdvNNpg78OyX? z(~v1sbb69IlN8e(rs@BDnIxoP=>it#OpFG4#zuO^CJeu(8~QOxPTv4jJzd0|$%OIc zbWe9CV@8NL)BvODr`(zRa7fMaz$LXk%acif1*omsm&q4u;`B$paCaFo{@M<-U9MEf zOs^!pD!(8#FR>s~x1_QlwRn2SVJ5BVPT!fNr~kdf#6JDQVW!~e{O6ezr_VS7B$gd! sa-Kf(Jd@D$&?8LB+jkvd`WM7#I(?@&a}T50^oOUI6t|~KFx!R!09z0%Q2+n{ diff --git a/package.json b/package.json index c5755c9..f366c00 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@elysiajs/html": "1.0.2", "@elysiajs/jwt": "^1.1.1", "@elysiajs/static": "1.0.3", - "elysia": "^1.1.16" + "elysia": "^1.1.17" }, "module": "src/index.tsx", "type": "module", @@ -36,7 +36,7 @@ "@types/eslint": "^9.6.1", "@types/eslint-plugin-tailwindcss": "^3.17.0", "@types/eslint__js": "^8.42.3", - "@types/node": "^22.6.1", + "@types/node": "^22.7.4", "@typescript-eslint/eslint-plugin": "^8.7.0", "@typescript-eslint/parser": "^8.7.0", "autoprefixer": "^10.4.20", @@ -50,7 +50,7 @@ "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-tailwindcss": "^3.17.4", "globals": "^15.9.0", - "knip": "^5.30.5", + "knip": "^5.30.6", "npm-run-all2": "^6.2.3", "postcss": "^8.4.47", "postcss-cli": "^11.0.0", From 72636c5059ebf09c8fece2e268293650b2f8ccf6 Mon Sep 17 00:00:00 2001 From: C4illin Date: Mon, 30 Sep 2024 17:09:12 +0200 Subject: [PATCH 005/393] feat: add light theme, fixes #156 --- src/components/base.tsx | 2 +- src/components/header.tsx | 10 +++---- src/index.tsx | 56 +++++++++++++++++++-------------------- src/main.css | 37 ++++++++++++++++++++++++-- tailwind.config.js | 24 ++++++++++++++--- 5 files changed, 89 insertions(+), 40 deletions(-) diff --git a/src/components/base.tsx b/src/components/base.tsx index 8cebaab..0f121af 100644 --- a/src/components/base.tsx +++ b/src/components/base.tsx @@ -27,6 +27,6 @@ export const BaseHtml = ({ /> - {children} + {children} ); diff --git a/src/components/header.tsx b/src/components/header.tsx index 6850027..500d182 100644 --- a/src/components/header.tsx +++ b/src/components/header.tsx @@ -8,14 +8,14 @@ export const Header = ({