Merge branch 'main' into tools-filtering

This commit is contained in:
AshAnand34
2025-07-18 14:45:15 -07:00
336 changed files with 21767 additions and 2122 deletions

View File

@@ -2,13 +2,14 @@ import { defineTool } from '@tools/defineTool';
import { lazy } from 'react';
export const tool = defineTool('csv', {
name: 'Change CSV separator',
path: 'change-csv-separator',
icon: 'material-symbols:split-scene-rounded',
description:
'Just upload your CSV file in the form below and it will automatically get a new column delimiter character. In the tool options, you can specify which delimiter and quote characters are used in the source CSV file and customize the desired delimiter and quote characters for the output CSV. You can also filter the input CSV before the conversion process and skip blank lines and comment lines.',
shortDescription: 'Quickly change the CSV column delimiter to a new symbol.',
keywords: ['change', 'csv', 'separator'],
userTypes: ['Developers'],
component: lazy(() => import('./index'))
icon: 'material-symbols:code',
keywords: ['csv', 'separator', 'delimiter', 'change'],
component: lazy(() => import('./index')),
i18n: {
name: 'csv:changeCsvSeparator.title',
description: 'csv:changeCsvSeparator.description',
shortDescription: 'csv:changeCsvSeparator.shortDescription'
}
});

View File

