mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-26 07:33:21 +03:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
489b3a6eeb | ||
|
|
3eaaddea9a | ||
|
|
bbcb36a87d | ||
|
|
dadd8fd528 | ||
|
|
31e280c6eb |
No files matched your search
Vendored
-7
@@ -72,7 +72,6 @@ declare module '@vue/runtime-core' {
|
|||||||
DockerRunToDockerComposeConverter: typeof import('./src/tools/docker-run-to-docker-compose-converter/docker-run-to-docker-compose-converter.vue')['default']
|
DockerRunToDockerComposeConverter: typeof import('./src/tools/docker-run-to-docker-compose-converter/docker-run-to-docker-compose-converter.vue')['default']
|
||||||
DynamicValues: typeof import('./src/tools/benchmark-builder/dynamic-values.vue')['default']
|
DynamicValues: typeof import('./src/tools/benchmark-builder/dynamic-values.vue')['default']
|
||||||
Editor: typeof import('./src/tools/html-wysiwyg-editor/editor/editor.vue')['default']
|
Editor: typeof import('./src/tools/html-wysiwyg-editor/editor/editor.vue')['default']
|
||||||
EmailNormalizer: typeof import('./src/tools/email-normalizer/email-normalizer.vue')['default']
|
|
||||||
EmojiCard: typeof import('./src/tools/emoji-picker/emoji-card.vue')['default']
|
EmojiCard: typeof import('./src/tools/emoji-picker/emoji-card.vue')['default']
|
||||||
EmojiGrid: typeof import('./src/tools/emoji-picker/emoji-grid.vue')['default']
|
EmojiGrid: typeof import('./src/tools/emoji-picker/emoji-grid.vue')['default']
|
||||||
EmojiPicker: typeof import('./src/tools/emoji-picker/emoji-picker.vue')['default']
|
EmojiPicker: typeof import('./src/tools/emoji-picker/emoji-picker.vue')['default']
|
||||||
@@ -133,18 +132,13 @@ declare module '@vue/runtime-core' {
|
|||||||
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||||
NForm: typeof import('naive-ui')['NForm']
|
|
||||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
|
||||||
NH1: typeof import('naive-ui')['NH1']
|
NH1: typeof import('naive-ui')['NH1']
|
||||||
NH3: typeof import('naive-ui')['NH3']
|
NH3: typeof import('naive-ui')['NH3']
|
||||||
NIcon: typeof import('naive-ui')['NIcon']
|
NIcon: typeof import('naive-ui')['NIcon']
|
||||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
|
||||||
NLayout: typeof import('naive-ui')['NLayout']
|
NLayout: typeof import('naive-ui')['NLayout']
|
||||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||||
NMenu: typeof import('naive-ui')['NMenu']
|
NMenu: typeof import('naive-ui')['NMenu']
|
||||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||||
NSlider: typeof import('naive-ui')['NSlider']
|
|
||||||
NSwitch: typeof import('naive-ui')['NSwitch']
|
|
||||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||||
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
||||||
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
||||||
@@ -154,7 +148,6 @@ declare module '@vue/runtime-core' {
|
|||||||
PhoneParserAndFormatter: typeof import('./src/tools/phone-parser-and-formatter/phone-parser-and-formatter.vue')['default']
|
PhoneParserAndFormatter: typeof import('./src/tools/phone-parser-and-formatter/phone-parser-and-formatter.vue')['default']
|
||||||
QrCodeGenerator: typeof import('./src/tools/qr-code-generator/qr-code-generator.vue')['default']
|
QrCodeGenerator: typeof import('./src/tools/qr-code-generator/qr-code-generator.vue')['default']
|
||||||
RandomPortGenerator: typeof import('./src/tools/random-port-generator/random-port-generator.vue')['default']
|
RandomPortGenerator: typeof import('./src/tools/random-port-generator/random-port-generator.vue')['default']
|
||||||
RemoveExif: typeof import('./src/tools/remove-exif/remove-exif.vue')['default']
|
|
||||||
ResultRow: typeof import('./src/tools/ipv4-range-expander/result-row.vue')['default']
|
ResultRow: typeof import('./src/tools/ipv4-range-expander/result-row.vue')['default']
|
||||||
RomanNumeralConverter: typeof import('./src/tools/roman-numeral-converter/roman-numeral-converter.vue')['default']
|
RomanNumeralConverter: typeof import('./src/tools/roman-numeral-converter/roman-numeral-converter.vue')['default']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
|
|||||||
@@ -42,7 +42,6 @@
|
|||||||
"@tiptap/starter-kit": "2.1.6",
|
"@tiptap/starter-kit": "2.1.6",
|
||||||
"@tiptap/vue-3": "2.0.3",
|
"@tiptap/vue-3": "2.0.3",
|
||||||
"@types/figlet": "^1.5.8",
|
"@types/figlet": "^1.5.8",
|
||||||
"@types/memorystream": "^0.3.4",
|
|
||||||
"@vicons/material": "^0.12.0",
|
"@vicons/material": "^0.12.0",
|
||||||
"@vicons/tabler": "^0.12.0",
|
"@vicons/tabler": "^0.12.0",
|
||||||
"@vueuse/core": "^10.3.0",
|
"@vueuse/core": "^10.3.0",
|
||||||
@@ -58,9 +57,7 @@
|
|||||||
"crypto-js": "^4.1.1",
|
"crypto-js": "^4.1.1",
|
||||||
"date-fns": "^2.29.3",
|
"date-fns": "^2.29.3",
|
||||||
"dompurify": "^3.0.6",
|
"dompurify": "^3.0.6",
|
||||||
"email-normalizer": "^1.0.0",
|
|
||||||
"emojilib": "^3.0.10",
|
"emojilib": "^3.0.10",
|
||||||
"exif-be-gone": "^1.5.1",
|
|
||||||
"figlet": "^1.7.0",
|
"figlet": "^1.7.0",
|
||||||
"figue": "^1.2.0",
|
"figue": "^1.2.0",
|
||||||
"fuse.js": "^6.6.2",
|
"fuse.js": "^6.6.2",
|
||||||
@@ -74,7 +71,6 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"marked": "^10.0.0",
|
"marked": "^10.0.0",
|
||||||
"mathjs": "^11.9.1",
|
"mathjs": "^11.9.1",
|
||||||
"memorystream": "^0.3.1",
|
|
||||||
"mime-types": "^2.1.35",
|
"mime-types": "^2.1.35",
|
||||||
"monaco-editor": "^0.43.0",
|
"monaco-editor": "^0.43.0",
|
||||||
"naive-ui": "^2.35.0",
|
"naive-ui": "^2.35.0",
|
||||||
@@ -137,7 +133,6 @@
|
|||||||
"unplugin-icons": "^0.17.0",
|
"unplugin-icons": "^0.17.0",
|
||||||
"unplugin-vue-components": "^0.25.0",
|
"unplugin-vue-components": "^0.25.0",
|
||||||
"vite": "^4.4.9",
|
"vite": "^4.4.9",
|
||||||
"vite-plugin-node-polyfills": "^0.22.0",
|
|
||||||
"vite-plugin-pwa": "^0.16.0",
|
"vite-plugin-pwa": "^0.16.0",
|
||||||
"vite-plugin-vue-markdown": "^0.23.5",
|
"vite-plugin-vue-markdown": "^0.23.5",
|
||||||
"vite-svg-loader": "^4.0.0",
|
"vite-svg-loader": "^4.0.0",
|
||||||
|
|||||||
Generated
+9
-673
File diff suppressed because it is too large.
Load diff
@@ -1,7 +1,6 @@
|
|||||||
import { extension as getExtensionFromMimeType, extension as getMimeTypeFromExtension } from 'mime-types';
|
import { extension as getExtensionFromMimeType, extension as getMimeTypeFromExtension } from 'mime-types';
|
||||||
import type { MaybeRef, Ref } from 'vue';
|
import type { Ref } from 'vue';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { get } from '@vueuse/core';
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getMimeTypeFromBase64,
|
getMimeTypeFromBase64,
|
||||||
@@ -76,11 +75,21 @@ function downloadFromBase64({ sourceValue, filename, extension, fileMimeType }:
|
|||||||
}
|
}
|
||||||
|
|
||||||
function useDownloadFileFromBase64(
|
function useDownloadFileFromBase64(
|
||||||
{ source, filename, extension }:
|
{ source, filename, extension, fileMimeType }:
|
||||||
{ source: MaybeRef<string>; filename?: MaybeRef<string>; extension?: MaybeRef<string> }) {
|
{ source: Ref<string>; filename?: string; extension?: string; fileMimeType?: string }) {
|
||||||
return {
|
return {
|
||||||
download() {
|
download() {
|
||||||
downloadFromBase64({ sourceValue: get(source), filename: get(filename), extension: get(extension) });
|
downloadFromBase64({ sourceValue: source.value, filename, extension, fileMimeType });
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function useDownloadFileFromBase64Refs(
|
||||||
|
{ source, filename, extension }:
|
||||||
|
{ source: Ref<string>; filename?: Ref<string>; extension?: Ref<string> }) {
|
||||||
|
return {
|
||||||
|
download() {
|
||||||
|
downloadFromBase64({ sourceValue: source.value, filename: filename?.value, extension: extension?.value });
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -107,13 +116,3 @@ function previewImageFromBase64(base64String: string): HTMLImageElement {
|
|||||||
|
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
||||||
function useDownloadFileFromBase64Refs(
|
|
||||||
{ source, filename, extension }:
|
|
||||||
{ source: Ref<string>; filename?: Ref<string>; extension?: Ref<string> }) {
|
|
||||||
return {
|
|
||||||
download() {
|
|
||||||
downloadFromBase64({ sourceValue: source.value, filename: filename?.value, extension: extension?.value });
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { normalizeEmail } from 'email-normalizer';
|
|
||||||
import { withDefaultOnError } from '@/utils/defaults';
|
|
||||||
import { useCopy } from '@/composable/copy';
|
|
||||||
|
|
||||||
const emails = ref('');
|
|
||||||
const normalizedEmails = computed(() => {
|
|
||||||
if (!emails.value) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
return emails.value
|
|
||||||
.split('\n')
|
|
||||||
.map((email) => {
|
|
||||||
return withDefaultOnError(() => normalizeEmail({ email }), `Unable to parse email: ${email}`);
|
|
||||||
})
|
|
||||||
.join('\n');
|
|
||||||
});
|
|
||||||
|
|
||||||
const { copy } = useCopy({ source: normalizedEmails, text: 'Normalized emails copied to the clipboard', createToast: true });
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div class="mb-2">
|
|
||||||
Raw emails to normalize:
|
|
||||||
</div>
|
|
||||||
<c-input-text
|
|
||||||
v-model:value="emails"
|
|
||||||
placeholder="Put your emails here (one per line)..."
|
|
||||||
rows="3"
|
|
||||||
multiline
|
|
||||||
autocomplete="off"
|
|
||||||
autocorrect="off"
|
|
||||||
autocapitalize="off"
|
|
||||||
spellcheck="false"
|
|
||||||
autofocus
|
|
||||||
monospace
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div class="mb-2 mt-4">
|
|
||||||
Normalized emails:
|
|
||||||
</div>
|
|
||||||
<c-input-text
|
|
||||||
:value="normalizedEmails"
|
|
||||||
placeholder="Normalized emails will appear here..."
|
|
||||||
rows="3"
|
|
||||||
autocomplete="off"
|
|
||||||
autocorrect="off"
|
|
||||||
autocapitalize="off"
|
|
||||||
spellcheck="false"
|
|
||||||
multiline
|
|
||||||
readonly
|
|
||||||
monospace
|
|
||||||
/>
|
|
||||||
<div class="mt-4 flex justify-center gap-2">
|
|
||||||
<c-button @click="emails = ''">
|
|
||||||
Clear emails
|
|
||||||
</c-button>
|
|
||||||
<c-button :disabled="!normalizedEmails" @click="copy()">
|
|
||||||
Copy normalized emails
|
|
||||||
</c-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
import { Mail } from '@vicons/tabler';
|
|
||||||
import { defineTool } from '../tool';
|
|
||||||
|
|
||||||
export const tool = defineTool({
|
|
||||||
name: 'Email normalizer',
|
|
||||||
path: '/email-normalizer',
|
|
||||||
description: 'Normalize email addresses to a standard format for easier comparison. Useful for deduplication and data cleaning.',
|
|
||||||
keywords: ['email', 'normalizer'],
|
|
||||||
component: () => import('./email-normalizer.vue'),
|
|
||||||
icon: Mail,
|
|
||||||
createdAt: new Date('2024-08-15'),
|
|
||||||
});
|
|
||||||
+1
-10
@@ -1,13 +1,11 @@
|
|||||||
import { tool as base64FileConverter } from './base64-file-converter';
|
import { tool as base64FileConverter } from './base64-file-converter';
|
||||||
import { tool as base64StringConverter } from './base64-string-converter';
|
import { tool as base64StringConverter } from './base64-string-converter';
|
||||||
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
||||||
import { tool as emailNormalizer } from './email-normalizer';
|
|
||||||
|
|
||||||
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
||||||
|
|
||||||
import { tool as textToUnicode } from './text-to-unicode';
|
import { tool as textToUnicode } from './text-to-unicode';
|
||||||
import { tool as safelinkDecoder } from './safelink-decoder';
|
import { tool as safelinkDecoder } from './safelink-decoder';
|
||||||
import { tool as removeExif } from './remove-exif';
|
|
||||||
import { tool as xmlToJson } from './xml-to-json';
|
import { tool as xmlToJson } from './xml-to-json';
|
||||||
import { tool as jsonToXml } from './json-to-xml';
|
import { tool as jsonToXml } from './json-to-xml';
|
||||||
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
|
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
|
||||||
@@ -138,13 +136,7 @@ export const toolsByCategory: ToolCategory[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Images and videos',
|
name: 'Images and videos',
|
||||||
components: [
|
components: [qrCodeGenerator, wifiQrCodeGenerator, svgPlaceholderGenerator, cameraRecorder],
|
||||||
qrCodeGenerator,
|
|
||||||
wifiQrCodeGenerator,
|
|
||||||
svgPlaceholderGenerator,
|
|
||||||
cameraRecorder,
|
|
||||||
removeExif,
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Development',
|
name: 'Development',
|
||||||
@@ -160,7 +152,6 @@ export const toolsByCategory: ToolCategory[] = [
|
|||||||
dockerRunToDockerComposeConverter,
|
dockerRunToDockerComposeConverter,
|
||||||
xmlFormatter,
|
xmlFormatter,
|
||||||
yamlViewer,
|
yamlViewer,
|
||||||
emailNormalizer,
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
import { PictureInPictureOff } from '@vicons/tabler';
|
|
||||||
import { defineTool } from '../tool';
|
|
||||||
|
|
||||||
export const tool = defineTool({
|
|
||||||
name: 'Remove EXIF',
|
|
||||||
path: '/remove-exif',
|
|
||||||
description: 'Remove Exif from JPEG Files',
|
|
||||||
keywords: ['remove', 'exif', 'jpeg'],
|
|
||||||
component: () => import('./remove-exif.vue'),
|
|
||||||
icon: PictureInPictureOff,
|
|
||||||
createdAt: new Date('2024-07-14'),
|
|
||||||
});
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { Buffer } from 'node:buffer';
|
|
||||||
import { Base64 } from 'js-base64';
|
|
||||||
import ExifTransformer from 'exif-be-gone';
|
|
||||||
import MemoryStream from 'memorystream';
|
|
||||||
import { useDownloadFileFromBase64 } from '@/composable/downloadBase64';
|
|
||||||
|
|
||||||
const status = ref<'idle' | 'done' | 'error' | 'processing'>('idle');
|
|
||||||
const file = ref<File | null>(null);
|
|
||||||
|
|
||||||
interface ToBufferMemoryStream extends MemoryStream {
|
|
||||||
toBuffer(): Buffer
|
|
||||||
}
|
|
||||||
|
|
||||||
const base64OutputFile = ref('');
|
|
||||||
const fileName = ref('');
|
|
||||||
const { download } = useDownloadFileFromBase64(
|
|
||||||
{
|
|
||||||
source: base64OutputFile,
|
|
||||||
filename: fileName,
|
|
||||||
extension: 'jpg',
|
|
||||||
});
|
|
||||||
|
|
||||||
async function onFileUploaded(uploadedFile: File) {
|
|
||||||
file.value = uploadedFile;
|
|
||||||
const fileBuffer = await uploadedFile.arrayBuffer();
|
|
||||||
|
|
||||||
fileName.value = `noexif_${uploadedFile.name}`;
|
|
||||||
status.value = 'processing';
|
|
||||||
try {
|
|
||||||
const inStream = MemoryStream.createReadStream(Buffer.from(fileBuffer));
|
|
||||||
const outStream = MemoryStream.createWriteStream();
|
|
||||||
const trans = new ExifTransformer();
|
|
||||||
await new Promise((resolve, _reject) => {
|
|
||||||
inStream.pipe(trans).pipe(outStream).on('finish', () => resolve(true));
|
|
||||||
});
|
|
||||||
|
|
||||||
const outFileBuffer = (outStream as ToBufferMemoryStream).toBuffer();
|
|
||||||
base64OutputFile.value = `data:image/File;base64,${Base64.fromUint8Array(outFileBuffer)}`;
|
|
||||||
status.value = 'done';
|
|
||||||
|
|
||||||
download();
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
status.value = 'error';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div style="flex: 0 0 100%">
|
|
||||||
<div mx-auto max-w-600px>
|
|
||||||
<c-file-upload title="Drag and drop a Image file here, or click to select a file" accept="image/*" @file-upload="onFileUploaded" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div mt-3 flex justify-center>
|
|
||||||
<c-alert v-if="status === 'error'" type="error">
|
|
||||||
An error occured processing {{ fileName }}
|
|
||||||
</c-alert>
|
|
||||||
<n-spin
|
|
||||||
v-if="status === 'processing'"
|
|
||||||
size="small"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
@@ -15,7 +15,6 @@ import { VitePWA } from 'vite-plugin-pwa';
|
|||||||
import markdown from 'vite-plugin-vue-markdown';
|
import markdown from 'vite-plugin-vue-markdown';
|
||||||
import svgLoader from 'vite-svg-loader';
|
import svgLoader from 'vite-svg-loader';
|
||||||
import { configDefaults } from 'vitest/config';
|
import { configDefaults } from 'vitest/config';
|
||||||
import { nodePolyfills } from 'vite-plugin-node-polyfills'
|
|
||||||
|
|
||||||
const baseUrl = process.env.BASE_URL ?? '/';
|
const baseUrl = process.env.BASE_URL ?? '/';
|
||||||
|
|
||||||
@@ -98,7 +97,6 @@ export default defineConfig({
|
|||||||
resolvers: [NaiveUiResolver(), IconsResolver({ prefix: 'icon' })],
|
resolvers: [NaiveUiResolver(), IconsResolver({ prefix: 'icon' })],
|
||||||
}),
|
}),
|
||||||
Unocss(),
|
Unocss(),
|
||||||
nodePolyfills(),
|
|
||||||
],
|
],
|
||||||
base: baseUrl,
|
base: baseUrl,
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|||||||
Reference in new issue
Block a user