From 000ee911e500b419eb622c46cb09226af5b28740 Mon Sep 17 00:00:00 2001 From: Chesterkxng Date: Tue, 27 May 2025 00:51:44 +0200 Subject: [PATCH 01/32] feat: temperature converter --- .../tools/number/generic-calc/data/index.ts | 5 +- .../number/generic-calc/data/temperature.ts | 59 +++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 src/pages/tools/number/generic-calc/data/temperature.ts diff --git a/src/pages/tools/number/generic-calc/data/index.ts b/src/pages/tools/number/generic-calc/data/index.ts index 465a203..fe214ed 100644 --- a/src/pages/tools/number/generic-calc/data/index.ts +++ b/src/pages/tools/number/generic-calc/data/index.ts @@ -3,10 +3,13 @@ import voltageDropInWire from './voltageDropInWire'; import sphereArea from './sphereArea'; import sphereVolume from './sphereVolume'; import slackline from './slackline'; +import temperatureConversion from './temperature'; + export default [ ohmslaw, voltageDropInWire, sphereArea, sphereVolume, - slackline + slackline, + temperatureConversion ]; diff --git a/src/pages/tools/number/generic-calc/data/temperature.ts b/src/pages/tools/number/generic-calc/data/temperature.ts new file mode 100644 index 0000000..a0c58e9 --- /dev/null +++ b/src/pages/tools/number/generic-calc/data/temperature.ts @@ -0,0 +1,59 @@ +import type { GenericCalcType } from './types'; + +const temperatureConversion: GenericCalcType = { + icon: 'carbon:temperature-inversion', + keywords: ['temperature', 'conversion', 'celcius', 'fahrenheit', 'Kelvin'], + shortDescription: + 'Convert temperatures between common scales like Celsius, Fahrenheit, Kelvin, and Rankine.', + name: 'Temperature Converter', + path: 'temperaure-conversion', + description: + 'Convert temperatures between common scales like Celsius, Fahrenheit, Kelvin, and Rankine.', + longDescription: `This calculator allows you to convert temperatures between Celsius, Fahrenheit, Kelvin, and Rankine. It is useful for scientists, engineers, students, and anyone needing to switch between these temperature scales for various applications. + +Formulas Used: + +Celsius (°C) ↔ Fahrenheit (°F): + °F = (°C × 9/5) + 32, and °C = (°F - 32) × 5/9 || + +Celsius (°C) ↔ Kelvin (K): + K = °C + 273.15, and °C = K - 273.15 || + +Celsius (°C) ↔ Rankine (°R): + °R = (°C + 273.15) × 9/5, and °C = (°R - 491.67) × 5/9 || + +Kelvin (K) ↔ Fahrenheit (°F): + °F = (K - 273.15) × 9/5 + 32, and K = (°F - 32) × 5/9 + 273.15 || + +Kelvin (K) ↔ Rankine (°R): + °R = K × 9/5, and K = °R × 5/9`, + formula: 'TdegC = (TdegF - 32) * 5/9', + presets: [], + variables: [ + { + name: 'TdegC', + title: 'Celsius', + unit: 'tempC' + }, + { + name: 'TdegF', + title: 'Farenheit', + unit: 'tempF', + default: 32, + alternates: [ + { + title: 'Kelvin', + formula: 'x = (v -32) * 5/9 + 273.15', + unit: 'tempK' + }, + { + title: 'Rankine', + formula: 'x = v + 459.67', + unit: 'tempR' + } + ] + } + ] +}; + +export default temperatureConversion; From 1ff164205255cec51bfbcbd00e02757d661f31d3 Mon Sep 17 00:00:00 2001 From: Chesterkxng Date: Sat, 26 Jul 2025 16:00:46 +0200 Subject: [PATCH 02/32] fix (video): Missing loop video icon --- src/pages/tools/video/loop/meta.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/tools/video/loop/meta.ts b/src/pages/tools/video/loop/meta.ts index 5484ed3..527a4bf 100644 --- a/src/pages/tools/video/loop/meta.ts +++ b/src/pages/tools/video/loop/meta.ts @@ -3,7 +3,7 @@ import { lazy } from 'react'; export const tool = defineTool('video', { path: 'loop', - icon: 'material-symbols:loop', + icon: 'ic:outline-loop', keywords: ['video', 'loop', 'repeat', 'continuous'], component: lazy(() => import('./index')), From 37f2fed2d934f96be85ed5ea7e6f8e3455870a66 Mon Sep 17 00:00:00 2001 From: Nat Fletcher Date: Wed, 24 Sep 2025 00:48:54 -0500 Subject: [PATCH 03/32] added option to concurrently trim video --- src/pages/tools/video/video-to-gif/index.tsx | 72 ++++++++++++++++++-- 1 file changed, 65 insertions(+), 7 deletions(-) diff --git a/src/pages/tools/video/video-to-gif/index.tsx b/src/pages/tools/video/video-to-gif/index.tsx index a8eba09..68b570e 100644 --- a/src/pages/tools/video/video-to-gif/index.tsx +++ b/src/pages/tools/video/video-to-gif/index.tsx @@ -1,8 +1,11 @@ import { Box } from '@mui/material'; import React, { useState } from 'react'; +import * as Yup from 'yup'; import ToolContent from '@components/ToolContent'; import { ToolComponentProps } from '@tools/defineTool'; import { GetGroupsType } from '@components/options/ToolOptions'; +import TextFieldWithDesc from '@components/options/TextFieldWithDesc'; +import { updateNumberField } from '@utils/string'; import { InitialValuesType } from './types'; import ToolVideoInput from '@components/input/ToolVideoInput'; import ToolFileResult from '@components/result/ToolFileResult'; @@ -13,9 +16,19 @@ import { fetchFile } from '@ffmpeg/util'; const initialValues: InitialValuesType = { quality: 'mid', fps: '10', - scale: '320:-1:flags=bicubic' + scale: '320:-1:flags=bicubic', + start: 0, + end: 100 }; +const validationSchema = Yup.object({ + start: Yup.number().min(0, 'Start time must be positive'), + end: Yup.number().min( + Yup.ref('start'), + 'End time must be greater than start time' + ) +}); + export default function VideoToGif({ title, longDescription @@ -26,14 +39,16 @@ export default function VideoToGif({ const compute = (values: InitialValuesType, input: File | null) => { if (!input) return; - const { fps, scale } = values; + const { fps, scale, start, end } = values; let ffmpeg: FFmpeg | null = null; let ffmpegLoaded = false; const convertVideoToGif = async ( file: File, fps: string, - scale: string + scale: string, + start: number, + end: number ): Promise => { setLoading(true); @@ -58,6 +73,10 @@ export default function VideoToGif({ await ffmpeg.exec([ '-i', fileName, + '-ss', + start.toString(), + '-to', + end.toString(), '-vf', `fps=${fps},scale=${scale},palettegen`, 'palette.png' @@ -68,6 +87,10 @@ export default function VideoToGif({ fileName, '-i', 'palette.png', + '-ss', + start.toString(), + '-to', + end.toString(), '-filter_complex', `fps=${fps},scale=${scale}[x];[x][1:v]paletteuse`, outputName @@ -92,7 +115,7 @@ export default function VideoToGif({ } }; - convertVideoToGif(input, fps, scale); + convertVideoToGif(input, fps, scale, start, end); }; const getGroups: GetGroupsType | null = ({ @@ -141,6 +164,28 @@ export default function VideoToGif({ /> ) + }, + { + title: 'Timestamps', + component: ( + + + updateNumberField(value, 'start', updateField) + } + value={values.start} + label="Start Time" + sx={{ mb: 2, backgroundColor: 'background.paper' }} + /> + + updateNumberField(value, 'end', updateField) + } + value={values.end} + label="End Time" + /> + + ) } ]; @@ -148,9 +193,22 @@ export default function VideoToGif({ - } + renderCustomInput={({ start, end }, setFieldValue) => { + return ( + { + setFieldValue('start', start); + setFieldValue('end', end); + }} + trimStart={start} + trimEnd={end} + /> + ); + }} resultComponent={ loading ? ( Date: Thu, 25 Sep 2025 02:28:57 -0500 Subject: [PATCH 04/32] Changed the 'type' for WPA/WPA2/WPA3 to just 'WPA' --- src/pages/tools/image/generic/qr-code/index.tsx | 4 ++-- src/pages/tools/image/generic/qr-code/types.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/tools/image/generic/qr-code/index.tsx b/src/pages/tools/image/generic/qr-code/index.tsx index 15e3bbf..26f8305 100644 --- a/src/pages/tools/image/generic/qr-code/index.tsx +++ b/src/pages/tools/image/generic/qr-code/index.tsx @@ -40,7 +40,7 @@ const initialValues: InitialValuesType = { // WiFi wifiSsid: '', wifiPassword: '', - wifiEncryption: 'WPA/WPA2', + wifiEncryption: 'WPA', // vCard vCardName: '', @@ -353,7 +353,7 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { label="Encryption Type" margin="normal" > - WPA/WPA2 + WPA WEP None diff --git a/src/pages/tools/image/generic/qr-code/types.ts b/src/pages/tools/image/generic/qr-code/types.ts index c2f98be..b995924 100644 --- a/src/pages/tools/image/generic/qr-code/types.ts +++ b/src/pages/tools/image/generic/qr-code/types.ts @@ -7,7 +7,7 @@ export type QRCodeType = | 'WiFi' | 'vCard'; -export type WifiEncryptionType = 'WPA/WPA2' | 'WEP' | 'None'; +export type WifiEncryptionType = 'WPA' | 'WEP' | 'None'; export interface InitialValuesType { qrCodeType: QRCodeType; From 28f4c64d3044df927dc088435164e803e14f8794 Mon Sep 17 00:00:00 2001 From: "Ibrahima G. Coulibaly" Date: Thu, 2 Oct 2025 22:18:34 +0100 Subject: [PATCH 05/32] feat: remove temperature conversion from generic-calc This commit removes the temperature conversion tool from the generic-calc tool. This is because the tool was causing issues. The following files were modified: - src/pages/tools/number/generic-calc/data/index.ts - src/pages/tools/number/generic-calc/data/temperature.ts - package.json - .idea/workspace.xml --- .idea/workspace.xml | 378 +- package-lock.json | 6479 ++++++++++------- package.json | 2 + src/pages/tools/audio/change-speed/service.ts | 2 +- .../tools/number/generic-calc/data/index.ts | 4 +- .../number/generic-calc/data/temperature.ts | 59 - src/pages/tools/pdf/pdf-to-png/service.ts | 2 +- src/pages/tools/video/video-to-gif/types.ts | 2 + 8 files changed, 3957 insertions(+), 2971 deletions(-) delete mode 100644 src/pages/tools/number/generic-calc/data/temperature.ts diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 6b54db0..91f7965 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,10 +6,12 @@ - - - - + + + + + + - { - "history": [ + - { - "prStates": [ +}]]> + +}]]> { "selectedUrlAndAccountId": { "url": "https://github.com/iib0011/omni-tools.git", @@ -279,9 +364,9 @@ - { - "isMigrated": true - } + @@ -326,7 +411,7 @@ "Vitest.replaceText function (regexp mode).should return the original text when passed an invalid regexp.executor": "Run", "Vitest.replaceText function.executor": "Run", "Vitest.timeBetweenDates.executor": "Run", - "git-widget-placeholder": "#218 on fork/AshAnand34/tool/random-generators", + "git-widget-placeholder": "main", "ignore.virus.scanning.warn.message": "true", "kotlin-language-version-configured": "true", "last_opened_file_path": "C:/Users/Ibrahima/IdeaProjects/omni-tools", @@ -347,6 +432,7 @@ "npm.test.executor": "Run", "npm.test:e2e.executor": "Run", "npm.test:e2e:run.executor": "Run", + "npm.typecheck.executor": "Run", "prettierjs.PrettierConfiguration.Package": "C:\\Users\\Ibrahima\\IdeaProjects\\omni-tools\\node_modules\\prettier", "project.structure.last.edited": "Problems", "project.structure.proportion": "0.0", @@ -415,16 +501,6 @@ - - - - -