@@ -2,14 +2,14 @@ import { defineTool } from '@tools/defineTool';
import { lazy } from 'react';
export const tool = defineTool('csv', {
name: 'Convert CSV Rows to Columns',
i18n: {
name: 'csv:csvRowsToColumns.title',
description: 'csv:csvRowsToColumns.description',
shortDescription: 'csv:csvRowsToColumns.shortDescription',
longDescription: 'csv:csvRowsToColumns.longDescription'
},
path: 'csv-rows-to-columns',
icon: 'fluent:text-arrow-down-right-column-24-filled',
description:
'This tool converts rows of a CSV (Comma Separated Values) file into columns. It extracts the horizontal lines from the input CSV one by one, rotates them 90 degrees, and outputs them as vertical columns one after another, separated by commas.',
longDescription:
'This tool converts rows of a CSV (Comma Separated Values) file into columns. For example, if the input CSV data has 6 rows, then the output will have 6 columns and the elements of the rows will be arranged from the top to bottom. In a well-formed CSV, the number of values in each row is the same. However, in cases when rows are missing fields, the program can fix them and you can choose from the available options: fill missing data with empty elements or replace missing data with custom elements, such as "missing", "?", or "x". During the conversion process, the tool also cleans the CSV file from unnecessary information, such as empty lines (these are lines without visible information) and comments. To help the tool correctly identify comments, in the options, you can specify the symbol at the beginning of a line that starts a comment. This symbol is typically a hash "#" or double slash "//". Csv-abulous!.',
shortDescription: 'Convert CSV rows to columns.',
keywords: ['csv', 'rows', 'columns', 'transpose'],
userTypes: ['Developers'],
component: lazy(() => import('./index'))

View File

@@ -6,10 +6,9 @@ import { convertCsvToJson } from './service';
import { CardExampleType } from '@components/examples/ToolExamples';
import { ToolComponentProps } from '@tools/defineTool';
import { Box } from '@mui/material';
import RadioWithTextField from '@components/options/RadioWithTextField';
import SimpleRadio from '@components/options/SimpleRadio';
import CheckboxWithDesc from '@components/options/CheckboxWithDesc';
import TextFieldWithDesc from '@components/options/TextFieldWithDesc';
import { useTranslation } from 'react-i18next';
type InitialValuesType = {
delimiter: string;
@@ -114,6 +113,7 @@ id,name,active
];
export default function CsvToJson({ title }: ToolComponentProps) {
const { t } = useTranslation('csv');
const [input, setInput] = useState<string>('');
const [result, setResult] = useState<string>('');
@@ -131,8 +131,10 @@ export default function CsvToJson({ title }: ToolComponentProps) {
setResult(jsonResult);
} catch (error) {
setResult(
`Error: ${
error instanceof Error ? error.message : 'Invalid CSV format'
`${t('csvToJson.error')}: ${
error instanceof Error
? error.message
: t('csvToJson.invalidCsvFormat')
}`
);
}
@@ -148,28 +150,36 @@ export default function CsvToJson({ title }: ToolComponentProps) {
compute={compute}
exampleCards={exampleCards}
inputComponent={
<ToolTextInput title="Input CSV" value={input} onChange={setInput} />
<ToolTextInput
title={t('csvToJson.inputTitle')}
value={input}
onChange={setInput}
/>
}
resultComponent={
<ToolTextResult title="Output JSON" value={result} extension={'json'} />
<ToolTextResult
title={t('csvToJson.resultTitle')}
value={result}
extension={'json'}
/>
}
getGroups={({ values, updateField }) => [
{
title: 'Input CSV Format',
title: t('csvToJson.inputCsvFormat'),
component: (
<Box>
<TextFieldWithDesc
description="Column Separator"
description={t('csvToJson.columnSeparator')}
value={values.delimiter}
onOwnChange={(val) => updateField('delimiter', val)}
/>
<TextFieldWithDesc
description="Field Quote"
description={t('csvToJson.fieldQuote')}
onOwnChange={(val) => updateField('quote', val)}
value={values.quote}
/>
<TextFieldWithDesc
description="Comment Symbol"
description={t('csvToJson.commentSymbol')}
value={values.comment}
onOwnChange={(val) => updateField('comment', val)}
/>
@@ -177,35 +187,34 @@ export default function CsvToJson({ title }: ToolComponentProps) {
)
},
{
title: 'Conversion Options',
title: t('csvToJson.conversionOptions'),
component: (
<Box>
<CheckboxWithDesc
checked={values.useHeaders}
onChange={(value) => updateField('useHeaders', value)}
title="Use Headers"
description="First row is treated as column headers"
title={t('csvToJson.useHeaders')}
description={t('csvToJson.useHeadersDescription')}
/>
<CheckboxWithDesc
checked={values.skipEmptyLines}
onChange={(value) => updateField('skipEmptyLines', value)}
title="Skip Empty Lines"
description="Don't process empty lines in the CSV"
title={t('csvToJson.skipEmptyLines')}
description={t('csvToJson.skipEmptyLinesDescription')}
/>
<CheckboxWithDesc
checked={values.dynamicTypes}
onChange={(value) => updateField('dynamicTypes', value)}
title="Dynamic Types"
description="Convert numbers and booleans to their proper types"
title={t('csvToJson.dynamicTypes')}
description={t('csvToJson.dynamicTypesDescription')}
/>
</Box>
)
}
]}
toolInfo={{
title: 'What Is a CSV to JSON Converter?',
description:
'This tool transforms Comma Separated Values (CSV) files to JavaScript Object Notation (JSON) data structures. It supports various CSV formats with customizable delimiters, quote characters, and comment symbols. The converter can treat the first row as headers, skip empty lines, and automatically detect data types like numbers and booleans. The resulting JSON can be used for data migration, backups, or as input for other applications.'
title: t('csvToJson.toolInfo.title'),
description: t('csvToJson.toolInfo.description')
}}
/>
);

View File

@@ -2,12 +2,15 @@ import { defineTool } from '@tools/defineTool';
import { lazy } from 'react';
export const tool = defineTool('csv', {
name: 'Convert CSV to JSON',
i18n: {
name: 'csv:csvToJson.title',
description: 'csv:csvToJson.description',
shortDescription: 'csv:csvToJson.shortDescription'
},
path: 'csv-to-json',
icon: 'lets-icons:json-light',
description:
'Convert CSV files to JSON format with customizable options for delimiters, quotes, and output formatting. Support for headers, comments, and dynamic type conversion.',
shortDescription: 'Convert CSV data to JSON format.',
keywords: ['csv', 'json', 'convert', 'transform', 'parse'],
userTypes: ['Developers'],
component: lazy(() => import('./index'))

View File

@@ -2,14 +2,15 @@ import { defineTool } from '@tools/defineTool';
import { lazy } from 'react';
export const tool = defineTool('csv', {
name: 'Convert CSV to TSV',
i18n: {
name: 'csv:csvToTsv.title',
description: 'csv:csvToTsv.description',
shortDescription: 'csv:csvToTsv.shortDescription',
longDescription: 'csv:csvToTsv.longDescription'
},
path: 'csv-to-tsv',
icon: 'codicon:keyboard-tab',
description:
'Upload your CSV file in the form below and it will automatically get converted to a TSV file. In the tool options, you can customize the input CSV format specify the field delimiter, quotation character, and comment symbol, as well as skip empty CSV lines, and choose whether to preserve CSV column headers.',
shortDescription: 'Convert CSV data to TSV format.',
longDescription:
'This tool transforms Comma Separated Values (CSV) data to Tab Separated Values (TSV) data. Both CSV and TSV are popular file formats for storing tabular data but they use different delimiters to separate values CSV uses commas (","), while TSV uses tabs ("\t"). If we compare CSV files to TSV files, then CSV files are much harder to parse than TSV files because the values themselves may contain commas, so it is not always obvious where one field starts and ends without complicated parsing rules. TSV, on the other hand, uses just a tab symbol, which does not usually appear in data, so separating fields in TSV is as simple as splitting the input by the tab character. To convert CSV to TSV, simply input the CSV data in the input of this tool. In rare cases when a CSV file has a delimiter other than a comma, you can specify the current delimiter in the options of the tool. You can also specify the current quote character and the comment start character. Additionally, empty CSV lines can be skipped by activating the "Ignore Lines with No Data" option. If this option is off, then empty lines in the CSV are converted to empty TSV lines. The "Preserve Headers" option allows you to choose whether to process column headers of a CSV file. If the option is selected, then the resulting TSV file will include the first row of the input CSV file, which contains the column names. Alternatively, if the headers option is not selected, the first row will be skipped during the data conversion process. For the reverse conversion from TSV to CSV, you can use our Convert TSV to CSV tool. Csv-abulous!',
keywords: ['csv', 'tsv', 'convert', 'transform', 'parse'],
userTypes: ['Developers'],
component: lazy(() => import('./index'))

View File

@@ -2,11 +2,15 @@ import { defineTool } from '@tools/defineTool';
import { lazy } from 'react';
export const tool = defineTool('csv', {
name: 'Convert CSV to XML',
i18n: {
name: 'csv:csvToXml.title',
description: 'csv:csvToXml.description',
shortDescription: 'csv:csvToXml.shortDescription'
},
path: 'csv-to-xml',
icon: 'mdi-light:xml',
description: 'Convert CSV files to XML format with customizable options.',
shortDescription: 'Convert CSV data to XML format.',
keywords: ['csv', 'xml', 'convert', 'transform', 'parse'],
userTypes: ['Developers'],
component: lazy(() => import('./index'))

View File

@@ -2,15 +2,16 @@ import { defineTool } from '@tools/defineTool';
import { lazy } from 'react';
export const tool = defineTool('csv', {
name: 'Convert CSV to YAML',
i18n: {
name: 'csv:csvToYaml.title',
description: 'csv:csvToYaml.description',
shortDescription: 'csv:csvToYaml.shortDescription',
longDescription: 'csv:csvToYaml.longDescription',
userTypes: ['Developers']
},
path: 'csv-to-yaml',
icon: 'nonicons:yaml-16',
description:
'Just upload your CSV file in the form below and it will automatically get converted to a YAML file. In the tool options, you can specify the field delimiter character, field quote character, and comment character to adapt the tool to custom CSV formats. Additionally, you can select the output YAML format: one that preserves CSV headers or one that excludes CSV headers.',
shortDescription: 'Quickly convert a CSV file to a YAML file.',
keywords: ['csv', 'to', 'yaml'],
longDescription:
'This tool transforms CSV (Comma Separated Values) data into the YAML (Yet Another Markup Language) data. CSV is a simple, tabular format that is used to represent matrix-like data types consisting of rows and columns. YAML, on the other hand, is a more advanced format (actually a superset of JSON), which creates more human-readable data for serialization, and it supports lists, dictionaries, and nested objects. This program supports various input CSV formats the input data can be comma-separated (default), semicolon-separated, pipe-separated, or use another completely different delimiter. You can specify the exact delimiter your data uses in the options. Similarly, in the options, you can specify the quote character that is used to wrap CSV fields (by default a double-quote symbol). You can also skip lines that start with comments by specifying the comment symbols in the options. This allows you to keep your data clean by skipping unnecessary lines. There are two ways to convert CSV to YAML. The first method converts each CSV row into a YAML list. The second method extracts headers from the first CSV row and creates YAML objects with keys based on these headers. You can also customize the output YAML format by specifying the number of spaces for indenting YAML structures. If you need to perform the reverse conversion, that is, transform YAML into CSV, you can use our Convert YAML to CSV tool. Csv-abulous!',
userTypes: ['Developers'],
component: lazy(() => import('./index'))
});

View File

@@ -10,6 +10,7 @@ import { findIncompleteCsvRecords } from './service';
import { InitialValuesType } from './types';
import TextFieldWithDesc from '@components/options/TextFieldWithDesc';
import CheckboxWithDesc from '@components/options/CheckboxWithDesc';
import { useTranslation } from 'react-i18next';
const initialValues: InitialValuesType = {
csvSeparator: ',',
@@ -103,6 +104,7 @@ export default function FindIncompleteCsvRecords({
title,
longDescription
}: ToolComponentProps) {
const { t } = useTranslation('csv');
const [input, setInput] = useState<string>('');
const [result, setResult] = useState<string>('');
@@ -115,55 +117,57 @@ export default function FindIncompleteCsvRecords({
updateField
}) => [
{
title: 'Csv input Options',
title: t('findIncompleteCsvRecords.csvInputOptions'),
component: (
<Box>
<TextFieldWithDesc
value={values.csvSeparator}
onOwnChange={(val) => updateField('csvSeparator', val)}
description={
'Enter the character used to delimit columns in the CSV input file.'
}
description={t('findIncompleteCsvRecords.csvSeparatorDescription')}
/>
<TextFieldWithDesc
value={values.quoteCharacter}
onOwnChange={(val) => updateField('quoteCharacter', val)}
description={
'Enter the quote character used to quote the CSV input fields.'
}
description={t(
'findIncompleteCsvRecords.quoteCharacterDescription'
)}
/>
<TextFieldWithDesc
value={values.commentCharacter}
onOwnChange={(val) => updateField('commentCharacter', val)}
description={
'Enter the character indicating the start of a comment line. Lines starting with this symbol will be skipped.'
}
description={t(
'findIncompleteCsvRecords.commentCharacterDescription'
)}
/>
</Box>
)
},
{
title: 'Checking Options',
title: t('findIncompleteCsvRecords.checkingOptions'),
component: (
<Box>
<CheckboxWithDesc
checked={values.emptyLines}
onChange={(value) => updateField('emptyLines', value)}
title="Delete Lines with No Data"
description="Remove empty lines from CSV input file."
title={t('findIncompleteCsvRecords.deleteLinesWithNoData')}
description={t(
'findIncompleteCsvRecords.deleteLinesWithNoDataDescription'
)}
/>
<CheckboxWithDesc
checked={values.emptyValues}
onChange={(value) => updateField('emptyValues', value)}
title="Find Empty Values"
description="Display a message about CSV fields that are empty (These are not missing fields but fields that contain nothing)."
title={t('findIncompleteCsvRecords.findEmptyValues')}
description={t(
'findIncompleteCsvRecords.findEmptyValuesDescription'
)}
/>
<CheckboxWithDesc
checked={values.messageLimit}
onChange={(value) => updateField('messageLimit', value)}
title="Limit number of messages"
title={t('findIncompleteCsvRecords.limitNumberOfMessages')}
/>
{values.messageLimit && (
@@ -172,7 +176,9 @@ export default function FindIncompleteCsvRecords({
onOwnChange={(val) => updateField('messageNumber', Number(val))}
type="number"
inputProps={{ min: 1 }}
description={'Set the limit of number of messages in the output.'}
description={t(
'findIncompleteCsvRecords.messageLimitDescription'
)}
/>
)}
</Box>
@@ -184,15 +190,27 @@ export default function FindIncompleteCsvRecords({
title={title}
input={input}
inputComponent={
<ToolTextInput title={'Input CSV'} value={input} onChange={setInput} />
<ToolTextInput
title={t('findIncompleteCsvRecords.inputTitle')}
value={input}
onChange={setInput}
/>
}
resultComponent={
<ToolTextResult
title={t('findIncompleteCsvRecords.resultTitle')}
value={result}
/>
}
resultComponent={<ToolTextResult title={'CSV Status'} value={result} />}
initialValues={initialValues}
exampleCards={exampleCards}
getGroups={getGroups}
setInput={setInput}
compute={compute}
toolInfo={{ title: `What is a ${title}?`, description: longDescription }}
toolInfo={{
title: t('findIncompleteCsvRecords.toolInfo.title', { title }),
description: longDescription
}}
/>
);
}

View File

@@ -2,16 +2,16 @@ import { defineTool } from '@tools/defineTool';
import { lazy } from 'react';
export const tool = defineTool('csv', {
name: 'Find incomplete CSV records',
path: 'find-incomplete-csv-records',
icon: 'tdesign:search-error',
description:
'Just upload your CSV file in the form below and this tool will automatically check if none of the rows or columns are missing values. In the tool options, you can adjust the input file format (specify the delimiter, quote character, and comment character). Additionally, you can enable checking for empty values, skip empty lines, and set a limit on the number of error messages in the output.',
shortDescription:
'Quickly find rows and columns in CSV that are missing values.',
keywords: ['find', 'incomplete', 'csv', 'records'],
longDescription:
'This tool analyzes CSV files to identify incomplete records where data is missing. It checks both rows and columns for missing values and provides detailed reports on data quality issues. Useful for data validation and quality assurance.',
userTypes: ['Developers'],
component: lazy(() => import('./index'))
component: lazy(() => import('./index')),
i18n: {
name: 'csv:findIncompleteCsvRecords.title',
description: 'csv:findIncompleteCsvRecords.description',
shortDescription: 'csv:findIncompleteCsvRecords.shortDescription',
userTypes: ['Developers']
}
});

View File

@@ -1,16 +1,17 @@
import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolContent from '@components/ToolContent';
import { ToolComponentProps } from '@tools/defineTool';
import ToolTextInput from '@components/input/ToolTextInput';
import ToolTextResult from '@components/result/ToolTextResult';
import { GetGroupsType } from '@components/options/ToolOptions';
import { CardExampleType } from '@components/examples/ToolExamples';
import { main } from './service';
import { getCsvHeaders } from '@utils/csv';
import { InitialValuesType } from './types';
import { GetGroupsType } from '@components/options/ToolOptions';
import TextFieldWithDesc from '@components/options/TextFieldWithDesc';
import SelectWithDesc from '@components/options/SelectWithDesc';
import { CardExampleType } from '@components/examples/ToolExamples';
import { ToolComponentProps } from '@tools/defineTool';
import { getCsvHeaders } from '@utils/csv';
import { useTranslation } from 'react-i18next';
const initialValues: InitialValuesType = {
csvToInsert: '',
@@ -27,15 +28,19 @@ const initialValues: InitialValuesType = {
const exampleCards: CardExampleType<InitialValuesType>[] = [
{
title: 'Add One Column to a CSV File',
title: 'Insert a single column by position',
description:
'In this example, we insert a column with the title "city" into a CSV file that already contains two other columns with titles "name" and "age". The new column consists of three values: "city", "dallas", and "houston", corresponding to the height of the input CSV data. The value "city" is the header value (appearing on the first row) and values "dallas" and "houston" are data values (appearing on rows two and three). We specify the position of the new column by an ordinal number and set it to 1 in the options. This value indicates that the new "city" column should be placed after the first column.',
sampleText: `name,age
john,25
emma,22`,
sampleResult: `name,city,age
john,dallas,25
emma,houston,22`,
'In this example, we insert a single column "city" at position 1 in the CSV data. The input CSV has data about cars, including the "Brand" and "Model" of the car. We now add a "city" column at position 1. To do this, we enter the city data in the comma-separated format in the "New Column" option, and to quickly add the new column at position 1, then we specify the position number.',
sampleText: `Brand,Model
Toyota,Camry
Ford,Mustang
Honda,Accord
Chevrolet,Malibu`,
sampleResult: `city,Brand,Model
dallas,Toyota,Camry
houston,Ford,Mustang
dallas,Honda,Accord
houston,Chevrolet,Malibu`,
sampleOptions: {
csvToInsert: `city
dallas
@@ -118,6 +123,7 @@ export default function InsertCsvColumns({
title,
longDescription
}: ToolComponentProps) {
const { t } = useTranslation('csv');
const [input, setInput] = useState<string>('');
const [result, setResult] = useState<string>('');
@@ -139,7 +145,7 @@ export default function InsertCsvColumns({
updateField
}) => [
{
title: 'CSV to insert',
title: t('insertCsvColumns.csvToInsert'),
component: (
<Box>
<TextFieldWithDesc
@@ -147,44 +153,42 @@ export default function InsertCsvColumns({
rows={3}
value={values.csvToInsert}
onOwnChange={(val) => updateField('csvToInsert', val)}
title="CSV separator"
description={`Enter one or more columns you want to insert into the CSV.
the character used to delimit columns has to be the same with the one in the CSV input file.
Ps: Blank lines will be ignored`}
title={t('insertCsvColumns.csvSeparator')}
description={t('insertCsvColumns.csvToInsertDescription')}
/>
</Box>
)
},
{
title: 'CSV Options',
title: t('insertCsvColumns.csvOptions'),
component: (
<Box>
<TextFieldWithDesc
value={values.separator}
onOwnChange={(val) => updateField('separator', val)}
description={
'Enter the character used to delimit columns in the CSV input file.'
}
description={t('insertCsvColumns.separatorDescription')}
/>
<TextFieldWithDesc
value={values.quoteChar}
onOwnChange={(val) => updateField('quoteChar', val)}
description={
'Enter the quote character used to quote the CSV input fields.'
}
description={t('insertCsvColumns.quoteCharDescription')}
/>
<TextFieldWithDesc
value={values.commentCharacter}
onOwnChange={(val) => updateField('commentCharacter', val)}
description={
'Enter the character indicating the start of a comment line. Lines starting with this symbol will be skipped.'
}
description={t('insertCsvColumns.commentCharacterDescription')}
/>
<SelectWithDesc
selected={values.customFill}
options={[
{ label: 'Fill With Empty Values', value: false },
{ label: 'Fill With Customs Values', value: true }
{
label: t('insertCsvColumns.fillWithEmptyValues'),
value: false
},
{
label: t('insertCsvColumns.fillWithCustomValues'),
value: true
}
]}
onChange={(value) => {
updateField('customFill', value);
@@ -192,48 +196,59 @@ export default function InsertCsvColumns({
updateField('customFillValue', ''); // Reset custom fill value
}
}}
description={
'If the input CSV file is incomplete (missing values), then add empty fields or custom symbols to records to make a well-formed CSV?'
}
description={t('insertCsvColumns.customFillDescription')}
/>
{values.customFill && (
<TextFieldWithDesc
value={values.customFillValue}
onOwnChange={(val) => updateField('customFillValue', val)}
description={
'Use this custom value to fill in missing fields. (Works only with "Custom Values" mode above.)'
}
description={t('insertCsvColumns.customFillValueDescription')}
/>
)}
</Box>
)
},
{
title: 'Position Options',
title: t('insertCsvColumns.positionOptions'),
component: (
<Box>
<SelectWithDesc
selected={values.insertingPosition}
options={[
{ label: 'Prepend columns', value: 'prepend' },
{ label: 'Append columns', value: 'append' },
{ label: 'Custom position', value: 'custom' }
{
label: t('insertCsvColumns.prependColumns'),
value: 'prepend'
},
{
label: t('insertCsvColumns.appendColumns'),
value: 'append'
},
{
label: t('insertCsvColumns.customPosition'),
value: 'custom'
}
]}
onChange={(value) => updateField('insertingPosition', value)}
description={'Specify where to insert the columns in the CSV file.'}
description={t('insertCsvColumns.insertingPositionDescription')}
/>
{values.insertingPosition === 'custom' && (
<SelectWithDesc
selected={values.customPostionOptions}
options={[
{ label: 'Header name', value: 'headerName' },
{ label: 'Position ', value: 'rowNumber' }
{
label: t('insertCsvColumns.headerName'),
value: 'headerName'
},
{
label: t('insertCsvColumns.position'),
value: 'rowNumber'
}
]}
onChange={(value) => updateField('customPostionOptions', value)}
description={
'Select the method to insert the columns in the CSV file.'
}
description={t(
'insertCsvColumns.customPositionOptionsDescription'
)}
/>
)}
@@ -243,42 +258,53 @@ export default function InsertCsvColumns({
selected={values.headerName}
options={headerOptions}
onChange={(value) => updateField('headerName', value)}
description={
'Header of the column you want to insert columns after.'
}
description={t('insertCsvColumns.headerNameDescription')}
/>
)}
{values.insertingPosition === 'custom' &&
values.customPostionOptions === 'rowNumber' && (
<TextFieldWithDesc
value={values.rowNumber}
onOwnChange={(val) => updateField('rowNumber', Number(val))}
inputProps={{ min: 1, max: headers.length }}
type="number"
description={
'Number of the column you want to insert columns after.'
value={values.rowNumber.toString()}
onOwnChange={(val) =>
updateField('rowNumber', parseInt(val) || 0)
}
description={t('insertCsvColumns.rowNumberDescription')}
type="number"
/>
)}
</Box>
)
}
];
return (
<ToolContent
title={title}
input={input}
inputComponent={
<ToolTextInput value={input} title="Input CSV" onChange={setInput} />
<ToolTextInput
title={t('insertCsvColumns.inputTitle')}
value={input}
onChange={setInput}
/>
}
resultComponent={
<ToolTextResult
title={t('insertCsvColumns.resultTitle')}
value={result}
extension={'csv'}
/>
}
resultComponent={<ToolTextResult title="Output CSV" value={result} />}
initialValues={initialValues}
exampleCards={exampleCards}
getGroups={getGroups}
setInput={setInput}
compute={compute}
toolInfo={{ title: `What is a ${title}?`, description: longDescription }}
input={input}
setInput={setInput}
toolInfo={{
title: t('insertCsvColumns.toolInfo.title'),
description: t('insertCsvColumns.toolInfo.description')
}}
exampleCards={exampleCards}
/>
);
}

View File

@@ -2,14 +2,16 @@ import { defineTool } from '@tools/defineTool';
import { lazy } from 'react';
export const tool = defineTool('csv', {
name: 'Insert CSV columns',
i18n: {
name: 'csv:insertCsvColumns.title',
description: 'csv:insertCsvColumns.description',
shortDescription: 'csv:insertCsvColumns.shortDescription',
userTypes: ['Developers']
},
path: 'insert-csv-columns',
icon: 'hugeicons:column-insert',
description:
'Just upload your CSV file in the form below, paste the new column in the options, and it will automatically get inserted in your CSV. In the tool options, you can also specify more than one column to insert, set the insertion position, and optionally skip the empty and comment lines.',
shortDescription:
'Quickly insert one or more new columns anywhere in a CSV file.',
keywords: ['insert', 'csv', 'columns', 'append', 'prepend'],
userTypes: ['Developers'],
component: lazy(() => import('./index'))
});

View File

@@ -2,14 +2,15 @@ import { defineTool } from '@tools/defineTool';
import { lazy } from 'react';
export const tool = defineTool('csv', {
name: 'Swap CSV Columns',
i18n: {
name: 'csv:swapCsvColumns.title',
description: 'csv:swapCsvColumns.description',
shortDescription: 'csv:swapCsvColumns.shortDescription',
longDescription: 'csv:swapCsvColumns.longDescription'
},
path: 'swap-csv-columns',
icon: 'eva:swap-outline',
description:
'Just upload your CSV file in the form below, specify the columns to swap, and the tool will automatically change the positions of the specified columns in the output file. In the tool options, you can specify the column positions or names that you want to swap, as well as fix incomplete data and optionally remove empty records and records that have been commented out.',
shortDescription: 'Reorder CSV columns.',
longDescription:
'This tool reorganizes CSV data by swapping the positions of its columns. Swapping columns can enhance the readability of a CSV file by placing frequently used data together or in the front for easier data comparison and editing. For example, you can swap the first column with the last or swap the second column with the third. To swap columns based on their positions, select the "Set Column Position" mode and enter the numbers of the "from" and "to" columns to be swapped in the first and second blocks of options. For example, if you have a CSV file with four columns "1, 2, 3, 4" and swap columns with positions "2" and "4", the output CSV will have columns in the order: "1, 4, 3, 2".As an alternative to positions, you can swap columns by specifying their headers (column names on the first row of data). If you enable this mode in the options, then you can enter the column names like "location" and "city", and the program will swap these two columns. If any of the specified columns have incomplete data (some fields are missing), you can choose to skip such data or fill the missing fields with empty values or custom values (specified in the options). Additionally, you can specify the symbol used for comments in the CSV data, such as "#" or "//". If you do not need the commented lines in the output, you can remove them by using the "Delete Comments" checkbox. You can also activate the checkbox "Delete Empty Lines" to get rid of empty lines that contain no visible information. Csv-abulous!',
keywords: ['csv', 'swap', 'columns'],
userTypes: ['Developers'],
component: lazy(() => import('./index'))

View File

@@ -2,15 +2,17 @@ import { defineTool } from '@tools/defineTool';
import { lazy } from 'react';
export const tool = defineTool('csv', {
name: 'Transpose CSV',
i18n: {
name: 'csv:transposeCsv.title',
description: 'csv:transposeCsv.description',
shortDescription: 'csv:transposeCsv.shortDescription',
longDescription: 'csv:transposeCsv.longDescription',
userTypes: ['Developers']
},
path: 'transpose-csv',
icon: 'carbon:transpose',
description:
'Just upload your CSV file in the form below, and this tool will automatically transpose your CSV. In the tool options, you can specify the character that starts the comment lines in the CSV to remove them. Additionally, if the CSV is incomplete (missing values), you can replace missing values with the empty character or a custom character.',
shortDescription: 'Quickly transpose a CSV file.',
keywords: ['transpose', 'csv'],
longDescription:
'This tool transposes Comma Separated Values (CSV). It treats the CSV as a matrix of data and flips all elements across the main diagonal. The output contains the same CSV data as the input, but now all the rows have become columns, and all the columns have become rows. After transposition, the CSV file will have opposite dimensions. For example, if the input file has 4 columns and 3 rows, the output file will have 3 columns and 4 rows. During conversion, the program also cleans the data from unnecessary lines and corrects incomplete data. Specifically, the tool automatically deletes all empty records and comments that begin with a specific character, which you can set in the option. Additionally, in cases where the CSV data is corrupted or lost, the utility completes the file with empty fields or custom fields that can be specified in the options. Csv-abulous!',
userTypes: ['Developers'],
component: lazy(() => import('./index'))
});