mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-29 08:39:23 +03:00
Compare commits
109
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c9ad77fb0 | ||
|
|
229814a4b9 | ||
|
|
89cda92d46 | ||
|
|
722cd7fa53 | ||
|
|
9311b39612 | ||
|
|
f7700cede1 | ||
|
|
b6ef5d50dc | ||
|
|
f78b85ea14 | ||
|
|
f3d5ab8262 | ||
|
|
7a48c2fe41 | ||
|
|
665db9b9ec | ||
|
|
dd5ca6f693 | ||
|
|
eaa8b5b672 | ||
|
|
368d088c7e | ||
|
|
00053c3e83 | ||
|
|
6762677a94 | ||
|
|
3b21a6b60e | ||
|
|
58e2fb39b7 | ||
|
|
91f565f839 | ||
|
|
937ddc64c7 | ||
|
|
2593df0ef5 | ||
|
|
9c925ac711 | ||
|
|
2da9832fd9 | ||
|
|
4751417bf6 | ||
|
|
e073f3b99a | ||
|
|
77e76679b0 | ||
|
|
93532cec55 | ||
|
|
b982fa5e56 | ||
|
|
41d24a52e7 | ||
|
|
134a5e829b | ||
|
|
ca12661fa1 | ||
|
|
6cb20b76b1 | ||
|
|
ece277001f | ||
|
|
3564ccfb7d | ||
|
|
4089c6231f | ||
|
|
1829733f3b | ||
|
|
6eccfc126e | ||
|
|
68c56e4742 | ||
|
|
02e40dced8 | ||
|
|
7931c9ba3c | ||
|
|
40d90b94a2 | ||
|
|
bcf93f3824 | ||
|
|
0e9c33ddd3 | ||
|
|
f4d4de8cc3 | ||
|
|
2160e7a894 | ||
|
|
2c12e1e38c | ||
|
|
8efe340740 | ||
|
|
2037d14cd6 | ||
|
|
e99d7b4755 | ||
|
|
35e91b3008 | ||
|
|
af6ccec7ff | ||
|
|
06e4f84749 | ||
|
|
f01d56cd6b | ||
|
|
faaeeb28fa | ||
|
|
520d2cd77f | ||
|
|
2464f1ff3e | ||
|
|
ec865b7595 | ||
|
|
53aa948027 | ||
|
|
5a990ae515 | ||
|
|
4cc875f2d2 | ||
|
|
7ed2e419c6 | ||
|
|
9d0786f15e | ||
|
|
e94e67b8ca | ||
|
|
70194069b5 | ||
|
|
50581c2a36 | ||
|
|
60475933b4 | ||
|
|
a76d7500e6 | ||
|
|
40841c9518 | ||
|
|
2519cc05d1 | ||
|
|
b824880b21 | ||
|
|
74f3ab41bd | ||
|
|
795f713f5c | ||
|
|
c7ab527ccc | ||
|
|
b44367f3e8 | ||
|
|
9750ac5cea | ||
|
|
bf7f986bfd | ||
|
|
33cffc5d73 | ||
|
|
ed875a13b1 | ||
|
|
e63432883e | ||
|
|
ad213e082d | ||
|
|
a768896d43 | ||
|
|
9dd8412e57 | ||
|
|
1a0ab177db | ||
|
|
ce8fcdfa04 | ||
|
|
5b93531eec | ||
|
|
14abe98e07 | ||
|
|
d793d90b3c | ||
|
|
fcfb301bed | ||
|
|
7bc3f3bc18 | ||
|
|
4911afb7b7 | ||
|
|
4613423f01 | ||
|
|
4b9d7ab637 | ||
|
|
f47a9cd0b9 | ||
|
|
e61e3a7f11 | ||
|
|
b89b52d5fd | ||
|
|
bf65b101f6 | ||
|
|
d440fd841c | ||
|
|
08d76f3a83 | ||
|
|
b7d18ca418 | ||
|
|
27d19a6927 | ||
|
|
c64a5fda31 | ||
|
|
120e63601c | ||
|
|
6d868f9182 | ||
|
|
07eea0f484 | ||
|
|
a4ab7db9e4 | ||
|
|
fa7c89cb44 | ||
|
|
e88a2454a4 | ||
|
|
5035cb888c | ||
|
|
d45637cd4f |
No files matched your search
@@ -8,6 +8,9 @@ on:
|
||||
jobs:
|
||||
docker-release:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
architecture: [amd64,arm64]
|
||||
steps:
|
||||
- name: Get release version
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||
@@ -41,7 +44,7 @@ jobs:
|
||||
file: ./Dockerfile
|
||||
build-args: |
|
||||
"BASE_URL=/it-tools/"
|
||||
platforms: linux/amd64,linux/arm64
|
||||
platforms: linux/${{ matrix.architecture }}
|
||||
push: true
|
||||
tags: |
|
||||
sharevb/it-tools:baseurl-it-tools
|
||||
|
||||
+1064
File diff suppressed because it is too large.
Load diff
@@ -33,6 +33,30 @@ services:
|
||||
- 8080:8080
|
||||
```
|
||||
|
||||
## Filter tools and add home custom content
|
||||
|
||||
You can add custom content in Home page by mounting a `home.custom.md` in `/usr/share/nginx/html`.
|
||||
|
||||
You can filter available tools by mounting `tools-filter.json` in `/usr/share/nginx/html`. It can contains the following filtering regex:
|
||||
```json
|
||||
{
|
||||
"excludeCategoryFilterRegex": "",
|
||||
"includeCategoryFilterRegex": "",
|
||||
"excludeToolsFilterRegex": "",
|
||||
"includeToolsFilterRegex": ""
|
||||
}
|
||||
```
|
||||
Category matches on category (English) names ; Tools matches on tools path/url.
|
||||
|
||||
See (docker-tools-filter-and-home-content)[https://github.com/sharevb/it-tools]
|
||||
|
||||
## To build using a custom default language:
|
||||
|
||||
```
|
||||
docker build -t it-tools-fr --build-arg VITE_LANGUAGE=fr .
|
||||
docker run -d --name it-tools-fr --restart unless-stopped -p 8080:8080 it-tools-fr
|
||||
```
|
||||
|
||||
## Build docker image for a custom subfolder
|
||||
|
||||
According to https://github.com/sharevb/it-tools/pull/461#issuecomment-1602506049 and https://github.com/CorentinTh/it-tools/pull/461:
|
||||
|
||||
Vendored
+48
-23
@@ -11,6 +11,7 @@ declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
'404.page': typeof import('./src/pages/404.page.vue')['default']
|
||||
About: typeof import('./src/pages/About.vue')['default']
|
||||
AdLdapSearcher: typeof import('./src/tools/ad-ldap-searcher/ad-ldap-searcher.vue')['default']
|
||||
AiPromptSplitter: typeof import('./src/tools/ai-prompt-splitter/ai-prompt-splitter.vue')['default']
|
||||
AlarmSoundToggle: typeof import('./src/tools/pomodoro-timer/app/components/AlarmSoundToggle.vue')['default']
|
||||
AngleConverter: typeof import('./src/tools/angle-converter/angle-converter.vue')['default']
|
||||
@@ -25,11 +26,14 @@ declare module '@vue/runtime-core' {
|
||||
BarcodeReader: typeof import('./src/tools/barcode-reader/barcode-reader.vue')['default']
|
||||
'Base.layout': typeof import('./src/layouts/base.layout.vue')['default']
|
||||
Base64FileConverter: typeof import('./src/tools/base64-file-converter/base64-file-converter.vue')['default']
|
||||
Base64HexConverter: typeof import('./src/tools/base64-hex-converter/base64-hex-converter.vue')['default']
|
||||
Base64StringConverter: typeof import('./src/tools/base64-string-converter/base64-string-converter.vue')['default']
|
||||
BasicAuthGenerator: typeof import('./src/tools/basic-auth-generator/basic-auth-generator.vue')['default']
|
||||
Bcrypt: typeof import('./src/tools/bcrypt/bcrypt.vue')['default']
|
||||
BenchmarkBuilder: typeof import('./src/tools/benchmark-builder/benchmark-builder.vue')['default']
|
||||
BimiDnsGenerator: typeof import('./src/tools/bimi-dns-generator/bimi-dns-generator.vue')['default']
|
||||
Bip39Generator: typeof import('./src/tools/bip39-generator/bip39-generator.vue')['default']
|
||||
BmiCalculator: typeof import('./src/tools/bmi-calculator/bmi-calculator.vue')['default']
|
||||
BounceParser: typeof import('./src/tools/bounce-parser/bounce-parser.vue')['default']
|
||||
CAlert: typeof import('./src/ui/c-alert/c-alert.vue')['default']
|
||||
'CAlert.demo': typeof import('./src/ui/c-alert/c-alert.demo.vue')['default']
|
||||
@@ -76,6 +80,7 @@ declare module '@vue/runtime-core' {
|
||||
CommandPaletteOption: typeof import('./src/modules/command-palette/components/command-palette-option.vue')['default']
|
||||
CommonRegex: typeof import('./src/tools/common-regex-memo/common-regex.md')['default']
|
||||
CommonRegexMemo: typeof import('./src/tools/common-regex-memo/common-regex-memo.vue')['default']
|
||||
Countdown: typeof import('./src/tools/countdown/countdown.vue')['default']
|
||||
Counter: typeof import('./src/tools/pomodoro-timer/app/components/Counter.vue')['default']
|
||||
CrcCalculator: typeof import('./src/tools/crc-calculator/crc-calculator.vue')['default']
|
||||
CrontabGenerator: typeof import('./src/tools/crontab-generator/crontab-generator.vue')['default']
|
||||
@@ -83,7 +88,8 @@ declare module '@vue/runtime-core' {
|
||||
'CSelect.demo': typeof import('./src/ui/c-select/c-select.demo.vue')['default']
|
||||
CsrGenerator: typeof import('./src/tools/csr-generator/csr-generator.vue')['default']
|
||||
CssPrettifier: typeof import('./src/tools/css-prettifier/css-prettifier.vue')['default']
|
||||
CssSelectorsMemo: typeof import('./src/tools/css-selectors-memo/css-selectors-memo.md')['default']
|
||||
CssSelectors: typeof import('./src/tools/css-selectors-memo/css-selectors.md')['default']
|
||||
CssSelectorsMemo: typeof import('./src/tools/css-selectors-memo/css-selectors-memo.vue')['default']
|
||||
CssXpathConverter: typeof import('./src/tools/css-xpath-converter/css-xpath-converter.vue')['default']
|
||||
CsvToJson: typeof import('./src/tools/csv-to-json/csv-to-json.vue')['default']
|
||||
CTable: typeof import('./src/ui/c-table/c-table.vue')['default']
|
||||
@@ -93,6 +99,7 @@ declare module '@vue/runtime-core' {
|
||||
CTooltip: typeof import('./src/ui/c-tooltip/c-tooltip.vue')['default']
|
||||
'CTooltip.demo': typeof import('./src/ui/c-tooltip/c-tooltip.demo.vue')['default']
|
||||
CurlConverter: typeof import('./src/tools/curl-converter/curl-converter.vue')['default']
|
||||
CurlGenerator: typeof import('./src/tools/curl-generator/curl-generator.vue')['default']
|
||||
CurrencyConverter: typeof import('./src/tools/currency-converter/currency-converter.vue')['default']
|
||||
DataStorageUnitConverter: typeof import('./src/tools/data-storage-unit-converter/data-storage-unit-converter.vue')['default']
|
||||
DataTransferRateConverter: typeof import('./src/tools/data-transfer-rate-converter/data-transfer-rate-converter.vue')['default']
|
||||
@@ -104,14 +111,21 @@ declare module '@vue/runtime-core' {
|
||||
DeviceInformation: typeof import('./src/tools/device-information/device-information.vue')['default']
|
||||
DiceRoller: typeof import('./src/tools/dice-roller/dice-roller.vue')['default']
|
||||
DiffViewer: typeof import('./src/tools/json-diff/diff-viewer/diff-viewer.vue')['default']
|
||||
DkimDnsGenerator: typeof import('./src/tools/dkim-dns-generator/dkim-dns-generator.vue')['default']
|
||||
'Dmarc-Generator': typeof import('./src/tools/dmarc-dns-generator/dmarc--generator.vue')['default']
|
||||
DmarcDnsGenerator: typeof import('./src/tools/dmarc-dns-generator/dmarc-dns-generator.vue')['default']
|
||||
DmarcGenerator: typeof import('./src/tools/dmarc-dns-generator/dmarc-generator.vue')['default']
|
||||
DmarcReportAnalyzer: typeof import('./src/tools/dmarc-report-analyzer/dmarc-report-analyzer.vue')['default']
|
||||
DnsQueries: typeof import('./src/tools/dns-queries/dns-queries.vue')['default']
|
||||
Docker: typeof import('./src/tools/docker-memo/docker.md')['default']
|
||||
DockerComposeConverter: typeof import('./src/tools/docker-compose-converter/docker-compose-converter.vue')['default']
|
||||
DockerComposeToDockerRunConverter: typeof import('./src/tools/docker-compose-to-docker-run-converter/docker-compose-to-docker-run-converter.vue')['default']
|
||||
DockerComposeToKubernetes: typeof import('./src/tools/docker-compose-to-kubernetes/docker-compose-to-kubernetes.vue')['default']
|
||||
DockerComposeValidator: typeof import('./src/tools/docker-compose-validator/docker-compose-validator.vue')['default']
|
||||
DockerMemo: typeof import('./src/tools/docker-memo/docker-memo.vue')['default']
|
||||
DockerRunToDockerComposeConverter: typeof import('./src/tools/docker-run-to-docker-compose-converter/docker-run-to-docker-compose-converter.vue')['default']
|
||||
DockerRunToKubernetes: typeof import('./src/tools/docker-run-to-kubernetes/docker-run-to-kubernetes.vue')['default']
|
||||
DuplicateLineFinder: typeof import('./src/tools/duplicate-line-finder/duplicate-line-finder.vue')['default']
|
||||
DurationCalculator: typeof import('./src/tools/duration-calculator/duration-calculator.vue')['default']
|
||||
DynamicValues: typeof import('./src/tools/benchmark-builder/dynamic-values.vue')['default']
|
||||
EcdsaKeyPairGenerator: typeof import('./src/tools/ecdsa-key-pair-generator/ecdsa-key-pair-generator.vue')['default']
|
||||
@@ -126,17 +140,20 @@ declare module '@vue/runtime-core' {
|
||||
EnergyComputer: typeof import('./src/tools/energy-computer/energy-computer.vue')['default']
|
||||
EnergyConverter: typeof import('./src/tools/energy-converter/energy-converter.vue')['default']
|
||||
EtaCalculator: typeof import('./src/tools/eta-calculator/eta-calculator.vue')['default']
|
||||
ExcelToData: typeof import('./src/tools/excel-to-data/excel-to-data.vue')['default']
|
||||
ExtractTextFromHtml: typeof import('./src/tools/extract-text-from-html/extract-text-from-html.vue')['default']
|
||||
FavoriteButton: typeof import('./src/components/FavoriteButton.vue')['default']
|
||||
FileHasher: typeof import('./src/tools/file-hasher/file-hasher.vue')['default']
|
||||
FileType: typeof import('./src/tools/file-type/file-type.vue')['default']
|
||||
FinishedPopup: typeof import('./src/tools/pomodoro-timer/app/components/FinishedPopup.vue')['default']
|
||||
FirewalldGenerator: typeof import('./src/tools/firewalld-generator/firewalld-generator.vue')['default']
|
||||
FloatingPointNumberConverter: typeof import('./src/tools/floating-point-number-converter/floating-point-number-converter.vue')['default']
|
||||
FolderStructureDiagram: typeof import('./src/tools/folder-structure-diagram/folder-structure-diagram.vue')['default']
|
||||
Footer: typeof import('./src/tools/pomodoro-timer/app/components/Footer.vue')['default']
|
||||
ForceConverter: typeof import('./src/tools/force-converter/force-converter.vue')['default']
|
||||
FormatTransformer: typeof import('./src/components/FormatTransformer.vue')['default']
|
||||
FortuneWheel: typeof import('./src/tools/fortune-wheel/fortune-wheel.vue')['default']
|
||||
FstabGenerator: typeof import('./src/tools/fstab-generator/fstab-generator.vue')['default']
|
||||
GeoDistanceCalculator: typeof import('./src/tools/geo-distance-calculator/geo-distance-calculator.vue')['default']
|
||||
GitMemo: typeof import('./src/tools/git-memo/git-memo.vue')['default']
|
||||
'GitMemo.content': typeof import('./src/tools/git-memo/git-memo.content.md')['default']
|
||||
@@ -152,6 +169,7 @@ declare module '@vue/runtime-core' {
|
||||
HmacGenerator: typeof import('./src/tools/hmac-generator/hmac-generator.vue')['default']
|
||||
Home: typeof import('./src/tools/pomodoro-timer/app/views/Home.vue')['default']
|
||||
'Home.page': typeof import('./src/pages/Home.page.vue')['default']
|
||||
HtaccessGenerator: typeof import('./src/tools/htaccess-generator/htaccess-generator.vue')['default']
|
||||
HtmlCleaner: typeof import('./src/tools/html-cleaner/html-cleaner.vue')['default']
|
||||
HtmlEntities: typeof import('./src/tools/html-entities/html-entities.vue')['default']
|
||||
HtmlPrettifier: typeof import('./src/tools/html-prettifier/html-prettifier.vue')['default']
|
||||
@@ -165,9 +183,7 @@ declare module '@vue/runtime-core' {
|
||||
IcalParser: typeof import('./src/tools/ical-parser/ical-parser.vue')['default']
|
||||
IcoConverter: typeof import('./src/tools/ico-converter/ico-converter.vue')['default']
|
||||
'IconMdi:brushVariant': typeof import('~icons/mdi/brush-variant')['default']
|
||||
'IconMdi:contentCopy': typeof import('~icons/mdi/content-copy')['default']
|
||||
'IconMdi:kettleSteamOutline': typeof import('~icons/mdi/kettle-steam-outline')['default']
|
||||
IconMdiArrowRightBottom: typeof import('~icons/mdi/arrow-right-bottom')['default']
|
||||
IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
|
||||
IconMdiChevronRight: typeof import('~icons/mdi/chevron-right')['default']
|
||||
IconMdiClose: typeof import('~icons/mdi/close')['default']
|
||||
@@ -192,6 +208,7 @@ declare module '@vue/runtime-core' {
|
||||
IpGeoLocation: typeof import('./src/tools/ip-geo-location/ip-geo-location.vue')['default']
|
||||
IpIncludeExclude: typeof import('./src/tools/ip-include-exclude/ip-include-exclude.vue')['default']
|
||||
IpRangeToCidr: typeof import('./src/tools/ip-range-to-cidr/ip-range-to-cidr.vue')['default']
|
||||
IptablesGenerator: typeof import('./src/tools/iptables-generator/iptables-generator.vue')['default']
|
||||
Ipv4AddressConverter: typeof import('./src/tools/ipv4-address-converter/ipv4-address-converter.vue')['default']
|
||||
Ipv4RangeExpander: typeof import('./src/tools/ipv4-range-expander/ipv4-range-expander.vue')['default']
|
||||
Ipv4SubnetCalculator: typeof import('./src/tools/ipv4-subnet-calculator/ipv4-subnet-calculator.vue')['default']
|
||||
@@ -202,14 +219,16 @@ declare module '@vue/runtime-core' {
|
||||
Iso3166Searcher: typeof import('./src/tools/iso-3166-searcher/iso-3166-searcher.vue')['default']
|
||||
JavascriptPrettifier: typeof import('./src/tools/javascript-prettifier/javascript-prettifier.vue')['default']
|
||||
JavascriptToJson: typeof import('./src/tools/javascript-to-json/javascript-to-json.vue')['default']
|
||||
JqMemo: typeof import('./src/tools/jq-memo/jq-memo.md')['default']
|
||||
Jq: typeof import('./src/tools/jq-memo/jq.md')['default']
|
||||
JqMemo: typeof import('./src/tools/jq-memo/jq-memo.vue')['default']
|
||||
JqTester: typeof import('./src/tools/jq-tester/jq-tester.vue')['default']
|
||||
JsonDiff: typeof import('./src/tools/json-diff/json-diff.vue')['default']
|
||||
JsonEditor: typeof import('./src/tools/json-editor/json-editor.vue')['default']
|
||||
JsonEscaper: typeof import('./src/tools/json-escaper/json-escaper.vue')['default']
|
||||
JsonLinter: typeof import('./src/tools/json-linter/json-linter.vue')['default']
|
||||
JsonMinify: typeof import('./src/tools/json-minify/json-minify.vue')['default']
|
||||
JsonpathMemo: typeof import('./src/tools/jsonpath-memo/jsonpath-memo.md')['default']
|
||||
Jsonpath: typeof import('./src/tools/jsonpath-memo/jsonpath.md')['default']
|
||||
JsonpathMemo: typeof import('./src/tools/jsonpath-memo/jsonpath-memo.vue')['default']
|
||||
JsonSizeAnalyzer: typeof import('./src/tools/json-size-analyzer/json-size-analyzer.vue')['default']
|
||||
JsonSortMaster: typeof import('./src/tools/json-sort-master/json-sort-master.vue')['default']
|
||||
JsonStringConverter: typeof import('./src/tools/json-string-converter/json-string-converter.vue')['default']
|
||||
@@ -219,8 +238,11 @@ declare module '@vue/runtime-core' {
|
||||
JsonToJava: typeof import('./src/tools/json-to-java/json-to-java.vue')['default']
|
||||
JsonToJavascript: typeof import('./src/tools/json-to-javascript/json-to-javascript.vue')['default']
|
||||
JsonToObject: typeof import('./src/tools/json-to-object/json-to-object.vue')['default']
|
||||
JsonToPhp: typeof import('./src/tools/json-to-php/json-to-php.vue')['default']
|
||||
JsonToPhpArray: typeof import('./src/tools/json-to-php-array/json-to-php-array.vue')['default']
|
||||
JsonToPython: typeof import('./src/tools/json-to-python/json-to-python.vue')['default']
|
||||
JsonToSchema: typeof import('./src/tools/json-to-schema/json-to-schema.vue')['default']
|
||||
JsonToSqlDdl: typeof import('./src/tools/json-to-sql-ddl/json-to-sql-ddl.vue')['default']
|
||||
JsonToToml: typeof import('./src/tools/json-to-toml/json-to-toml.vue')['default']
|
||||
JsonToTs: typeof import('./src/tools/json-to-ts/json-to-ts.vue')['default']
|
||||
JsonToXml: typeof import('./src/tools/json-to-xml/json-to-xml.vue')['default']
|
||||
@@ -253,7 +275,7 @@ declare module '@vue/runtime-core' {
|
||||
MenuBarItem: typeof import('./src/tools/html-wysiwyg-editor/editor/menu-bar-item.vue')['default']
|
||||
MenuIconItem: typeof import('./src/components/MenuIconItem.vue')['default']
|
||||
MenuLayout: typeof import('./src/components/MenuLayout.vue')['default']
|
||||
MermaidPreviewer: typeof import('./src/tools/mermaid-previewer/mermaid-previewer.vue')['default']
|
||||
MermaidExporter: typeof import('./src/tools/mermaid-exporter/mermaid-exporter.vue')['default']
|
||||
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
|
||||
MicTester: typeof import('./src/tools/mic-tester/mic-tester.vue')['default']
|
||||
MimeConverter: typeof import('./src/tools/mime-converter/mime-converter.vue')['default']
|
||||
@@ -263,8 +285,6 @@ declare module '@vue/runtime-core' {
|
||||
MorseConverter: typeof import('./src/tools/morse-converter/morse-converter.vue')['default']
|
||||
MultiLinkDownloader: typeof import('./src/tools/multi-link-downloader/multi-link-downloader.vue')['default']
|
||||
MyIp: typeof import('./src/tools/my-ip/my-ip.vue')['default']
|
||||
NA: typeof import('naive-ui')['NA']
|
||||
NAlert: typeof import('naive-ui')['NAlert']
|
||||
NanoidGenerator: typeof import('./src/tools/nanoid-generator/nanoid-generator.vue')['default']
|
||||
NanoMemo: typeof import('./src/tools/nano-memo/nano-memo.vue')['default']
|
||||
'NanoMemo.content': typeof import('./src/tools/nano-memo/nano-memo.content.md')['default']
|
||||
@@ -272,44 +292,33 @@ declare module '@vue/runtime-core' {
|
||||
NButton: typeof import('naive-ui')['NButton']
|
||||
NCard: typeof import('naive-ui')['NCard']
|
||||
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||
NCheckboxGroup: typeof import('naive-ui')['NCheckboxGroup']
|
||||
NCode: typeof import('naive-ui')['NCode']
|
||||
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||
NColorPicker: typeof import('naive-ui')['NColorPicker']
|
||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||
NDatePicker: typeof import('naive-ui')['NDatePicker']
|
||||
NDivider: typeof import('naive-ui')['NDivider']
|
||||
NDynamicInput: typeof import('naive-ui')['NDynamicInput']
|
||||
NDynamicTags: typeof import('naive-ui')['NDynamicTags']
|
||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||
NForm: typeof import('naive-ui')['NForm']
|
||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||
NGi: typeof import('naive-ui')['NGi']
|
||||
NginxFormatter: typeof import('./src/tools/nginx-formatter/nginx-formatter.vue')['default']
|
||||
NGrid: typeof import('naive-ui')['NGrid']
|
||||
NH1: typeof import('naive-ui')['NH1']
|
||||
NH3: typeof import('naive-ui')['NH3']
|
||||
NIcon: typeof import('naive-ui')['NIcon']
|
||||
NInput: typeof import('naive-ui')['NInput']
|
||||
NInputGroup: typeof import('naive-ui')['NInputGroup']
|
||||
NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel']
|
||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||
NLayout: typeof import('naive-ui')['NLayout']
|
||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||
NMenu: typeof import('naive-ui')['NMenu']
|
||||
NModal: typeof import('naive-ui')['NModal']
|
||||
NP: typeof import('naive-ui')['NP']
|
||||
NRadio: typeof import('naive-ui')['NRadio']
|
||||
NRadioGroup: typeof import('naive-ui')['NRadioGroup']
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NSelect: typeof import('naive-ui')['NSelect']
|
||||
NSlider: typeof import('naive-ui')['NSlider']
|
||||
NSpace: typeof import('naive-ui')['NSpace']
|
||||
NSpin: typeof import('naive-ui')['NSpin']
|
||||
NStatistic: typeof import('naive-ui')['NStatistic']
|
||||
NSwitch: typeof import('naive-ui')['NSwitch']
|
||||
NTable: typeof import('naive-ui')['NTable']
|
||||
NTabPane: typeof import('naive-ui')['NTabPane']
|
||||
NTabs: typeof import('naive-ui')['NTabs']
|
||||
NText: typeof import('naive-ui')['NText']
|
||||
NTooltip: typeof import('naive-ui')['NTooltip']
|
||||
NumberInput: typeof import('./src/tools/pomodoro-timer/app/components/NumberInput.vue')['default']
|
||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||
OcrImage: typeof import('./src/tools/ocr-image/ocr-image.vue')['default']
|
||||
@@ -317,10 +326,14 @@ declare module '@vue/runtime-core' {
|
||||
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
||||
OutlookParser: typeof import('./src/tools/outlook-parser/outlook-parser.vue')['default']
|
||||
ParquetsReader: typeof import('./src/tools/parquets-reader/parquets-reader.vue')['default']
|
||||
PasetoEncryption: typeof import('./src/tools/paseto-encryption/paseto-encryption.vue')['default']
|
||||
PasetoSigning: typeof import('./src/tools/paseto-signing/paseto-signing.vue')['default']
|
||||
PassphraseGenerator: typeof import('./src/tools/passphrase-generator/passphrase-generator.vue')['default']
|
||||
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
||||
PasteAsMarkdown: typeof import('./src/tools/paste-as-markdown/paste-as-markdown.vue')['default']
|
||||
PdfConcat: typeof import('./src/tools/pdf-concat/pdf-concat.vue')['default']
|
||||
PdfEncrypt: typeof import('./src/tools/pdf-encrypt/pdf-encrypt.vue')['default']
|
||||
PdfExtract: typeof import('./src/tools/pdf-extract/pdf-extract.vue')['default']
|
||||
PdfLinearize: typeof import('./src/tools/pdf-linearize/pdf-linearize.vue')['default']
|
||||
PdfSignatureChecker: typeof import('./src/tools/pdf-signature-checker/pdf-signature-checker.vue')['default']
|
||||
PdfSignatureDetails: typeof import('./src/tools/pdf-signature-checker/components/pdf-signature-details.vue')['default']
|
||||
@@ -332,12 +345,15 @@ declare module '@vue/runtime-core' {
|
||||
PhpArrayToJson: typeof import('./src/tools/php-array-to-json/php-array-to-json.vue')['default']
|
||||
PinCodeGenerator: typeof import('./src/tools/pin-code-generator/pin-code-generator.vue')['default']
|
||||
PlayPauseBtn: typeof import('./src/tools/pomodoro-timer/app/components/PlayPauseBtn.vue')['default']
|
||||
PomodoroAbout: typeof import('./src/tools/pomodoro-timer/app/views/PomodoroAbout.vue')['default']
|
||||
PomodoroApp: typeof import('./src/tools/pomodoro-timer/app/PomodoroApp.vue')['default']
|
||||
PomodoroTimer: typeof import('./src/tools/pomodoro-timer/pomodoro-timer.vue')['default']
|
||||
PortNumbers: typeof import('./src/tools/port-numbers/port-numbers.vue')['default']
|
||||
Potrace: typeof import('./src/tools/potrace/potrace.vue')['default']
|
||||
PowerConverter: typeof import('./src/tools/power-converter/power-converter.vue')['default']
|
||||
PressureConverter: typeof import('./src/tools/pressure-converter/pressure-converter.vue')['default']
|
||||
ProgressBar: typeof import('./src/tools/pomodoro-timer/app/components/ProgressBar.vue')['default']
|
||||
PropertiesConverter: typeof import('./src/tools/properties-converter/properties-converter.vue')['default']
|
||||
PropertiesToYaml: typeof import('./src/tools/properties-to-yaml/properties-to-yaml.vue')['default']
|
||||
PunycodeConverter: typeof import('./src/tools/punycode-converter/punycode-converter.vue')['default']
|
||||
QrCodeDecoder: typeof import('./src/tools/qr-code-decoder/qr-code-decoder.vue')['default']
|
||||
@@ -349,6 +365,7 @@ declare module '@vue/runtime-core' {
|
||||
'RegexMemo.content': typeof import('./src/tools/regex-memo/regex-memo.content.md')['default']
|
||||
RegexTester: typeof import('./src/tools/regex-tester/regex-tester.vue')['default']
|
||||
RemoveExif: typeof import('./src/tools/remove-exif/remove-exif.vue')['default']
|
||||
RemPxConverter: typeof import('./src/tools/rem-px-converter/rem-px-converter.vue')['default']
|
||||
ResetDropup: typeof import('./src/tools/pomodoro-timer/app/components/ResetDropup.vue')['default']
|
||||
ResultRow: typeof import('./src/tools/ipv4-range-expander/result-row.vue')['default']
|
||||
RmbNumbers: typeof import('./src/tools/rmb-numbers/rmb-numbers.vue')['default']
|
||||
@@ -358,6 +375,8 @@ declare module '@vue/runtime-core' {
|
||||
RsaEcdsaSigning: typeof import('./src/tools/rsa-ecdsa-signing/rsa-ecdsa-signing.vue')['default']
|
||||
RsaEncryption: typeof import('./src/tools/rsa-encryption/rsa-encryption.vue')['default']
|
||||
RsaKeyPairGenerator: typeof import('./src/tools/rsa-key-pair-generator/rsa-key-pair-generator.vue')['default']
|
||||
RsyncGenerator: typeof import('./src/tools/rsync-generator/rsync-generator.vue')['default']
|
||||
RuneConverter: typeof import('./src/tools/rune-converter/rune-converter.vue')['default']
|
||||
SafelinkDecoder: typeof import('./src/tools/safelink-decoder/safelink-decoder.vue')['default']
|
||||
SensitiveDataMasker: typeof import('./src/tools/sensitive-data-masker/sensitive-data-masker.vue')['default']
|
||||
Settings: typeof import('./src/tools/pomodoro-timer/app/views/Settings.vue')['default']
|
||||
@@ -370,12 +389,15 @@ declare module '@vue/runtime-core' {
|
||||
SnowflakeIdExtractor: typeof import('./src/tools/snowflake-id-extractor/snowflake-id-extractor.vue')['default']
|
||||
SoftwareLicenceCompatibility: typeof import('./src/tools/software-licence-compatibility/software-licence-compatibility.vue')['default']
|
||||
SpanCopyable: typeof import('./src/components/SpanCopyable.vue')['default']
|
||||
SpfDnsGenerator: typeof import('./src/tools/spf-dns-generator/spf-dns-generator.vue')['default']
|
||||
SpfGenerator: typeof import('./src/tools/spf-dns-generator/spf-generator.vue')['default']
|
||||
SplashScreen: typeof import('./src/tools/pomodoro-timer/app/views/SplashScreen.vue')['default']
|
||||
SqlPrettify: typeof import('./src/tools/sql-prettify/sql-prettify.vue')['default']
|
||||
SslCertConverter: typeof import('./src/tools/ssl-cert-converter/ssl-cert-converter.vue')['default']
|
||||
StacktracePrettier: typeof import('./src/tools/stacktrace-prettier/stacktrace-prettier.vue')['default']
|
||||
StringObfuscator: typeof import('./src/tools/string-obfuscator/string-obfuscator.vue')['default']
|
||||
SvgPlaceholderGenerator: typeof import('./src/tools/svg-placeholder-generator/svg-placeholder-generator.vue')['default']
|
||||
TcpdumpGenerator: typeof import('./src/tools/tcpdump-generator/tcpdump-generator.vue')['default']
|
||||
TemperatureConverter: typeof import('./src/tools/temperature-converter/temperature-converter.vue')['default']
|
||||
TextareaCopyable: typeof import('./src/components/TextareaCopyable.vue')['default']
|
||||
TextDiff: typeof import('./src/tools/text-diff/text-diff.vue')['default']
|
||||
@@ -384,6 +406,7 @@ declare module '@vue/runtime-core' {
|
||||
TextToNatoAlphabet: typeof import('./src/tools/text-to-nato-alphabet/text-to-nato-alphabet.vue')['default']
|
||||
TextToUnicode: typeof import('./src/tools/text-to-unicode/text-to-unicode.vue')['default']
|
||||
TextToUnicodeNames: typeof import('./src/tools/text-to-unicode-names/text-to-unicode-names.vue')['default']
|
||||
TimeAlarm: typeof import('./src/tools/time-alarm/time-alarm.vue')['default']
|
||||
TimezoneConverter: typeof import('./src/tools/timezone-converter/timezone-converter.vue')['default']
|
||||
TokenDisplay: typeof import('./src/tools/otp-code-generator-and-validator/token-display.vue')['default']
|
||||
'TokenGenerator.tool': typeof import('./src/tools/token-generator/token-generator.tool.vue')['default']
|
||||
@@ -392,6 +415,7 @@ declare module '@vue/runtime-core' {
|
||||
'Tool.layout': typeof import('./src/layouts/tool.layout.vue')['default']
|
||||
ToolCard: typeof import('./src/components/ToolCard.vue')['default']
|
||||
TorrentToMagnet: typeof import('./src/tools/torrent-to-magnet/torrent-to-magnet.vue')['default']
|
||||
TraefikComposeMaker: typeof import('./src/tools/traefik-compose-maker/traefik-compose-maker.vue')['default']
|
||||
TtlCalculator: typeof import('./src/tools/ttl-calculator/ttl-calculator.vue')['default']
|
||||
UlidGenerator: typeof import('./src/tools/ulid-generator/ulid-generator.vue')['default']
|
||||
UnicodeCharactersToJavaEntities: typeof import('./src/tools/unicode-characters-to-java-entities-converter/unicode-characters-to-java-entities.vue')['default']
|
||||
@@ -417,7 +441,8 @@ declare module '@vue/runtime-core' {
|
||||
X509CertificateGenerator: typeof import('./src/tools/x509-certificate-generator/x509-certificate-generator.vue')['default']
|
||||
XmlFormatter: typeof import('./src/tools/xml-formatter/xml-formatter.vue')['default']
|
||||
XmlToJson: typeof import('./src/tools/xml-to-json/xml-to-json.vue')['default']
|
||||
XpathMemo: typeof import('./src/tools/xpath-memo/xpath-memo.md')['default']
|
||||
Xpath: typeof import('./src/tools/xpath-memo/xpath.md')['default']
|
||||
XpathMemo: typeof import('./src/tools/xpath-memo/xpath-memo.vue')['default']
|
||||
XpathTester: typeof import('./src/tools/xpath-tester/xpath-tester.vue')['default']
|
||||
XsltTester: typeof import('./src/tools/xslt-tester/xslt-tester.vue')['default']
|
||||
XVrSpamcauseDecoder: typeof import('./src/tools/x-vr-spamcause-decoder/x-vr-spamcause-decoder.vue')['default']
|
||||
|
||||
+1
-1
@@ -5,4 +5,4 @@ services:
|
||||
pull_policy: always
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 8080:80
|
||||
- 8080:8080 # Since Docker base image is now nginx-unpriviledged, docker image now listen to 8080 and no more 80.
|
||||
@@ -0,0 +1,10 @@
|
||||
services:
|
||||
it-tools:
|
||||
image: sharevb/it-tools:latest
|
||||
pull_policy: always
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./tools-filter.json:/usr/share/nginx/html/tools-filter.json
|
||||
- ./home.custom.md:/usr/share/nginx/html/home.custom.md
|
||||
ports:
|
||||
- 8080:8080
|
||||
@@ -0,0 +1,9 @@
|
||||
### Some titles
|
||||
|
||||
Text
|
||||
|
||||
```
|
||||
code
|
||||
```
|
||||
|
||||
And [link](https://sharevb-it-tools.vercel.app/)
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"excludeCategoryFilterRegex": "^(Gaming|Maths|Physics)$",
|
||||
"includeCategoryFilterRegex": "",
|
||||
"excludeToolsFilterRegex": "ai-prompt-splitter",
|
||||
"includeToolsFilterRegex": "illuminance-converter"
|
||||
}
|
||||
+485
@@ -0,0 +1,485 @@
|
||||
home:
|
||||
categories:
|
||||
newestTools: أحدث الأدوات
|
||||
favoriteTools: 'أدواتك المفضلة'
|
||||
allTools: 'جميع الأدوات'
|
||||
favoritesDndToolTip: 'اسحب وأفلت لإعادة ترتيب المفضلة'
|
||||
subtitle: 'أدوات مفيدة للمطورين'
|
||||
toggleMenu: 'تبديل القائمة'
|
||||
home: الصفحة الرئيسية
|
||||
uiLib: 'UI Lib'
|
||||
support: 'ادعم تطوير IT-Tools'
|
||||
buyMeACoffee: 'ادعمنا بشراء قهوة'
|
||||
follow:
|
||||
title: 'هل يعجبك it-tools؟'
|
||||
p1: 'أعطنا نجمة على'
|
||||
githubRepository: 'مستودع IT-Tools على GitHub'
|
||||
p2: 'أو تابعنا على'
|
||||
twitterXAccount: 'حساب IT-Tools على X'
|
||||
thankYou: 'شكرًا لك!'
|
||||
nav:
|
||||
github: 'مستودع GitHub'
|
||||
githubRepository: 'مستودع IT-Tools على GitHub'
|
||||
twitterX: 'حساب X'
|
||||
twitterXAccount: 'حساب IT-Tools على X'
|
||||
about: 'حول IT-Tools'
|
||||
aboutLabel: 'نبذة عن التطبيق'
|
||||
darkMode: 'الوضع الليلي'
|
||||
lightMode: 'الوضع النهاري'
|
||||
mode: 'تبديل الوضع الليلي/النهاري'
|
||||
about:
|
||||
content: >
|
||||
# حول IT-Tools
|
||||
|
||||
هذا الموقع المميز، الذي تم إنشاؤه مع ❤ بواسطة [كورنتين توماسيت](https://corentin.tech?utm_source=it-tools&utm_medium=about)، يجمع أدوات مفيدة للمطورين والأشخاص الذين يعملون في مجال تكنولوجيا المعلومات. إذا وجدته مفيدًا، فلا تتردد في مشاركته مع الأشخاص الذين تعتقد أنهم قد يجدونه مفيدًا أيضًا، ولا تنسى وضع إشارة مرجعية عليه في شريط الاختصارات الخاص بك!
|
||||
|
||||
IT-Tools هو مشروع مجاني ومفتوح المصدر (تحت رخصة GPL-3.0)، وسيظل كذلك، ولكن استضافة الموقع وتجديد اسم النطاق يكلفني المال. إذا كنت ترغب في دعم عملي، وتشجيعي على إضافة المزيد من الأدوات، يرجى التفكير في الدعم من خلال [رعايتي](https://www.buymeacoffee.com/cthmsst).
|
||||
|
||||
## التقنيات المستخدمة
|
||||
|
||||
تم بناء IT Tools باستخدام الاصدار الثالث من Vue.js مع مكتبةNaive UI component ويتم استضافتها ونشرها باستمرار بواسطة Vercel. يتم استخدام مكتبات خارجية مفتوحة المصدر في بعض الأدوات، يمكنك العثور على القائمة الكاملة في ملف [package.json](https://github.com/sharevb/it-tools/blob/main/package.json) في المستودع.
|
||||
|
||||
## هل عثرت على خطأ؟ هل هناك أداة غير متوفرة؟
|
||||
|
||||
إذا كنت بحاجة إلى أداة غير متوفرة حاليًا هنا، وتعتقد أنها يمكن أن تكون مفيدة، فيمكنك إرسال طلب ميزة في [قسم المشكلات](https://github.com/sharevb/it-tools/issues/new/choose) في مستودع GitHub الخاص بنا.
|
||||
|
||||
وإذا اكتشفت وجود خطأ، أو أن شيئًا ما لا يعمل كما هو متوقع، يرجى تقديم تقرير عن الخطأ في [قسم المشكلات](https://github.com/sharevb/it-tools/issues/new/choose) في مستودع GitHub الخاص بنا.
|
||||
|
||||
404:
|
||||
notFound: '404 غير موجود'
|
||||
sorry: 'عذرًا، هذه الصفحة غير موجودة'
|
||||
maybe: 'قد يكون الكاش يعمل بشكل غير متوقع، جرب تحديث الصفحة يدويًا؟'
|
||||
backHome: 'العودة للصفحة الرئيسية'
|
||||
favoriteButton:
|
||||
remove: 'إزالة من المفضلة'
|
||||
add: 'إضافة إلى المفضلة'
|
||||
toolCard:
|
||||
new: جديد
|
||||
search:
|
||||
label: بحث
|
||||
tools:
|
||||
categories:
|
||||
favorite-tools: 'أدواتك المفضلة'
|
||||
crypto: التشفير
|
||||
converter: التحويل
|
||||
web: الويب
|
||||
images and videos: 'الصور والفيديو'
|
||||
development: التطوير
|
||||
network: الشبكة
|
||||
math: الرياضيات
|
||||
measurement: القياس
|
||||
text: النصوص
|
||||
data: البيانات
|
||||
|
||||
password-strength-analyser:
|
||||
title: محلل قوة كلمة المرور
|
||||
description: اكتشف قوة كلمة المرور الخاصة بك باستخدام أداة التحليل هذه التي تعمل على جانب العميل فقط مع تقدير الوقت اللازم لكسرها.
|
||||
|
||||
chronometer:
|
||||
title: مقياس الزمن
|
||||
description: مراقبة مدة حدوث شيء ما. عبارة عن مقياس زمني بميزات أساسية.
|
||||
|
||||
token-generator:
|
||||
title: مولد الرموز
|
||||
description: توليد سلسلة عشوائية بالأحرف التي تريدها بأحرف كبيرة أو صغيرة أو أرقام أو رموز.
|
||||
|
||||
uppercase: أحرف كبيرة (ABC...)
|
||||
lowercase: أحرف صغيرة (abc...)
|
||||
numbers: أرقام (123...)
|
||||
symbols: رموز (!-;...)
|
||||
length: الطول
|
||||
tokenPlaceholder: 'الرمز...'
|
||||
copied: تم نسخ الرمز إلى الحافظة
|
||||
button:
|
||||
copy: نسخ
|
||||
refresh: تحديث
|
||||
percentage-calculator:
|
||||
title: حاسبة النسب المئوية
|
||||
description: احسب النسب المئوية بسهولة بين قيمتين أو من نسبة إلى قيمة.
|
||||
|
||||
svg-placeholder-generator:
|
||||
title: مولد صور SVG مؤقتة
|
||||
description: إنشاء صور SVG لاستخدامها كعناصر نائبة في تطبيقاتك.
|
||||
|
||||
json-to-csv:
|
||||
title: JSON إلى CSV
|
||||
description: تحويل من تنسيق JSON إلى CSV مع الكشف التلقائي للرؤوس.
|
||||
|
||||
csv-to-json:
|
||||
title: CSV إلى JSON
|
||||
description: تحويل من تنسيق CSV إلى JSON مع الكشف التلقائي للرؤوس.
|
||||
|
||||
camera-recorder:
|
||||
title: مسجل الكاميرا
|
||||
description: التقاط صورة أو تسجيل فيديو من كاميرا الويب أو كاميرا الجهاز.
|
||||
|
||||
keycode-info:
|
||||
title: معلومات رموز المفاتيح
|
||||
description: استكشاف الرمز المميز في جافا سكريبت والكود والموقع والمعدِّلات لأي مفتاح يتم الضغط عليه.
|
||||
|
||||
emoji-picker:
|
||||
title: منتقي الرموز التعبيرية
|
||||
description: نسخ ولصق الرموز التعبيرية بسهولة والحصول على الترميز الموحد (Unicode) وقيمة نقطة الرمز (code point) لكل رمز تعبيري.
|
||||
|
||||
color-converter:
|
||||
title: محول الألوان
|
||||
description: تحويل الألوان بين التنسيقات المختلفة (hex, rgb, hsl, وأسماء CSS).
|
||||
|
||||
bcrypt:
|
||||
title: Bcrypt
|
||||
description: تجزئة ومقارنة سلسلة نصية باستخدام Bcrypt .bcrypt هي دالة تجزئة لكلمات المرور تعتمد على تشفير Blowfish.
|
||||
|
||||
crontab-generator:
|
||||
title: مولد Crontab
|
||||
description: توليد تعبيرات crontab والتحقق منها والحصول على وصف سهل القراءة للجدول الزمني للـ cron.
|
||||
|
||||
http-status-codes:
|
||||
title: رموز حالة HTTP
|
||||
description: قائمة تضم كافة رموز حالة HTTP واسمائها ومعانيها.
|
||||
|
||||
sql-prettify:
|
||||
title: تجميل وتنسيق SQL
|
||||
description: تجميل وتنسيق استعلامات SQL الخاصة بك عبر الإنترنت (يدعم العديد من لهجات SQL).
|
||||
|
||||
benchmark-builder:
|
||||
title: صانع مقاييس الأداء
|
||||
description: مقارنة وقت تنفيذ المهام بسهولة باستخدام أداة صنع مقاييس الأداء البسيطة جدًا المتاحة عبر الإنترنت.
|
||||
|
||||
git-memo:
|
||||
title: ملخص أوامر Git
|
||||
description: Git هو برمجية لا مركزية لإدارة الإصدارات. باستخدام هذا الملخص، سوف يكون لديك وصول سريع إلى أوامر git الأكثر شيوعًا.
|
||||
|
||||
slugify-string:
|
||||
title: تهيئة سلسلة نصية كـ Slug
|
||||
description: جعل سلسلة نصية لرابط أو اسم ملف أو معرف آمنة.
|
||||
|
||||
encryption:
|
||||
title: تشفير / فك تشفير النص
|
||||
description: تشفير نص واضح وفك تشفير نص مشفر باستخدام خوارزميات تشفير مثل AES أو TripleDES أو Rabbit أو RC4.
|
||||
|
||||
random-port-generator:
|
||||
title: مولد منفذ عشوائي
|
||||
description: توليد أرقام منافذ عشوائية خارج نطاق المنافذ "المعروفة" (0-1023).
|
||||
|
||||
yaml-prettify:
|
||||
title: تجميل وتنسيق YAML
|
||||
description: تجميل سلسلة نصية بتسنيق YAML إلى صيغة سلسة وسهلة القراءة.
|
||||
|
||||
eta-calculator:
|
||||
title: حاسبة وقت الوصول المتوقع (ETA)
|
||||
description: حاسبة وقت الوصول المتوقع (ETA) لحساب الوقت التقريبي لانتهاء مهمة ما، على سبيل المثال، وقت انتهاء تنزيل ملف ومدته.
|
||||
|
||||
roman-numeral-converter:
|
||||
title: محول الأرقام الرومانية
|
||||
description: تحويل الأرقام الرومانية إلى أرقام والعكس.
|
||||
|
||||
hmac-generator:
|
||||
title: مولد HMAC
|
||||
description: حساب رمز مصادقة الرسائل القائم على التجزئة (HMAC) باستخدام مفتاح سري ودالة التجزئة المفضلة لديك.
|
||||
|
||||
bip39-generator:
|
||||
title: مولد عبارات مرور BIP39
|
||||
description: توليد عبارة مرور BIP39 من عبارة ذاكرة (mnemonic) موجودة أو عشوائية، أو الحصول على عبارة الذاكرة من عبارة المرور.
|
||||
|
||||
base64-file-converter:
|
||||
title: تحويل الملفات إلى Base64
|
||||
description: تحويل سلسلة نصية أو ملف أو صورة إلى تمثيل Base64 الخاص بها.
|
||||
|
||||
list-converter:
|
||||
title: محول القوائم
|
||||
description: يمكن لهذه الأداة معالجة البيانات ذات الأعمدة وتطبيق تغييرات متنوعة (التبديل وإضافة بادئة ولاحقة وعكس القائمة وترتيب القائمة وتحويل القيم إلى أحرف صغيرة وكذلك اقتطاع القيم) لكل الصفوف في القائمة.
|
||||
|
||||
base64-string-converter:
|
||||
title: مرمز Base64 للنصوص
|
||||
description: ترميز النصوص وفك ترميزها بصيغة Base64 بكل بساطة.
|
||||
|
||||
toml-to-yaml:
|
||||
title: تحويل TOML إلى YAML
|
||||
description: تحليل TOML وتحويله إلى YAML.
|
||||
|
||||
math-evaluator:
|
||||
title: محلل رياضي
|
||||
description: آلة حاسبة لتقييم التعابير الرياضية. يمكنك استخدام دوال مثل الجذر التربيعي (sqrt) وجيب التمام (cos) والجيب (sin) والقيمة المطلقة (abs) وغيرها.
|
||||
|
||||
json-to-yaml-converter:
|
||||
title: محول JSON إلى YAML
|
||||
description: تحويل JSON إلى YAML ببساطة عبر الإنترنت باستخدام أداة التحويل هذه.
|
||||
|
||||
json-to-javascript:
|
||||
title: محول JSON إلى JS
|
||||
description: تحويل JSON إلى كائن JavaScript ببساطة عبر الإنترنت باستخدام أداة التحويل هذه.
|
||||
|
||||
javascript-to-json:
|
||||
title: محول JS إلى JSON
|
||||
description: تحويل كائن JavaScript إلى JSON ببساطة عبر الإنترنت باستخدام أداة التحويل هذه.
|
||||
|
||||
url-parser:
|
||||
title: محلل عنوان URL
|
||||
description: تفكيك عنوان URL إلى أجزائه الأساسية (البروتوكول والمصدر والمعاملات والمنفذ واسم المستخدم-كلمة المرور ...)
|
||||
|
||||
iban-validator-and-parser:
|
||||
title: محلل ومدقق رقم الحساب المصرفي الدولي (IBAN)
|
||||
description: تحليل أرقام IBAN والتحقق من صحتها. تحقق مما إذا كان رقم الحساب المصرفي الدولي (IBAN) صالحًا واحصل على البلد ورقم الحساب المصرفي الأساسي (BBAN) في حال إذا كان هذا الرقم يمثل QR-IBAN ويستخدم تنسيق IBAN الملائم.
|
||||
|
||||
user-agent-parser:
|
||||
title: محلل وكيل المستخدم
|
||||
description: تحليل سلسلة نصية لوكيل المستخدم (user-agent) للتعرف على المتصفح والمحرك ونظام التشغيل ووحدة المعالجة المركزية ونوع/طراز الجهاز.
|
||||
|
||||
numeronym-generator:
|
||||
title: مولد الاختصارات الرقمية (Numeronym)
|
||||
description: الاختصار الرقمي (Numeronym) هو مصطلح يشير إلى الكلمة التي يُستخدم فيها رقم لتكوين اختصار. على سبيل المثال، "i18n" هو اختصار رقمي لكلمة "internationalization"، حيث يرمز الرقم 18 إلى عدد الحروف بين أول حرف i وآخر حرف n في الكلمة.
|
||||
|
||||
case-converter:
|
||||
title: محول حالة الأحرف
|
||||
description: تحويل حالة الأحرف في سلسلة نصية مع إمكانية الاختيار من بين صيغ متعددة
|
||||
|
||||
html-entities:
|
||||
title: تهريب كيانات HTML (HTML Entities)
|
||||
description: تهريب أو الغاء تهريب كيانات HTML ( استبدال أحرف مثل < و > و & و " و \' بصيغة HTML الخاصة بها)
|
||||
|
||||
json-prettify:
|
||||
title: تجميل وتنسيق JSON
|
||||
description: تجميل سلسلة نصية بتنسيق JSON إلى صيغة سلسة وسهلة القراءة.
|
||||
|
||||
docker-run-to-docker-compose-converter:
|
||||
title: محول أوامر Docker run إلى Docker compose
|
||||
description: تحويل أوامر "docker run" إلى ملفات docker-compose!
|
||||
|
||||
mac-address-lookup:
|
||||
title: التحقق من عنوان MAC
|
||||
description: العثور على البائع والشركة المصنعة لجهاز ما من خلال عنوان MAC الخاص به.
|
||||
|
||||
mime-types:
|
||||
title: أنواع الوسائط (MIME types)
|
||||
description: تحويل أنواع الوسائط (MIME types) إلى امتدادات ملفات وبالعكس.
|
||||
|
||||
mic-tester:
|
||||
title: أداة اختبار الميكروفون
|
||||
description: تسجيل الصوت من الميكروفون ومن ثم تشغيله مع عرض مرئي له و إضافة ثانية واحدة من التأخير
|
||||
start-button-text: بدء تشغيل الميكروفون
|
||||
stop-button-text: إيقاف تشغيل الميكروفون
|
||||
|
||||
toml-to-json:
|
||||
title: TOML إلى JSON
|
||||
description: تحليل TOML وتحويله إلى JSON.
|
||||
|
||||
lorem-ipsum-generator:
|
||||
title: مولد نصوص Lorem ipsum
|
||||
description: Lorem ipsum هو عبارة عن نص نائب يستخدم عادةً لتوضيح الشكل المرئي لمستند أو محرف دون الاعتماد على محتوى ذو معنى.
|
||||
|
||||
qrcode-generator:
|
||||
title: مولد رمز الاستجابة السريعة (QR Code)
|
||||
description: إنشاء وتنزيل رمز الاستجابة السريعة (QR Code) لعنوان URL (أو لمجرد نص عادي)، وتخصيص ألوان الخلفية والنمط.
|
||||
|
||||
wifi-qrcode-generator:
|
||||
title: مولد رمز الاستجابة السريعة (QR Code) للشبكة اللاسلكية
|
||||
description: إنشاء وتنزيل رموز الاستجابة السريعة (QR Code) للاتصال السريع بالشبكات اللاسلكية.
|
||||
|
||||
qr-contact-info-generator:
|
||||
title: مولد رمز الاستجابة السريعة (QR Code) لمعلومات الاتصال
|
||||
description: إنشاء وتنزيل رموز الاستجابة السريعة (QR Code) لمعلومات الاتصال (vCard)، وتخصيص ألوان الخلفية والنمط.
|
||||
|
||||
xml-formatter:
|
||||
title: منسق XML
|
||||
description: تجميل سلسلة نصية بتنسيق XML إلى هيئة سهلة القراءة من قبل البشر.
|
||||
|
||||
temperature-converter:
|
||||
title: محول درجات الحرارة
|
||||
description: تحويلات لدرجات الحرارة بين وحدات كلفن ومئوية وفهرنهايت ورانكين وديليسل ونيوتن وريومور ورومر.
|
||||
|
||||
chmod-calculator:
|
||||
title: حاسبة أمر Chmod
|
||||
description: حساب أذونات وأوامر chmod الخاصة بك باستخدام هذه الآلة الحاسبة المتوفرة على الويب.
|
||||
|
||||
rsa-key-pair-generator:
|
||||
title: مولد زوج مفاتيح RSA
|
||||
description: توليد زوج مفاتيح RSA عشوائي جديد بصيغة PEM (خاص/عام)
|
||||
|
||||
html-wysiwyg-editor:
|
||||
title: محرر HTML مرئي
|
||||
description: محرر ويب لصفحات HTML (ما تراه هو ما تحصل عليه WYSIWYG). يتيح لك هذ المحرر الحصول على الكود المصدري للمحتوى على الفور.
|
||||
|
||||
yaml-to-toml:
|
||||
title: YAML إلى TOML
|
||||
description: تحليل YAML وتحويله إلى TOML.
|
||||
|
||||
mac-address-generator:
|
||||
title: مولد عناوين MAC
|
||||
description: قم بإدخال الكمية والبادئة. سيتم إنشاء عناوين MAC بالحالة التي اخترتها (أحرف كبيرة أو صغيرة)
|
||||
|
||||
json-diff:
|
||||
title: مقارنة JSON
|
||||
description: مقارنة كائنين بتنسيق JSON وعرض الاختلافات بينهما.
|
||||
|
||||
jwt-parser:
|
||||
title: محلل JWT
|
||||
description: تحليل وفك تشفير رمز JSON Web Token (الذي يُعرف اختصارًا بـ JWT) ثم عرض محتواه.
|
||||
|
||||
date-converter:
|
||||
title: محول الوقت والتاريخ
|
||||
description: تحويل التاريخ والوقت إلى صيغ متعددة
|
||||
|
||||
phone-parser-and-formatter:
|
||||
title: محلل ومنسق رقم الهاتف
|
||||
description: تحليل أرقام الهواتف وتنسيقها والتحقق من صحتها. الحصول على معلومات حول رقم الهاتف، مثل رمز البلد والنوع وما إلى ذلك. وبالإضافة إلى ذلك، إنشاء رابط مباشر لإرسالة رسالة عبر WhatsApp أو رسالة نصية قصيرة (SMS)
|
||||
|
||||
ipv4-subnet-calculator:
|
||||
title: حاسبة الشبكات الفرعية لـ IPv4
|
||||
description: تحليل كتل ترميز CIDR لبروتوكول IPv4 للحصول على كافة المعلومات التي تحتاجها حول شبكتك الفرعية.
|
||||
|
||||
og-meta-generator:
|
||||
title: مولد علامات Open Graph
|
||||
description: توليد علامات HTML الوصفية (meta tags) الخاصة بـ open-graph ومواقع التواصل الاجتماعي لموقعك على الويب.
|
||||
|
||||
ipv6-ula-generator:
|
||||
title: مولد عناوين IPv6 ULA
|
||||
description: توليد عناوين IP محلية خاصة بك وغير قابلة للتوجيه للشبكة الخاصة بك وفقًا لـ RFC4193.
|
||||
|
||||
hash-text:
|
||||
title: تجزئة النص
|
||||
description: 'تجزئة سلسلة نصية باستخدام الدالة التي تريدها : MD5 أو SHA1 أو SHA256 أو SHA256 أو SHA224 أو SHA512 أو SHA384 أو SHA3 أو RIPEMD160'
|
||||
|
||||
json-to-toml:
|
||||
title: JSON إلى TOML
|
||||
description: تحليل JSON وتحويله إلى TOML.
|
||||
|
||||
json-to-ts:
|
||||
title: JSON إلى TS
|
||||
description: تحويل من تنسيق JSON إلى نوع بيانات TS.
|
||||
|
||||
device-information:
|
||||
title: معلومات الجهاز
|
||||
description: الحصول على معلومات حول جهازك الحالي (حجم الشاشة ونسبة البكسل ووكيل المستخدم ...)
|
||||
|
||||
pdf-signature-checker:
|
||||
title: مدقق تواقيع PDF
|
||||
description: التحقق من تواقيع ملف PDF. يحتوي ملف PDF الموقع على توقيع واحد أو أكثر، والتي يمكن استخدامها لتحديد ما إذا كان قد تم إجراء تغييرات على محتويات الملف منذ توقعيه.
|
||||
|
||||
json-sort-master:
|
||||
title: أداة ترتيب JSON
|
||||
description: ترتيب JSON حسب القيم أو المفاتيح .
|
||||
|
||||
json-minify:
|
||||
title: مصغر JSON
|
||||
description: تصغير وضغط بيانات JSON من خلال إزالة المسافات البيضاء غير الضرورية.
|
||||
|
||||
json-string-converter:
|
||||
title: أداة التحويل الى نص بتنسيق JSON
|
||||
description: تحويل النص العادي أو كائنات JavaScript إلى سلسلة نصية بتنسيق JSON وبالعكس.
|
||||
|
||||
ulid-generator:
|
||||
title: مولد ULID
|
||||
description: توليد معرف فريد عالميًا قابل للفرز المعجمي (ULID) بشكل عشوائي.
|
||||
|
||||
string-obfuscator:
|
||||
title: تعتيم سلسلة نصية
|
||||
description: تعتيم سلسلة نصية (مثل سر ما أو رقم الحساب المصرفي الدولي (IBAN) أو رمز معين) لجعلها قابلة للمشاركة والتعرف عليها دون الكشف عن محتواها.
|
||||
|
||||
base-converter:
|
||||
title: محول الأنظمة العددية
|
||||
description: تحويل رقم بين أنظمة عد مختلفة (عشري وسادس عشري وثنائي وثماني وbase64 ...)
|
||||
|
||||
floating-point-converter:
|
||||
title: محول أرقام الفاصلة العائمة (float number)
|
||||
description: تحويل رقم عشري إلى رقم فاصلة عائمة بنظام IEEE 754 الثنائي وبالعكس.
|
||||
|
||||
yaml-to-json-converter:
|
||||
title: محول YAML إلى JSON
|
||||
description: تحويل YAML إلى JSON ببساطة عبر الإنترنت باستخدام أداة التحويل هذه.
|
||||
|
||||
uuid-generator:
|
||||
title: مولد معرفات UUIDs
|
||||
description: المعرف الفريد عالميًا (UUID) هو رقم يتكون من 128 بت يستخدم لتحديد المعلومات في أنظمة الحاسوب. عدد معرفات UUID الممكنة هي 16^32، أي 2^128 وهو ما يساوي 3.4x10^38 (وهو عدد كبير!).
|
||||
|
||||
nanoid-generator:
|
||||
title: مولد معرفات NanoIDs
|
||||
description: إنشاء معرفات عشوائية وفريدة وملائمة لعناوين URL لتطبيقاتك
|
||||
uppercase: أحرف كبيرة
|
||||
lowercase: أحرف صغيرة
|
||||
numbers: أرقام
|
||||
symbols: رموز
|
||||
excludeLookalikes: استبعاد المتشابهة
|
||||
length: الطول
|
||||
quantity: الكمية
|
||||
copied: تم نسخ معرف NanoID إلى الحافظة
|
||||
button:
|
||||
copy: نسخ
|
||||
refresh: تحديث
|
||||
|
||||
|
||||
ipv4-address-converter:
|
||||
title: محول عناوين IPv4
|
||||
description: تحويل عنوان IP إلى رقم عشري أو ثنائي أو سداسي عشري أو حتى صيغة IPv6 له.
|
||||
|
||||
text-statistics:
|
||||
title: إحصائيات النص
|
||||
description: الحصول على معلومات حول نص معين من حيث عدد الأحرف وعدد الكلمات وحجمه بالبايت ...
|
||||
|
||||
text-to-nato-alphabet:
|
||||
title: نص إلى أبجدية الناتو
|
||||
description: تحويل نص إلى أبجدية الناتو الصوتية للإرسال الشفهي.
|
||||
|
||||
basic-auth-generator:
|
||||
title: مولد مصادقة أساسية
|
||||
description: توليد ترويسة مصادقة أساسية مرمزة باستخدام base64 من اسم مستخدم وكلمة مرور.
|
||||
|
||||
text-to-unicode:
|
||||
title: نص إلى الترميز الموحد (Unicode)
|
||||
description: تحليل نص وتحويله إلى رمز موحد (Unicode) وبالعكس
|
||||
|
||||
ipv4-range-expander:
|
||||
title: موسع نطاقات IPv4
|
||||
description: احسب CIDR والمساحة المتاحة من نطاق عناوين IPv4.
|
||||
|
||||
text-diff:
|
||||
title: مقارنة النصوص
|
||||
description: مقارنة بين نصين اثنين والاطلاع على الاختلافات بينهما.
|
||||
|
||||
otp-generator:
|
||||
title: مولد رمز كلمة مرور لمرة واحدة (OTP)
|
||||
description: توليد والتحقق من صحة رمز كلمة مرور لمرة واحدة (OTP) المعتمد على الوقت أو الحدث لإجراء مصادقة متعددة العوامل.
|
||||
|
||||
url-encoder:
|
||||
title: ترميز/فك ترميز السلاسل النصية بصيغة ترميز عنوان URL
|
||||
description: ترميز نص إلى صيغة ترميز عنوان URL (يُعرف أيضًا باسم "ترميز النسبة المئوية")، أو فك ترميز النص المرمز.
|
||||
|
||||
text-to-binary:
|
||||
title: تحويل نص إلى تمثيله الثنائي في UTF-8
|
||||
description: تحويل النص إلى تمثيله الثنائي في UTF-8 وبالعكس.
|
||||
|
||||
image-resizer:
|
||||
title: أداة تغيير حجم الصورة
|
||||
description: تغيير العرض والارتفاع لملف صورة مع عرض معاينة للصورة الجديدة وتنزيلها بالصيغة المرغوبة (.jpg أو .jpeg أو .png أو .bmp أو .ico أو .svg)
|
||||
|
||||
json-to-object:
|
||||
title: JSON إلى object
|
||||
description: تحليل JSON وتحويله إلى كائن.
|
||||
|
||||
multi-link-downloader:
|
||||
title: أداة تنزيل الروابط المتعددة
|
||||
description: التنزيل بشكل غير متزامن من روابط متعددة في ملف مضغوط أو التنزيل من رابط واحد مباشرةً. (يتطلب اتصالاً بالإنترنت)
|
||||
|
||||
unicode-to-java-entities:
|
||||
title: محول أحرف Unicode إلى كيانات جافا
|
||||
description: تحويل أحرف Unicode إلى كيانات جافا وبالعكس
|
||||
|
||||
sip-auth:
|
||||
password: كلمة مرور SIP
|
||||
password-tips: أدخل كلمة المرور...
|
||||
message: نص رسالة SIP
|
||||
message-tips: الصق نص رسالة SIP هنا...
|
||||
result: النتيجة
|
||||
sucess: نجاح
|
||||
failure: فشل
|
||||
|
||||
uuid-converter:
|
||||
title: محول UUID
|
||||
description: تحويل UUID مع واصلة أو بدون واصلة إلى ترميزات SQL الشائعة الأخرى وبالعكس.
|
||||
|
||||
uuid: معرف UUID
|
||||
uuidhexupper: تمثيل في النظام السادس عشري (أحرف كبيرة)
|
||||
uuidhexlower: تمثيل في النظام السادس عشري (أحرف صغيرة)
|
||||
uuidversion: نسخة RFC
|
||||
input:
|
||||
label: النص المدخل
|
||||
placeholder: معرف UUID الخاص بك مع أو بدون واصلة
|
||||
+1
-1
@@ -453,7 +453,7 @@ tools:
|
||||
otp-generator:
|
||||
title: OTP-Code-Generator
|
||||
description: >-
|
||||
Generiere und validiere zeitbasierte OTPs (Einmalpasswörter) für
|
||||
Generiere und validiere zeitbasierte und ereignisgesteuertes OTPs (Einmalpasswörter) für
|
||||
Multi-Faktor-Authentifizierung.
|
||||
url-encoder:
|
||||
title: Kodieren/Decodieren von URL-formatierten Zeichenfolgen
|
||||
|
||||
+1
-1
@@ -437,7 +437,7 @@ tools:
|
||||
|
||||
otp-generator:
|
||||
title: OTP code generator
|
||||
description: Generate and validate time-based OTP (one time password) for multi-factor authentication.
|
||||
description: Generate and validate time-based and event-based OTP (one time password) for multi-factor authentication.
|
||||
|
||||
url-encoder:
|
||||
title: Encode/decode URL-formatted strings
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ home:
|
||||
favoriteTools: 'Suas ferramentas favoritas'
|
||||
allTools: 'Todas as ferramentas'
|
||||
favoritesDndToolTip: 'Arraste e solte para reordenar favoritos'
|
||||
subtitle: 'Ferraentas úteis para desenvolvedores'
|
||||
subtitle: 'Ferramentas úteis para desenvolvedores'
|
||||
toggleMenu: 'Menu'
|
||||
home: 'Início'
|
||||
uiLib: 'Biblioteca de UI'
|
||||
|
||||
+393
@@ -0,0 +1,393 @@
|
||||
home:
|
||||
categories:
|
||||
newestTools: Новейшие инструменты
|
||||
favoriteTools: 'Ваши любимые инструменты'
|
||||
allTools: 'Все инструменты'
|
||||
favoritesDndToolTip: 'Перетащите и отпустите, чтобы изменить порядок избранного'
|
||||
subtitle: 'Удобные инструменты для разработчиков'
|
||||
toggleMenu: 'Переключение меню'
|
||||
home: Главная
|
||||
uiLib: 'UI Библиотека'
|
||||
support: 'Поддержка разработки IT Tools'
|
||||
buyMeACoffee: 'Купи мне кофе'
|
||||
follow:
|
||||
title: 'Вам нравятся инструменты IT?'
|
||||
p1: 'Добавьте нам звезду на'
|
||||
githubRepository: 'GitHub-репозиторий IT-Tools'
|
||||
p2: 'или следите за нами на'
|
||||
twitterXAccount: 'X-аккаунт IT-Tools'
|
||||
thankYou: 'Спасибо!'
|
||||
nav:
|
||||
github: 'GitHub-репозиторий'
|
||||
githubRepository: 'GitHub-репозиторий IT-Tools'
|
||||
twitterX: 'X'
|
||||
twitterXAccount: 'X-аккаунт IT-Tools'
|
||||
about: 'О IT-Tools'
|
||||
aboutLabel: 'О нас'
|
||||
darkMode: 'Темный режим'
|
||||
lightMode: 'Светлый режим'
|
||||
mode: 'Переключение темного/светлого режима'
|
||||
about:
|
||||
content: >
|
||||
# О IT-Tools
|
||||
|
||||
Этот замечательный вебсайт, созданный с ❤ [Corentin Thomasset](https://corentin.tech?utm_source=it-tools&utm_medium=about), агрегирует полезные инструменты для разработчиков и людей, которые работают в сфере IT. Если вам это полезно, пожалуйста, поделитесь этим с людьми, которые, по вашему мнению, также могут найти его полезным, и не забудьте добавить его в закладки на вашей панели быстрого доступа!
|
||||
|
||||
IT Tools является открытым программным обеспечением (под лицензией GPL-3.0) и бесплатным, и всегда будет таким, но мне стоит денег для хостинга и продления доменного имени. Если вы хотите поддержать мою работу и помочь мне в добавлении новых инструментов, рассмотрите возможность поддержки, [спонсируя меня](https://www.buymeacoffee.com/cthmsst).
|
||||
|
||||
## Технологии
|
||||
|
||||
IT Tools выполнен на Vue.js (Vue 3) с использованием библиотеки компонентов Naive UI и развертывается с помощью Vercel. В некоторых инструментах используются сторонние открытые библиотеки, полный список которых вы можете найти в файле [package.json](https://github.com/CorentinTh/it-tools/blob/main/package.json) репозитория.
|
||||
|
||||
## Нашли баг? Отсутствует инструмент?
|
||||
|
||||
Если вам нужен инструмент, которого пока нет здесь, и вы считаете, что он может быть полезным, вы можете подать запрос на добавление функции в [разделе проблем](https://github.com/CorentinTh/it-tools/issues/new/choose) в репозитории GitHub.
|
||||
|
||||
А если вы нашли баг или что-то не работает, как ожидалось, пожалуйста, подайте отчет о баге в [разделе проблем](https://github.com/CorentinTh/it-tools/issues/new/choose) в репозитории GitHub.
|
||||
|
||||
404:
|
||||
notFound: '404 Страница не найдена'
|
||||
sorry: 'Извините, эта страница, похоже, не существует'
|
||||
maybe: 'Возможно, кэш играет шутки, попробуйте принудительно обновить страницу?'
|
||||
backHome: 'Вернуться на главную'
|
||||
favoriteButton:
|
||||
remove: 'Удалить из избранного'
|
||||
add: 'Добавить в избранное'
|
||||
toolCard:
|
||||
new: Новый
|
||||
search:
|
||||
label: Поиск
|
||||
tools:
|
||||
categories:
|
||||
favorite-tools: 'Ваши любимые инструменты'
|
||||
crypto: Крипта
|
||||
converter: Конвертер
|
||||
web: Веб
|
||||
images and videos: 'Изображения и видео'
|
||||
development: Разработка
|
||||
network: Сеть
|
||||
math: Математика
|
||||
measurement: Измерение
|
||||
text: Текст
|
||||
data: Данные
|
||||
password-strength-analyser:
|
||||
title: Анализатор надежности пароля
|
||||
description: Узнайте о надежности своего пароля с помощью этого анализатора надежности пароля, работающего на стороне клиента, и инструмента оценки времени взлома.
|
||||
|
||||
chronometer:
|
||||
title: Хронометр
|
||||
description: Следите за продолжительностью времени. В основном это хронометр с простыми функциями хронометра.
|
||||
|
||||
token-generator:
|
||||
title: Генератор токенов
|
||||
description: Сгенерируйте случайную строку с нужными вам символами, заглавными и строчными буквами, цифрами и/или символами.
|
||||
|
||||
uppercase: Заглавные буквы (ABC...)
|
||||
lowercase: Строчные буквы (abc...)
|
||||
numbers: Числа (123...)
|
||||
symbols: Символы (!-;...)
|
||||
length: Длина
|
||||
tokenPlaceholder: 'Токен...'
|
||||
copied: Токен скопирован в буфер обмена
|
||||
button:
|
||||
copy: Копировать
|
||||
refresh: Обновить
|
||||
percentage-calculator:
|
||||
title: Калькулятор процентов
|
||||
description: Легко вычисляйте проценты от одного значения до другого значения или от процента до значения.
|
||||
|
||||
svg-placeholder-generator:
|
||||
title: Генератор SVG placeholder
|
||||
description: Создавайте изображения svg для использования в ваших приложениях как placeholder.
|
||||
|
||||
json-to-csv:
|
||||
title: JSON в CSV
|
||||
description: Преобразуйте JSON в CSV с автоматическим обнаружением заголовков.
|
||||
|
||||
camera-recorder:
|
||||
title: Запись с камеры
|
||||
description: Сделайте фото или запишите видео с веб-камеры или камеры.
|
||||
|
||||
keycode-info:
|
||||
title: Информация о коде кнопки
|
||||
description: Узнайте код кнопки, местоположение и модификаторы любой нажатой кнопки.
|
||||
|
||||
emoji-picker:
|
||||
title: Выбор эмодзи
|
||||
description: Легко копируйте и вставляйте эмодзи и получайте значения юникода и кодовых точек каждого эмодзи.
|
||||
|
||||
color-converter:
|
||||
title: Конвертер цветов
|
||||
description: Конвертируйте цвета между различными форматами (hex, rgb, hsl и css название)
|
||||
|
||||
bcrypt:
|
||||
title: Bcrypt
|
||||
description: Хешируйте и сравнивайте текстовые строки с помощью bcrypt. Bcrypt - это функция хеширования паролей, основанная на шифре Blowfish.
|
||||
|
||||
crontab-generator:
|
||||
title: Генератор Crontab
|
||||
description: Проверяйте и генерируйте crontab и получайте описание расписания cron в удобном для чтения формате.
|
||||
|
||||
http-status-codes:
|
||||
title: Коды состояния HTTP
|
||||
description: Список всех кодов состояния HTTP, их названия и значения.
|
||||
|
||||
sql-prettify:
|
||||
title: Форматирование SQL
|
||||
description: Форматируйте и украшайте свои SQL-запросы онлайн (поддерживаются различные диалекты SQL).
|
||||
|
||||
benchmark-builder:
|
||||
title: Конструктор бенчмарков
|
||||
description: Легко сравнивайте время выполнения задач с помощью этого очень простого онлайн-конструктора бенчмарков.
|
||||
|
||||
git-memo:
|
||||
title: Шпаргалка Git
|
||||
description: Git - это децентрализованное программное обеспечение для управления версиями. С помощью этой шпаргалки вы получите быстрый доступ к наиболее распространенным командам git.
|
||||
|
||||
slugify-string:
|
||||
title: Преобразование строки (slug)
|
||||
description: Сделайте строку безопасной для URL, имен файлов и идентификаторов.
|
||||
|
||||
encryption:
|
||||
title: Шифрование / дешифрование текста
|
||||
description: Шифруйте открытый текст и дешифруйте зашифрованный текст с помощью криптоалгоритмов, таких как AES, TripleDES, Rabbit или RC4.
|
||||
|
||||
random-port-generator:
|
||||
title: Генератор случайных портов
|
||||
description: Генерируйте случайные номера портов вне диапазона "известных" портов (0-1023).
|
||||
|
||||
yaml-prettify:
|
||||
title: Форматирование YAML
|
||||
description: Преобразуйте свою YAML-строку в удобный для чтения формат.
|
||||
|
||||
eta-calculator:
|
||||
title: Калькулятор ETA
|
||||
description: Калькулятор ETA (Estimated Time of Arrival) для определения приблизительного времени завершения задачи, например, времени завершения и продолжительности загрузки файла.
|
||||
|
||||
roman-numeral-converter:
|
||||
title: Конвертер римских цифр
|
||||
description: Конвертируйте римские цифры в числа и числа в римские цифры.
|
||||
|
||||
hmac-generator:
|
||||
title: Генератор Hmac
|
||||
description: Вычисляет код аутентификации сообщения на основе хеша (HMAC) с помощью секретного ключа и вашей любимой хеш-функции.
|
||||
|
||||
bip39-generator:
|
||||
title: Генератор BIP39 паролей
|
||||
description: Генерируйте BIP39 пароль из существующей или случайной мнемоники, или получайте мнемонику из пароля.
|
||||
|
||||
base64-file-converter:
|
||||
title: Конвертер файлов Base64
|
||||
description: Конвертируйте строку, файл или изображение в его представление base64.
|
||||
|
||||
list-converter:
|
||||
title: Конвертер списков
|
||||
description: Этот инструмент может обрабатывать данные на основе столбцов и применять различные изменения (транспонирование, добавление префикса и суффикса, реверс списка, сортировка списка, уменьшение значений, обрезка значений) к каждой строке.
|
||||
|
||||
base64-string-converter:
|
||||
title: Конвертер строк base64
|
||||
description: Просто кодируйте и декодируйте строки в их представление base64.
|
||||
|
||||
toml-to-yaml:
|
||||
title: TOML в YAML
|
||||
description: Парсинг и конвертация TOML в YAML.
|
||||
|
||||
math-evaluator:
|
||||
title: Оцениватель математических выражений
|
||||
description: Калькулятор для оценки математических выражений. Вы можете использовать функции, такие как sqrt, cos, sin, abs и т.д.
|
||||
|
||||
json-to-yaml-converter:
|
||||
title: Конвертер JSON в YAML
|
||||
description: Просто конвертируйте JSON в YAML с помощью этого онлайн-конвертера.
|
||||
|
||||
url-parser:
|
||||
title: Парсер URL
|
||||
description: Разбирайте URL на его отдельные составные части (протокол, происхождение, параметры, порт, имя пользователя-пароль и т.д.).
|
||||
|
||||
iban-validator-and-parser:
|
||||
title: Валидатор и парсер IBAN
|
||||
description: Проверяйте и разбирайте номера IBAN. Проверяйте, является ли IBAN действительным, и получайте страну, BBAN, является ли это QR-IBAN и дружественный формат IBAN.
|
||||
|
||||
user-agent-parser:
|
||||
title: Парсер User-agent
|
||||
description: Определяйте и разбирайте браузер, движок, ОС, ЦП и тип/модель устройства из строки user-agent.
|
||||
|
||||
numeronym-generator:
|
||||
title: Генератор нумеронимов
|
||||
description: Нумероним - это слово, где для образования аббревиатуры используется число. Например, "i18n" - это нумероним слова "internationalization", где 18 означает количество букв между первой i и последней n в слове.
|
||||
|
||||
case-converter:
|
||||
title: Конвертер регистра
|
||||
description: Преобразуйте регистр строки и выбирайте между различными форматами.
|
||||
|
||||
html-entities:
|
||||
title: Экранирование HTML сущностей
|
||||
description: Экранируйте или разэкранируйте HTML сущности (заменяйте символы, такие как <,>, &, " и \' на их HTML версии).
|
||||
|
||||
json-prettify:
|
||||
title: Форматирование JSON
|
||||
description: Преобразуйте свою JSON-строку в удобный для чтения формат.
|
||||
|
||||
docker-run-to-docker-compose-converter:
|
||||
title: Конвертер Docker run в Docker compose
|
||||
description: Преобразуйте команды "docker run" в файлы docker-compose!
|
||||
|
||||
mac-address-lookup:
|
||||
title: Поиск MAC-адреса
|
||||
description: Найдите поставщика и производителя устройства по его MAC-адресу.
|
||||
|
||||
mime-types:
|
||||
title: MIME типы
|
||||
description: Конвертируйте MIME типы в расширения файлов и наоборот.
|
||||
|
||||
toml-to-json:
|
||||
title: TOML в JSON
|
||||
description: Парсинг и конвертация TOML в JSON.
|
||||
|
||||
lorem-ipsum-generator:
|
||||
title: Генератор Lorem ipsum
|
||||
description: Lorem ipsum - это текст-заполнитель, который обычно используется для демонстрации визуальной формы документа или шрифта без использования содержательного контента.
|
||||
|
||||
qrcode-generator:
|
||||
title: Генератор QR-кодов
|
||||
description: Генерируйте и загружайте QR-код для URL (или простого текста) и настраивайте цвета фона и переднего плана.
|
||||
|
||||
wifi-qrcode-generator:
|
||||
title: Генератор QR-кодов для WiFi
|
||||
description: Генерируйте и загружайте QR-коды для быстрого подключения к WiFi сетям.
|
||||
|
||||
xml-formatter:
|
||||
title: Форматирование XML
|
||||
description: Преобразуйте свою XML-строку в удобный для чтения формат.
|
||||
|
||||
temperature-converter:
|
||||
title: Конвертер температуры
|
||||
description: Конвертация температуры в градусах для Кельвина, Цельсия, Фаренгейта, Ранкина, Делиля, Ньютона, Реомюра и Рёмера.
|
||||
|
||||
chmod-calculator:
|
||||
title: Калькулятор chmod
|
||||
description: Вычисляйте свои разрешения и команды chmod с помощью этого онлайн-калькулятора chmod.
|
||||
|
||||
rsa-key-pair-generator:
|
||||
title: Генератор RSA ключей
|
||||
description: Генерируйте новую случайную пару приватного и публичного сертификатов RSA в формате pem.
|
||||
|
||||
html-wysiwyg-editor:
|
||||
title: HTML WYSIWYG редактор
|
||||
description: Онлайн, многофункциональный WYSIWYG HTML редактор, который генерирует исходный HTML-код контента немедленно.
|
||||
|
||||
yaml-to-toml:
|
||||
title: YAML в TOML
|
||||
description: Парсинг и конвертация YAML в TOML.
|
||||
|
||||
mac-address-generator:
|
||||
title: Генератор MAC-адресов
|
||||
description: Введите количество и префикс. MAC-адреса будут сгенерированы в выбранном вами регистре (верхний или нижний).
|
||||
|
||||
json-diff:
|
||||
title: Сравнение JSON
|
||||
description: Сравнивайте два JSON объекта и получайте различия между ними.
|
||||
|
||||
jwt-parser:
|
||||
title: Парсер JWT
|
||||
description: Парсинг и декодирование вашего JSON Web Token (jwt) и отображение его содержимого.
|
||||
|
||||
date-converter:
|
||||
title: Конвертер даты и времени
|
||||
description: Конвертируйте дату и время в различные форматы.
|
||||
|
||||
phone-parser-and-formatter:
|
||||
title: Парсер и форматировщик телефонов
|
||||
description: Парсинг, валидация и форматирование телефонных номеров. Получайте информацию о телефонном номере, например, код страны, тип и т.д.
|
||||
|
||||
ipv4-subnet-calculator:
|
||||
title: Калькулятор подсетей IPv4
|
||||
description: Парсинг ваших блоков CIDR IPv4 и получение всей необходимой информации о вашей подсети.
|
||||
|
||||
og-meta-generator:
|
||||
title: Генератор мета-тегов Open Graph
|
||||
description: Генерируйте HTML мета-теги Open Graph и социальных сетей для вашего вебсайта.
|
||||
|
||||
ipv6-ula-generator:
|
||||
title: Генератор IPv6 ULA
|
||||
description: Генерируйте свои собственные локальные, не маршрутизируемые IP-адреса для вашей сети в соответствии с RFC4193.
|
||||
|
||||
hash-text:
|
||||
title: Хеширование текста
|
||||
description: 'Хешируйте текстовую строку с помощью нужной вам функции: MD5, SHA1, SHA256, SHA224, SHA512, SHA384, SHA3 или RIPEMD160'
|
||||
|
||||
json-to-toml:
|
||||
title: JSON в TOML
|
||||
description: Парсинг и конвертация JSON в TOML.
|
||||
|
||||
device-information:
|
||||
title: Информация о устройстве
|
||||
description: Получайте информацию о вашем текущем устройстве (размер экрана, пиксельное соотношение, user agent и т.д.).
|
||||
|
||||
pdf-signature-checker:
|
||||
title: Проверка подписи PDF
|
||||
description: Проверяйте подписи PDF файла. Подписанный PDF файл содержит одну или более подписей, которые могут быть использованы для определения, были ли изменены содержимое файла после его подписания.
|
||||
|
||||
json-minify:
|
||||
title: Минимизация JSON
|
||||
description: Минимизируйте и сжимайте ваш JSON, удаляя ненужные пробелы.
|
||||
|
||||
ulid-generator:
|
||||
title: Генератор ULID
|
||||
description: Генерируйте случайный универсально уникальный лексикографически сортируемый идентификатор (ULID).
|
||||
|
||||
string-obfuscator:
|
||||
title: Обфускация строки
|
||||
description: Обфусцируйте строку (например, секрет, IBAN или токен), чтобы сделать его доступным для совместного использования и идентификации без раскрытия его содержимого.
|
||||
|
||||
base-converter:
|
||||
title: Конвертер числовых систем
|
||||
description: Конвертируйте число между различными системами счисления (десятичная, шестнадцатеричная, двоичная, восьмеричная, base64 и т.д.).
|
||||
|
||||
yaml-to-json-converter:
|
||||
title: Конвертер YAML в JSON
|
||||
description: Просто конвертируйте YAML в JSON с помощью этого онлайн-конвертера.
|
||||
|
||||
uuid-generator:
|
||||
title: Генератор UUID
|
||||
description: Универсально уникальный идентификатор (UUID) - это 128-битное число, которое используется для идентификации информации в компьютерных системах. Количество возможных UUID составляет 16^32, что равно 2^128 или примерно 3.4x10^38 (что очень много!).
|
||||
|
||||
ipv4-address-converter:
|
||||
title: Конвертер IPv4 адресов
|
||||
description: Конвертируйте IP-адрес в десятичное, двоичное, шестнадцатеричное или даже IPv6 представление.
|
||||
|
||||
text-statistics:
|
||||
title: Статистика текста
|
||||
description: Получайте информацию о тексте, количество символов, количество слов, его размер в байтах и т.д.
|
||||
|
||||
text-to-nato-alphabet:
|
||||
title: Текст в алфавит НАТО
|
||||
description: Преобразуйте текст в фонетический алфавит НАТО для устной передачи.
|
||||
|
||||
basic-auth-generator:
|
||||
title: Генератор базовой аутентификации
|
||||
description: Генерируйте заголовок базовой аутентификации base64 из имени пользователя и пароля.
|
||||
|
||||
text-to-unicode:
|
||||
title: Текст в Unicode
|
||||
description: Парсинг и конвертация текста в Unicode и наоборот.
|
||||
|
||||
ipv4-range-expander:
|
||||
title: Расширитель диапазона IPv4
|
||||
description: Введите начальный и конечный IPv4 адрес, этот инструмент вычислит действительную подсеть IPv4 вместе с ее нотацией CIDR.
|
||||
|
||||
text-diff:
|
||||
title: Сравнение текстов
|
||||
description: Сравнивайте два текста и смотрите разницу между ними.
|
||||
|
||||
otp-generator:
|
||||
title: Генератор OTP кодов
|
||||
description: Генерируйте и проверяйте одноразовые пароли (OTP) на основе времени для многофакторной аутентификации.
|
||||
|
||||
url-encoder:
|
||||
title: Кодирование/декодирование URL-форматированных строк
|
||||
description: Кодируйте текст в формат URL (также известный как "percent-encoded") или декодируйте из него.
|
||||
|
||||
text-to-binary:
|
||||
title: Текст в двоичный ASCII
|
||||
description: Конвертируйте текст в его двоичное представление ASCII и наоборот.
|
||||
+322
-9
@@ -37,13 +37,13 @@ about:
|
||||
|
||||
## Технології
|
||||
|
||||
IT Tools виконаний на Vue.js (Vue 3) з використанням бібліотеки компонентів Naive UI і розгортаний за допомогою Vercel. У деяких інструментах використовуються сторонні відкриті бібліотеки, повний список яких ви можете знайти в файлі [package.json](https://github.com/sharevb/it-tools/blob/main/package.json) репозиторію.
|
||||
IT Tools виконаний на Vue.js (Vue 3) з використанням бібліотеки компонентів Naive UI і розгортаний за допомогою Vercel. У деяких інструментах використовуються сторонні відкриті бібліотеки, повний список яких ви можете знайти в файлі [package.json](https://github.com/CorentinTh/it-tools/blob/main/package.json) репозиторію.
|
||||
|
||||
## Знайшли баг? Відсутній інструмент?
|
||||
|
||||
Якщо вам потрібен інструмент, якого наразі немає тут, і ви вважаєте, що він може бути корисним, ви можете подати запит на додавання функції в [розділі проблем](https://github.com/sharevb/it-tools/issues/new/choose) у репозиторії GitHub.
|
||||
Якщо вам потрібен інструмент, якого наразі немає тут, і ви вважаєте, що він може бути корисним, ви можете подати запит на додавання функції в [розділі проблем](https://github.com/CorentinTh/it-tools/issues/new/choose) у репозиторії GitHub.
|
||||
|
||||
А якщо ви знайшли баг або щось не працює, як очікувалося, будь ласка, подайте звіт про баг в [розділі проблем](https://github.com/sharevb/it-tools/issues/new/choose) у репозиторії GitHub.
|
||||
А якщо ви знайшли баг або щось не працює, як очікувалося, будь ласка, подайте звіт про баг в [розділі проблем](https://github.com/CorentinTh/it-tools/issues/new/choose) у репозиторії GitHub.
|
||||
|
||||
404:
|
||||
notFound: '404 Сторінка не знайдена'
|
||||
@@ -70,11 +70,324 @@ tools:
|
||||
measurement: Вимірювання
|
||||
text: Текст
|
||||
data: Дані
|
||||
password-strength-analyser:
|
||||
title: Аналізатор надійності пароля
|
||||
description: Дізнайтеся про надійність свого пароля за допомогою цього аналізатора надійності пароля, що працює на строні клієнту, та інструменту оцінки часу взлому.
|
||||
|
||||
csv-to-json:
|
||||
title: 'CSV в JSON'
|
||||
description: 'Конвертуйте CSV в JSON з автоматичним визначенням заголовків.'
|
||||
chronometer:
|
||||
title: Хронометр
|
||||
description: Спосерігайте за тривалістю в часі. В основному це хронометр із простими функціями хронометра.
|
||||
|
||||
json-sort-master:
|
||||
title: JSON сортувальник
|
||||
description: Сортуйте ваш JSON за ключами та значеннями.
|
||||
token-generator:
|
||||
title: Генератор токенів
|
||||
description: Згенеруйте випадковий рядок із потрібними вам символами, великими та малими літерами, цифрами та/або символами.
|
||||
|
||||
uppercase: Великі літери (ABC...)
|
||||
lowercase: Малі літери (abc...)
|
||||
numbers: Числа (123...)
|
||||
symbols: Символи (!-;...)
|
||||
length: Довжина
|
||||
tokenPlaceholder: 'Токен...'
|
||||
copied: Токен скопійовано в буфер обміну
|
||||
button:
|
||||
copy: Копіювати
|
||||
refresh: Оновити
|
||||
percentage-calculator:
|
||||
title: Калькулятор відсотків
|
||||
description: Легко обчислюйте відсотки від одного значення до іншого значення або від відсотка до значення.
|
||||
|
||||
svg-placeholder-generator:
|
||||
title: Генератор SVG placeholder
|
||||
description: Створюйте зображення svg для використання в ваших застосунках як placeholder.
|
||||
|
||||
json-to-csv:
|
||||
title: JSON в CSV
|
||||
description: Перетворіть JSON на CSV із автоматичним виявленням заголовків.
|
||||
|
||||
camera-recorder:
|
||||
title: Запис з камери
|
||||
description: Сфотографуйте або запишіть відео з веб-камери чи камери.
|
||||
|
||||
keycode-info:
|
||||
title: Інформація про код кнопки
|
||||
description: Знайдіть код кнопки, місце та модифікатори будь-якої натиснутої кнопки.
|
||||
|
||||
emoji-picker:
|
||||
title: Вибір емодзі
|
||||
description: Легко копіюйте та вставляйте емодзі та отримуйте значення юнікоду та кодових точок кожного емодзі.
|
||||
|
||||
color-converter:
|
||||
title: Конвертер кольорів
|
||||
description: Конвертуйте кольори між різними форматами (hex, rgb, hsl та css назва)
|
||||
|
||||
bcrypt:
|
||||
title: Bcrypt
|
||||
description: Хешуйте та порівнюйте текстові рядки за допомогою bcrypt. Bcrypt - це функція хешування паролів, заснована на шифрі Blowfish.
|
||||
|
||||
crontab-generator:
|
||||
title: Генератор Crontab
|
||||
description: Перевіряйте та генеруйте crontab і отримуйте опис розкладу cron у зручному для читання форматі.
|
||||
|
||||
http-status-codes:
|
||||
title: Коди стану HTTP
|
||||
description: Список усіх кодів стану HTTP, їх назви та значення.
|
||||
|
||||
sql-prettify:
|
||||
title: Форматування SQL
|
||||
description: Форматуйте та прикрашайте свої SQL-запити онлайн (підтримуються різні діалекти SQL).
|
||||
|
||||
benchmark-builder:
|
||||
title: Конструктор бенчмарків
|
||||
description: Легко порівнюйте час виконання завдань за допомогою цього дуже простого онлайн-конструктора бенчмарків.
|
||||
|
||||
git-memo:
|
||||
title: Шпаргалка Git
|
||||
description: Git - це децентралізоване програмне забезпечення для управління версіями. За допомогою цієї шпаргалки ви матимете швидкий доступ до найпоширеніших команд git.
|
||||
|
||||
slugify-string:
|
||||
title: Перетворення рядка (slug)
|
||||
description: Зробіть рядок безпечним для URL, імен файлів та ідентифікаторів.
|
||||
|
||||
encryption:
|
||||
title: Шифрування / дешифрування тексту
|
||||
description: Шифруйте відкритий текст і дешифруйте зашифрований текст за допомогою криптоалгоритмів, таких як AES, TripleDES, Rabbit або RC4.
|
||||
|
||||
random-port-generator:
|
||||
title: Генератор випадкових портів
|
||||
description: Генеруйте випадкові номери портів поза діапазоном "відомих" портів (0-1023).
|
||||
|
||||
yaml-prettify:
|
||||
title: Форматування YAML
|
||||
description: Перетворіть свій YAML-рядок у зручний для читання формат.
|
||||
|
||||
eta-calculator:
|
||||
title: Калькулятор ETA
|
||||
description: Калькулятор ETA (Estimated Time of Arrival) для визначення приблизного часу завершення завдання, наприклад, часу завершення та тривалості завантаження файлу.
|
||||
|
||||
roman-numeral-converter:
|
||||
title: Конвертер римських цифр
|
||||
description: Конвертуйте римські цифри в числа і числа в римські цифри.
|
||||
|
||||
hmac-generator:
|
||||
title: Генератор Hmac
|
||||
description: Обчислює код автентифікації повідомлення на основі хешу (HMAC) за допомогою секретного ключа та вашої улюбленої хеш-функції.
|
||||
|
||||
bip39-generator:
|
||||
title: Генератор BIP39 паролів
|
||||
description: Генеруйте BIP39 пароль з існуючої або випадкової мнемоніки, або отримуйте мнемоніку з пароля.
|
||||
|
||||
base64-file-converter:
|
||||
title: Конвертер файлів Base64
|
||||
description: Конвертуйте рядок, файл або зображення у його представлення base64.
|
||||
|
||||
list-converter:
|
||||
title: Конвертер списків
|
||||
description: Цей інструмент може обробляти дані на основі стовпців і застосовувати різні зміни (транспонування, додавання префікса та суфікса, реверс списку, сортування списку, зменшення значень, обрізання значень) до кожного рядка.
|
||||
|
||||
base64-string-converter:
|
||||
title: Конвертер рядків base64
|
||||
description: Просто кодуйте та декодуйте рядки у їх представлення base64.
|
||||
|
||||
toml-to-yaml:
|
||||
title: TOML в YAML
|
||||
description: Парсинг та конвертація TOML в YAML.
|
||||
|
||||
math-evaluator:
|
||||
title: Оцінювач математичних виразів
|
||||
description: Калькулятор для оцінки математичних виразів. Ви можете використовувати функції, такі як sqrt, cos, sin, abs тощо.
|
||||
|
||||
json-to-yaml-converter:
|
||||
title: Конвертер JSON в YAML
|
||||
description: Просто конвертуйте JSON в YAML за допомогою цього онлайн-конвертера.
|
||||
|
||||
url-parser:
|
||||
title: Парсер URL
|
||||
description: Розбирайте URL на його окремі складові частини (протокол, походження, параметри, порт, ім'я користувача-пароль тощо).
|
||||
|
||||
iban-validator-and-parser:
|
||||
title: Валідатор та парсер IBAN
|
||||
description: Перевіряйте та розбирайте номери IBAN. Перевіряйте, чи є IBAN дійсним, і отримуйте країну, BBAN, чи є це QR-IBAN та дружній формат IBAN.
|
||||
|
||||
user-agent-parser:
|
||||
title: Парсер User-agent
|
||||
description: Визначайте та розбирайте браузер, движок, ОС, ЦП та тип/модель пристрою з рядка user-agent.
|
||||
|
||||
numeronym-generator:
|
||||
title: Генератор нумеронімів
|
||||
description: Нумеронім - це слово, де для утворення абревіатури використовується число. Наприклад, "i18n" - це нумеронім слова "internationalization", де 18 означає кількість літер між першою i та останньою n у слові.
|
||||
|
||||
case-converter:
|
||||
title: Конвертер регістру
|
||||
description: Перетворюйте регістр рядка та вибирайте між різними форматами.
|
||||
|
||||
html-entities:
|
||||
title: Екранування HTML сутностей
|
||||
description: Екрануйте або розекрануйте HTML сутності (замінюйте символи, такі як <,>, &, " та \' на їх HTML версії).
|
||||
|
||||
json-prettify:
|
||||
title: Форматування JSON
|
||||
description: Перетворіть свій JSON-рядок у зручний для читання формат.
|
||||
|
||||
docker-run-to-docker-compose-converter:
|
||||
title: Конвертер Docker run в Docker compose
|
||||
description: Перетворюйте команди "docker run" у файли docker-compose!
|
||||
|
||||
mac-address-lookup:
|
||||
title: Пошук MAC-адреси
|
||||
description: Знайдіть постачальника та виробника пристрою за його MAC-адресою.
|
||||
|
||||
mime-types:
|
||||
title: MIME типи
|
||||
description: Конвертуйте MIME типи у розширення файлів та навпаки.
|
||||
|
||||
toml-to-json:
|
||||
title: TOML в JSON
|
||||
description: Парсинг та конвертація TOML в JSON.
|
||||
|
||||
lorem-ipsum-generator:
|
||||
title: Генератор Lorem ipsum
|
||||
description: Lorem ipsum - це текст-заповнювач, який зазвичай використовується для демонстрації візуальної форми документа або шрифту без використання змістовного контенту.
|
||||
|
||||
qrcode-generator:
|
||||
title: Генератор QR-кодів
|
||||
description: Генеруйте та завантажуйте QR-код для URL (або простого тексту) та налаштовуйте кольори фону та переднього плану.
|
||||
|
||||
wifi-qrcode-generator:
|
||||
title: Генератор QR-кодів для WiFi
|
||||
description: Генеруйте та завантажуйте QR-коди для швидкого підключення до WiFi мереж.
|
||||
|
||||
xml-formatter:
|
||||
title: Форматування XML
|
||||
description: Перетворіть свій XML-рядок у зручний для читання формат.
|
||||
|
||||
temperature-converter:
|
||||
title: Конвертер температури
|
||||
description: Конвертація температури в градусах для Кельвіна, Цельсія, Фаренгейта, Ранкіна, Делісля, Ньютона, Реомюра та Ремера.
|
||||
|
||||
chmod-calculator:
|
||||
title: Калькулятор chmod
|
||||
description: Обчислюйте свої дозволи та команди chmod за допомогою цього онлайн-калькулятора chmod.
|
||||
|
||||
rsa-key-pair-generator:
|
||||
title: Генератор RSA ключів
|
||||
description: Генеруйте нову випадкову пару приватного та публічного сертифікатів RSA у форматі pem.
|
||||
|
||||
html-wysiwyg-editor:
|
||||
title: HTML WYSIWYG редактор
|
||||
description: Онлайн, багатофункціональний WYSIWYG HTML редактор, який генерує вихідний HTML-код контенту негайно.
|
||||
|
||||
yaml-to-toml:
|
||||
title: YAML в TOML
|
||||
description: Парсинг та конвертація YAML в TOML.
|
||||
|
||||
mac-address-generator:
|
||||
title: Генератор MAC-адрес
|
||||
description: Введіть кількість та префікс. MAC-адреси будуть згенеровані у вибраному вами регістрі (верхній або нижній).
|
||||
|
||||
json-diff:
|
||||
title: Порівняння JSON
|
||||
description: Порівнюйте два JSON об'єкти та отримуйте різниці між ними.
|
||||
|
||||
jwt-parser:
|
||||
title: Парсер JWT
|
||||
description: Парсинг та декодування вашого JSON Web Token (jwt) та відображення його вмісту.
|
||||
|
||||
date-converter:
|
||||
title: Конвертер дати та часу
|
||||
description: Конвертуйте дату та час у різні формати.
|
||||
|
||||
phone-parser-and-formatter:
|
||||
title: Парсер та форматувач телефонів
|
||||
description: Парсинг, валідація та форматування телефонних номерів. Отримуйте інформацію про телефонний номер, наприклад, код країни, тип тощо.
|
||||
|
||||
ipv4-subnet-calculator:
|
||||
title: Калькулятор підмереж IPv4
|
||||
description: Парсинг ваших блоків CIDR IPv4 та отримання всієї необхідної інформації про вашу підмережу.
|
||||
|
||||
og-meta-generator:
|
||||
title: Генератор мета-тегів Open Graph
|
||||
description: Генеруйте HTML мета-теги Open Graph та соціальних мереж для вашого вебсайту.
|
||||
|
||||
ipv6-ula-generator:
|
||||
title: Генератор IPv6 ULA
|
||||
description: Генеруйте свої власні локальні, не маршрутизовані IP-адреси для вашої мережі відповідно до RFC4193.
|
||||
|
||||
hash-text:
|
||||
title: Хешування тексту
|
||||
description: 'Хешуйте текстовий рядок за допомогою потрібної вам функції: MD5, SHA1, SHA256, SHA224, SHA512, SHA384, SHA3 або RIPEMD160'
|
||||
|
||||
json-to-toml:
|
||||
title: JSON в TOML
|
||||
description: Парсинг та конвертація JSON в TOML.
|
||||
|
||||
device-information:
|
||||
title: Інформація про пристрій
|
||||
description: Отримуйте інформацію про ваш поточний пристрій (розмір екрану, піксельне співвідношення, user agent тощо).
|
||||
|
||||
pdf-signature-checker:
|
||||
title: Перевірка підпису PDF
|
||||
description: Перевіряйте підписи PDF файлу. Підписаний PDF файл містить один або більше підписів, які можуть бути використані для визначення, чи були змінені вміст файлу після його підписання.
|
||||
|
||||
json-minify:
|
||||
title: Мінімізація JSON
|
||||
description: Мінімізуйте та стискайте ваш JSON, видаляючи непотрібні пробіли.
|
||||
|
||||
ulid-generator:
|
||||
title: Генератор ULID
|
||||
description: Генеруйте випадковий універсально унікальний лексикографічно сортуваний ідентифікатор (ULID).
|
||||
|
||||
string-obfuscator:
|
||||
title: Обфускація рядка
|
||||
description: Обфускуйте рядок (наприклад, секрет, IBAN або токен), щоб зробити його доступним для спільного використання та ідентифікації без розкриття його вмісту.
|
||||
|
||||
base-converter:
|
||||
title: Конвертер числових систем
|
||||
description: Конвертуйте число між різними системами числення (десяткова, шістнадцяткова, двійкова, вісімкова, base64 тощо).
|
||||
|
||||
yaml-to-json-converter:
|
||||
title: Конвертер YAML в JSON
|
||||
description: Просто конвертуйте YAML в JSON за допомогою цього онлайн-конвертера.
|
||||
|
||||
uuid-generator:
|
||||
title: Генератор UUID
|
||||
description: Універсально унікальний ідентифікатор (UUID) - це 128-бітове число, яке використовується для ідентифікації інформації в комп'ютерних системах. Кількість можливих UUID становить 16^32, що дорівнює 2^128 або приблизно 3.4x10^38 (що дуже багато!).
|
||||
|
||||
ipv4-address-converter:
|
||||
title: Конвертер IPv4 адрес
|
||||
description: Конвертуйте IP-адресу у десяткове, двійкове, шістнадцяткове або навіть IPv6 представлення.
|
||||
|
||||
text-statistics:
|
||||
title: Статистика тексту
|
||||
description: Отримуйте інформацію про текст, кількість символів, кількість слів, його розмір у байтах тощо.
|
||||
|
||||
text-to-nato-alphabet:
|
||||
title: Текст у алфавіт НАТО
|
||||
description: Перетворюйте текст у фонетичний алфавіт НАТО для усної передачі.
|
||||
|
||||
basic-auth-generator:
|
||||
title: Генератор базової автентифікації
|
||||
description: Генеруйте заголовок базової автентифікації base64 з імені користувача та пароля.
|
||||
|
||||
text-to-unicode:
|
||||
title: Текст у Unicode
|
||||
description: Парсинг та конвертація тексту у Unicode та навпаки.
|
||||
|
||||
ipv4-range-expander:
|
||||
title: Розширювач діапазону IPv4
|
||||
description: Введіть початкову та кінцеву IPv4 адресу, цей інструмент обчислить дійсну підмережу IPv4 разом з її нотацією CIDR.
|
||||
|
||||
text-diff:
|
||||
title: Порівняння текстів
|
||||
description: Порівнюйте два тексти та побачте різницю між ними.
|
||||
|
||||
otp-generator:
|
||||
title: Генератор OTP кодів
|
||||
description: Генеруйте та перевіряйте одноразові паролі (OTP) на основі часу для багатофакторної автентифікації.
|
||||
|
||||
url-encoder:
|
||||
title: Кодування/декодування URL-форматованих рядків
|
||||
description: Кодуйте текст у формат URL (також відомий як "percent-encoded") або декодуйте з нього.
|
||||
|
||||
text-to-binary:
|
||||
title: Текст у двійковий ASCII
|
||||
description: Конвертуйте текст у його двійкове представлення ASCII та навпаки.
|
||||
@@ -6,6 +6,7 @@ server {
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
rewrite ^/it-tools/(.*) /$1 break;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
+32
-5
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "it-tools",
|
||||
"type": "module",
|
||||
"version": "2025.2.9-b99a19c",
|
||||
"version": "2025.4.21-70194069",
|
||||
"packageManager": "pnpm@9.11.0",
|
||||
"description": "Collection of handy online tools for developers, with great UX. ",
|
||||
"author": "Corentin Th <corentin.thomasset74+it-tools@gmail.com> (https://corentin.tech)",
|
||||
@@ -40,6 +40,7 @@
|
||||
"@chenfengyuan/vue-barcode": "^2.0.2",
|
||||
"@date-fns/utc": "^1.2.0",
|
||||
"@dice-roller/rpg-dice-roller": "^5.5.1",
|
||||
"@faker-js/faker": "^9.7.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
||||
"@fortawesome/vue-fontawesome": "^3.0.8",
|
||||
@@ -53,6 +54,7 @@
|
||||
"@kenjiuno/decompressrtf": "^0.1.4",
|
||||
"@kenjiuno/msgreader": "^1.22.0",
|
||||
"@mdit/plugin-align": "^0.16.0",
|
||||
"@noble/ciphers": "^1.2.1",
|
||||
"@regexper/render": "^1.0.0",
|
||||
"@sindresorhus/slugify": "^2.2.1",
|
||||
"@tabler/icons-vue": "^3.20.0",
|
||||
@@ -69,6 +71,7 @@
|
||||
"@tiptap/starter-kit": "2.9.1",
|
||||
"@tiptap/vue-3": "2.9.1",
|
||||
"@types/haversine": "^1.1.8",
|
||||
"@types/moment": "^2.13.0",
|
||||
"@unicode/unicode-15.1.0": "^1.6.5",
|
||||
"@vicons/material": "^0.12.0",
|
||||
"@vicons/tabler": "^0.12.0",
|
||||
@@ -78,12 +81,14 @@
|
||||
"@xmldom/xmldom": "^0.8.10",
|
||||
"@younestouati/playing-cards-standard-deck": "^6.0.1",
|
||||
"@zxing/library": "^0.21.3",
|
||||
"a11y-color-contrast": "^0.2.0",
|
||||
"aircodes": "^1.3.16",
|
||||
"ansible-vault": "^1.3.0",
|
||||
"apache-md5": "^1.1.8",
|
||||
"arr-diff": "^4.0.0",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"big.js": "^6.2.2",
|
||||
"braces": "^3.0.3",
|
||||
"bwip-js": "^4.5.1",
|
||||
"byte-data": "^19.0.1",
|
||||
"change-case": "^5.4.4",
|
||||
@@ -91,7 +96,7 @@
|
||||
"chinesegen": "^0.3.3",
|
||||
"cidr-tools": "^11.0.2",
|
||||
"colord": "^2.9.3",
|
||||
"composerize": "^1.7.1",
|
||||
"composerize": "^1.7.2",
|
||||
"composeverter": "^1.7.4",
|
||||
"convert": "^5.7.0",
|
||||
"countries-and-timezones": "^3.7.2",
|
||||
@@ -101,6 +106,7 @@
|
||||
"cron-parser": "^4.9.0",
|
||||
"cron-validator": "^1.3.1",
|
||||
"cronstrue": "^2.54.0",
|
||||
"cross-spawn": "^7.0.6",
|
||||
"crypto-js": "^4.2.0",
|
||||
"csstoxpath": "^2.0.0",
|
||||
"curlconverter": "^4.12.0",
|
||||
@@ -110,6 +116,7 @@
|
||||
"date-fns": "^2.30.0",
|
||||
"date-holidays": "^3.23.21",
|
||||
"decomposerize": "^1.4.4",
|
||||
"detect-csv": "^1.1.0",
|
||||
"dmarc-report-parser": "^0.1.5",
|
||||
"dns-query": "^0.11.2",
|
||||
"docker2kube": "^0.0.14",
|
||||
@@ -171,6 +178,8 @@
|
||||
"jsonar-mod": "^1.9.0",
|
||||
"jsonlint-mod": "^1.7.6",
|
||||
"jsonpath": "^1.1.1",
|
||||
"jsonrepair": "^3.12.0",
|
||||
"jsonschema-protobuf": "^1.0.2",
|
||||
"jsstack.js": "^2.0.0",
|
||||
"jsvat-next": "^3.0.4",
|
||||
"jszip": "^3.10.1",
|
||||
@@ -195,12 +204,16 @@
|
||||
"mathjs": "^14.2.1",
|
||||
"md-editor-v3": "^4.21.3",
|
||||
"memorystream": "^0.3.1",
|
||||
"mermaid": "^11.6.0",
|
||||
"mime-types": "^2.1.35",
|
||||
"mitex-wasm": "^0.2.5",
|
||||
"moment": "^2.30.1",
|
||||
"monaco-editor": "^0.43.0",
|
||||
"morsee": "^1.0.10",
|
||||
"naive-ui": "^2.35.0",
|
||||
"nanoid": "^5.0.9",
|
||||
"nanoid-dictionary": "^4.3.0",
|
||||
"nestify-anything": "^3.0.3",
|
||||
"netmask": "^2.0.2",
|
||||
"netstack.js": "^2.1.1",
|
||||
"nginx-config-formatter": "^1.4.5",
|
||||
@@ -209,6 +222,7 @@
|
||||
"oui-data": "^1.1.281",
|
||||
"parse-duration": "^2.1.2",
|
||||
"parse-torrent": "^11.0.18",
|
||||
"paseto-ts": "^2.0.5",
|
||||
"path2d-polyfill": "^3.1.3",
|
||||
"pdf-signature-reader": "^1.4.3",
|
||||
"pdfjs-dist": "^4.8.69",
|
||||
@@ -219,14 +233,17 @@
|
||||
"potrace": "^2.1.8",
|
||||
"pp-qr-code": "^0.6.4",
|
||||
"pretty-ms": "^9.2.0",
|
||||
"properties": "^1.2.1",
|
||||
"punycode": "^2.3.1",
|
||||
"pythonstack.js": "^1.0.2",
|
||||
"qpdf-wasm-esm-embedded": "^1.1.1",
|
||||
"qrcode": "^1.5.4",
|
||||
"qrcode-parser": "^2.1.3",
|
||||
"qrcode-terminal-nooctal": "^0.12.1",
|
||||
"quicktype-core": "^23.1.3",
|
||||
"randexp": "^0.5.3",
|
||||
"regex": "^4.4.0",
|
||||
"riimut": "^0.9.1",
|
||||
"roboto-base64": "^0.1.2",
|
||||
"rtf-stream-parser": "^3.8.0",
|
||||
"safe-license-list": "^0.1.2",
|
||||
@@ -238,12 +255,15 @@
|
||||
"spdx-satisfies": "^5.0.1",
|
||||
"sql-formatter": "^15.5.1",
|
||||
"sshpk": "^1.18.0",
|
||||
"staveless-futhark": "^0.6.1",
|
||||
"stringify-object": "^5.0.0",
|
||||
"svg2png-wasm": "^1.4.1",
|
||||
"svgo": "^3.3.2",
|
||||
"tesseract.js": "^5.1.1",
|
||||
"text-encoding-utf-8": "^1.0.2",
|
||||
"tidy-url": "^1.18.3",
|
||||
"to-double-quotes": "^4.0.0",
|
||||
"to-single-quotes": "^4.0.0",
|
||||
"turndown": "^7.2.0",
|
||||
"ua-parser-js": "^2.0.1",
|
||||
"ulid": "^2.3.0",
|
||||
@@ -255,20 +275,20 @@
|
||||
"vanilla-jsoneditor": "^0.23.8",
|
||||
"vue": "^3.3.4",
|
||||
"vue-color-wheel": "^0.1.1",
|
||||
"vue-i18n": "^9.9.1",
|
||||
"vue-i18n": "^9.14.3",
|
||||
"vue-markdown-render": "^2.2.1",
|
||||
"vue-mathjax-next": "^0.0.6",
|
||||
"vue-mermaid-string": "^7.0.0",
|
||||
"vue-router": "^4.1.6",
|
||||
"vue-shadow-dom": "^4.2.0",
|
||||
"vue-tsc": "^1.8.1",
|
||||
"vue3-flip-countdown": "^0.1.6",
|
||||
"vue3-fortune-wheel": "^2.0.5",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vuex": "^4.1.0",
|
||||
"w-websocket-client": "^1.0.29",
|
||||
"wcag-contrast-utils": "^1.0.1",
|
||||
"webcrack": "^2.15.0",
|
||||
"webp-converter-browser": "^1.0.4",
|
||||
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz",
|
||||
"xml-formatter": "^3.6.4",
|
||||
"xml-js": "^1.6.11",
|
||||
"xpath": "^0.0.34",
|
||||
@@ -334,6 +354,7 @@
|
||||
"jsdom": "^22.0.0",
|
||||
"less": "^4.2.2",
|
||||
"prettier": "^3.0.0",
|
||||
"semver": "^7.5.2",
|
||||
"typescript": "~5.2.2",
|
||||
"unocss": "^0.57.1",
|
||||
"unocss-preset-scrollbar": "^0.2.1",
|
||||
@@ -343,9 +364,15 @@
|
||||
"vite-plugin-node-polyfills": "^0.22.0",
|
||||
"vite-plugin-pwa": "^1.0.0",
|
||||
"vite-plugin-vue-markdown": "^0.23.5",
|
||||
"vite-plugin-wasm": "^3.4.1",
|
||||
"vite-svg-loader": "^4.0.0",
|
||||
"vitest": "^0.34.6",
|
||||
"workbox-window": "^7.3.0",
|
||||
"zx": "^7.2.3"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+1248
-807
File diff suppressed because it is too large.
Load diff
Binary file not shown.
Whitespace-only changes.
+1
-1
@@ -36,7 +36,7 @@ window.IpLookup = (function () {
|
||||
return getUnderberFill(num.toString(36), 2)
|
||||
};
|
||||
|
||||
const TOP_URL = 'https://cdn.jsdelivr.net/npm/@iplookup/country-extra/';
|
||||
const TOP_URL = '//cdn.jsdelivr.net/npm/@iplookup/country-extra/';
|
||||
const MAIN_RECORD_SIZE = 2 ;
|
||||
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
(function(e){var t,r,n,a,s,i,o,l;if("undefined"!=typeof globalThis?e=globalThis:"undefined"!=typeof global?e=global:"undefined"!=typeof window&&(e=window),null==e.console&&(e.console={}),"log"in(t="object"==typeof e.console?e.console:{})||(t.log=function(){}),"warn"in t||(t.warn=t.log),void 0!==e.Opal)return t.warn("Opal already loaded. Loading twice can cause troubles, please fix your setup."),e.Opal;var $=e.Opal={};$.global=e,$.config={missing_require_severity:"error",unsupported_features_severity:"warning",experimental_features_severity:"warning",enable_stack_trace:!0};var u=Function.prototype.call,c=Function.prototype.bind,_=Object.hasOwn||u.bind(Object.prototype.hasOwnProperty),p=Object.setPrototypeOf,m=u.bind(Array.prototype.slice),d=u.bind(Array.prototype.splice),f=4;function h(){return f+=2}$.uid=h,$.id=function(e){return e.$$is_number?2*e+1:(null==e.$$id&&y(e,"$$id",h()),e.$$id)};var g=$.gvars={};function b(e,t){if(e||(e=$.Exception||Error),!l||!l.$raise)throw e.$new?e.$new(t):new e(t);arguments.length>2?l.$raise(e.$new.apply(e,m(arguments,1))):l.$raise(e,t)}$.exit=function(e){g.DEBUG&&t.log("Exited with status "+e)},$.exceptions=[],$.pop_exception=function(e){var t=$.exceptions.pop();t===e||(g["!"]=t||r)};var v={value:void 0,enumerable:!1,configurable:!0,writable:!0};function y(e,t,r){"string"==typeof e?e[t]=r:(v.value=r,Object.defineProperty(e,t,v))}$.prop=y,$.defineProperty=$.prop,$.slice=m;var x=$.truthy=function(e){return!(!1===e||r===e||null==e||e instanceof Boolean&&!0!==e.valueOf())};function w(e){var t,r,n;for(t=0,r=$.tracers_for_class.length;t<r;t++)(n=$.tracers_for_class[t]).trace_object=e,n.block.$call(n)}function k(e,t){if(e.$$autoload[t].loaded){if(e.$$autoload[t].loaded&&!e.$$autoload[t].required&&e.$$autoload[t].exception)throw e.$$autoload[t].exception}else{e.$$autoload[t].loaded=!0;try{$.Kernel.$require(e.$$autoload[t].path)}catch(r){throw e.$$autoload[t].exception=r,r}if(e.$$autoload[t].required=!0,null!=e.$$const[t])return e.$$autoload[t].success=!0,e.$$const[t]}}function U(e,t){if(e){if(null!=e.$$const[t])return e.$$const[t];if(e.$$autoload&&e.$$autoload[t])return k(e,t)}}function E(e,t){var r,n,a;if(null!=e)for(r=0,n=(a=P(e)).length;r<n;r++){if(a[r].$$const&&_(a[r].$$const,t))return a[r].$$const[t];if(a[r].$$autoload&&a[r].$$autoload[t])return k(a[r],t)}}function M(e,t){return(e||a).$const_missing(t)}function q(e,t,n){var s=!0;return null!=e&&"::"!==e||(e=a),n.$$is_a_module&&(null!=n.$$name&&n.$$name!==r||(n.$$name=t),null==n.$$base_module&&(n.$$base_module=e)),e.$$const=e.$$const||Object.create(null),(t in e.$$const||"$$autoload"in e&&t in e.$$autoload)&&(s=!1),e.$$const[t]=n,e.$$=e.$$const,$.const_cache_version++,e===a&&($[t]=n),y(e,t,n),s&&e.$const_added&&!e.$const_added.$$pristine&&e.$const_added(t),n}function S(e){return null!=e&&(e.$$bridge?e:!!e.$$super&&S(e.$$super))}function O(e,t,n){var a,s;if(a=(s=S(t))?function(){var e=new(c.apply(s.$$constructor,G(null,arguments)));return p(e,a.$$prototype),e}:function(){},e&&e!==r&&y(a,"displayName","::"+e),y(a,"$$name",e),y(a,"$$constructor",a),y(a,"$$prototype",a.prototype),y(a,"$$const",{}),y(a,"$$is_class",!0),y(a,"$$is_a_module",!0),y(a,"$$super",t),y(a,"$$cvars",{}),y(a,"$$own_included_modules",[]),y(a,"$$own_prepended_modules",[]),y(a,"$$ancestors",[]),y(a,"$$ancestors_cache_version",null),y(a,"$$subclasses",[]),y(a,"$$cloned_from",[]),y(a.$$prototype,"$$class",a),$.Class&&p(a,$.Class.prototype),null!=t){if(p(a.$$prototype,t.$$prototype),!0!==n)if("undefined"!=typeof WeakRef){var i,o,l=[];for(i=0;i<t.$$subclasses.length;i++)void 0!==(o=t.$$subclasses[i]).deref()&&l.push(o);l.push(new WeakRef(a)),t.$$subclasses=l}else t.$$subclasses.push(a);t.$$meta&&$.build_class_singleton_class(a)}return a}function A(e){var t=function(){},r=t;return e&&y(t,"displayName",e+".constructor"),y(r,"$$name",e),y(r,"$$prototype",t.prototype),y(r,"$$const",{}),y(r,"$$is_module",!0),y(r,"$$is_a_module",!0),y(r,"$$cvars",{}),y(r,"$$iclasses",[]),y(r,"$$own_included_modules",[]),y(r,"$$own_prepended_modules",[]),y(r,"$$ancestors",[r]),y(r,"$$ancestors_cache_version",null),y(r,"$$cloned_from",[]),p(r,$.Module.prototype),r}function T(e,t){e.hasOwnProperty("$$meta")?e.$$meta=t:y(e,"$$meta",t),e.$$frozen?e.$$meta.$freeze():p(e,t.$$prototype)}function N(e){return e.hasOwnProperty("$$iclass")&&e.hasOwnProperty("$$root")}function z(e){var t=R(e);return e.$$is_module&&e.$$iclasses.push(t),t}function R(e){var t={},r=e.$$prototype;r.hasOwnProperty("$$dummy")&&(r=r.$$define_methods_on);var n,a=Object.getOwnPropertyNames(r),s=a.length;for(n=0;n<s;n++){var i=a[n];y(t,i,r[i])}return y(t,"$$iclass",!0),y(t,"$$module",e),t}function I(e){var t=e.length,r=e[0];if(y(r,"$$root",!0),1===t)return{first:r,last:r};for(var n=r,a=1;a<t;a++){var s=e[a];p(n,s),n=s}return{first:e[0],last:e[t-1]}}function C(e){if(!e.hasOwnProperty("$$dummy"))return e.hasOwnProperty("$$iclass")?e.$$module:e.hasOwnProperty("$$class")?e.$$class:void 0}function P(e){if(!e)return[];if(e.$$ancestors_cLine truncated
|
||||
(function(e){var t,r,n,a,s,i,o,l;if("undefined"!=typeof globalThis?e=globalThis:"undefined"!=typeof global?e=global:"undefined"!=typeof window&&(e=window),null==e.console&&(e.console={}),"log"in(t="object"==typeof e.console?e.console:{})||(t.log=function(){}),"warn"in t||(t.warn=t.log),void 0!==e.Opal)return t.warn("Opal already loaded. Loading twice can cause troubles, please fix your setup."),e.Opal;var $=e.Opal={};$.global=e,$.config={missing_require_severity:"error",unsupported_features_severity:"warning",experimental_features_severity:"warning",enable_stack_trace:!0};var u=Function.prototype.call,c=Function.prototype.bind,_=Object.hasOwn||u.bind(Object.prototype.hasOwnProperty),p=Object.setPrototypeOf,m=u.bind(Array.prototype.slice),d=u.bind(Array.prototype.splice),f=4;function h(){return f+=2}$.uid=h,$.id=function(e){return e.$$is_number?2*e+1:(null==e.$$id&&y(e,"$$id",h()),e.$$id)};var g=$.gvars={};function b(e,t){if(e||(e=$.Exception||Error),!l||!l.$raise)throw e.$new?e.$new(t):new e(t);arguments.length>2?l.$raise(e.$new.apply(e,m(arguments,1))):l.$raise(e,t)}$.exit=function(e){g.DEBUG&&t.log("Exited with status "+e)},$.exceptions=[],$.pop_exception=function(e){var t=$.exceptions.pop();t===e||(g["!"]=t||r)};var v={value:void 0,enumerable:!1,configurable:!0,writable:!0};function y(e,t,r){"string"==typeof e?e[t]=r:(v.value=r,Object.defineProperty(e,t,v))}$.prop=y,$.defineProperty=$.prop,$.slice=m;var x=$.truthy=function(e){return!(!1===e||r===e||null==e||e instanceof Boolean&&!0!==e.valueOf())};function w(e){var t,r,n;for(t=0,r=$.tracers_for_class.length;t<r;t++)(n=$.tracers_for_class[t]).trace_object=e,n.block.$call(n)}function k(e,t){if(e.$$autoload[t].loaded){if(e.$$autoload[t].loaded&&!e.$$autoload[t].required&&e.$$autoload[t].exception)throw e.$$autoload[t].exception}else{e.$$autoload[t].loaded=!0;try{$.Kernel.$require(e.$$autoload[t].path)}catch(r){throw e.$$autoload[t].exception=r,r}if(e.$$autoload[t].required=!0,null!=e.$$const[t])return e.$$autoload[t].success=!0,e.$$const[t]}}function U(e,t){if(e){if(null!=e.$$const[t])return e.$$const[t];if(e.$$autoload&&e.$$autoload[t])return k(e,t)}}function E(e,t){var r,n,a;if(null!=e)for(r=0,n=(a=P(e)).length;r<n;r++){if(a[r].$$const&&_(a[r].$$const,t))return a[r].$$const[t];if(a[r].$$autoload&&a[r].$$autoload[t])return k(a[r],t)}}function M(e,t){return(e||a).$const_missing(t)}function q(e,t,n){var s=!0;return null!=e&&"::"!==e||(e=a),n.$$is_a_module&&(null!=n.$$name&&n.$$name!==r||(n.$$name=t),null==n.$$base_module&&(n.$$base_module=e)),e.$$const=e.$$const||Object.create(null),(t in e.$$const||"$$autoload"in e&&t in e.$$autoload)&&(s=!1),e.$$const[t]=n,e.$$=e.$$const,$.const_cache_version++,e===a&&($[t]=n),y(e,t,n),s&&e.$const_added&&!e.$const_added.$$pristine&&e.$const_added(t),n}function S(e){return null!=e&&(e.$$bridge?e:!!e.$$super&&S(e.$$super))}function O(e,t,n){var a,s;if(a=(s=S(t))?function(){var e=new(c.apply(s.$$constructor,G(null,arguments)));return p(e,a.$$prototype),e}:function(){},e&&e!==r&&y(a,"displayName","::"+e),y(a,"$$name",e),y(a,"$$constructor",a),y(a,"$$prototype",a.prototype),y(a,"$$const",{}),y(a,"$$is_class",!0),y(a,"$$is_a_module",!0),y(a,"$$super",t),y(a,"$$cvars",{}),y(a,"$$own_included_modules",[]),y(a,"$$own_prepended_modules",[]),y(a,"$$ancestors",[]),y(a,"$$ancestors_cache_version",null),y(a,"$$subclasses",[]),y(a,"$$cloned_from",[]),y(a.$$prototype,"$$class",a),$.Class&&p(a,$.Class.prototype),null!=t){if(p(a.$$prototype,t.$$prototype),!0!==n)if("undefined"!=typeof WeakRef){var i,o,l=[];for(i=0;i<t.$$subclasses.length;i++)void 0!==(o=t.$$subclasses[i]).deref()&&l.push(o);l.push(new WeakRef(a)),t.$$subclasses=l}else t.$$subclasses.push(a);t.$$meta&&$.build_class_singleton_class(a)}return a}function A(e){var t=function(){},r=t;return e&&y(t,"displayName",e+".constructor"),y(r,"$$name",e),y(r,"$$prototype",t.prototype),y(r,"$$const",{}),y(r,"$$is_module",!0),y(r,"$$is_a_module",!0),y(r,"$$cvars",{}),y(r,"$$iclasses",[]),y(r,"$$own_included_modules",[]),y(r,"$$own_prepended_modules",[]),y(r,"$$ancestors",[r]),y(r,"$$ancestors_cache_version",null),y(r,"$$cloned_from",[]),p(r,$.Module.prototype),r}function T(e,t){e.hasOwnProperty("$$meta")?e.$$meta=t:y(e,"$$meta",t),e.$$frozen?e.$$meta.$freeze():p(e,t.$$prototype)}function N(e){return e.hasOwnProperty("$$iclass")&&e.hasOwnProperty("$$root")}function z(e){var t=R(e);return e.$$is_module&&e.$$iclasses.push(t),t}function R(e){var t={},r=e.$$prototype;r.hasOwnProperty("$$dummy")&&(r=r.$$define_methods_on);var n,a=Object.getOwnPropertyNames(r),s=a.length;for(n=0;n<s;n++){var i=a[n];y(t,i,r[i])}return y(t,"$$iclass",!0),y(t,"$$module",e),t}function I(e){var t=e.length,r=e[0];if(y(r,"$$root",!0),1===t)return{first:r,last:r};for(var n=r,a=1;a<t;a++){var s=e[a];p(n,s),n=s}return{first:e[0],last:e[t-1]}}function C(e){if(!e.hasOwnProperty("$$dummy"))return e.hasOwnProperty("$$iclass")?e.$$module:e.hasOwnProperty("$$class")?e.$$class:void 0}function P(e){if(!e)return[];if(e.$$ancestors_cLine truncated
|
||||
//# sourceMappingURL=plurimath-opal.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -16,6 +16,7 @@ const props = withDefaults(
|
||||
outputLanguage?: string
|
||||
downloadFileName?: string
|
||||
downloadButtonText?: string
|
||||
rows?: number
|
||||
}>(),
|
||||
{
|
||||
transformer: _.identity,
|
||||
@@ -27,12 +28,13 @@ const props = withDefaults(
|
||||
outputLanguage: '',
|
||||
downloadFileName: '',
|
||||
downloadButtonText: 'Download',
|
||||
rows: 15,
|
||||
},
|
||||
);
|
||||
|
||||
const {
|
||||
transformer, inputValidationRules, inputLabel, outputLabel, outputLanguage,
|
||||
inputPlaceholder, inputDefault, downloadFileName, downloadButtonText,
|
||||
inputPlaceholder, inputDefault, downloadFileName, downloadButtonText, rows,
|
||||
} = toRefs(props);
|
||||
|
||||
const inputElement = ref<typeof CInputText>();
|
||||
@@ -54,13 +56,14 @@ const { download } = useDownloadFileFromBase64(
|
||||
v-model:value="input"
|
||||
:placeholder="inputPlaceholder"
|
||||
:label="inputLabel"
|
||||
rows="20"
|
||||
:rows="rows"
|
||||
autosize
|
||||
raw-text
|
||||
multiline
|
||||
test-id="input"
|
||||
:validation-rules="inputValidationRules"
|
||||
monospace
|
||||
mb-1
|
||||
/>
|
||||
|
||||
<div overflow-auto>
|
||||
|
||||
@@ -13,7 +13,10 @@ import markdownHljs from 'highlight.js/lib/languages/markdown';
|
||||
import jsHljs from 'highlight.js/lib/languages/javascript';
|
||||
import cssHljs from 'highlight.js/lib/languages/css';
|
||||
import goHljs from 'highlight.js/lib/languages/go';
|
||||
import pythonHljs from 'highlight.js/lib/languages/python';
|
||||
import phpHljs from 'highlight.js/lib/languages/php';
|
||||
import csharpHljs from 'highlight.js/lib/languages/csharp';
|
||||
import protobufHljs from 'highlight.js/lib/languages/protobuf';
|
||||
import { Base64 } from 'js-base64';
|
||||
import { useCopy } from '@/composable/copy';
|
||||
import { useDownloadFileFromBase64 } from '@/composable/downloadBase64';
|
||||
@@ -45,12 +48,16 @@ hljs.registerLanguage('xml', xmlHljs);
|
||||
hljs.registerLanguage('yaml', yamlHljs);
|
||||
hljs.registerLanguage('toml', iniHljs);
|
||||
hljs.registerLanguage('ts', tsHljs);
|
||||
hljs.registerLanguage('typescript', tsHljs);
|
||||
hljs.registerLanguage('bash', bashHljs);
|
||||
hljs.registerLanguage('markdown', markdownHljs);
|
||||
hljs.registerLanguage('css', cssHljs);
|
||||
hljs.registerLanguage('javascript', jsHljs);
|
||||
hljs.registerLanguage('go', goHljs);
|
||||
hljs.registerLanguage('csharp', csharpHljs);
|
||||
hljs.registerLanguage('python', pythonHljs);
|
||||
hljs.registerLanguage('php', phpHljs);
|
||||
hljs.registerLanguage('protobuf', protobufHljs);
|
||||
|
||||
const { value, language, followHeightOf, copyPlacement, copyMessage, downloadFileName, downloadButtonText } = toRefs(props);
|
||||
const { height } = followHeightOf.value ? useElementSize(followHeightOf) : { height: ref(null) };
|
||||
|
||||
@@ -13,6 +13,7 @@ const localesLong: Record<string, string> = {
|
||||
uk: 'Українська',
|
||||
zh: '中文',
|
||||
vi: 'Tiếng Việt',
|
||||
ar: 'عربي',
|
||||
};
|
||||
|
||||
const localeOptions = computed(() =>
|
||||
|
||||
@@ -3,11 +3,24 @@ import { IconDragDrop, IconFileDescription, IconHeart } from '@tabler/icons-vue'
|
||||
import { useHead } from '@vueuse/head';
|
||||
import { computed } from 'vue';
|
||||
import Draggable from 'vuedraggable';
|
||||
import VueMarkdown from 'vue-markdown-render';
|
||||
import ColoredCard from '../components/ColoredCard.vue';
|
||||
import ToolCard from '../components/ToolCard.vue';
|
||||
import { useToolStore } from '@/tools/tools.store';
|
||||
import { config } from '@/config';
|
||||
|
||||
const base = import.meta.env.BASE_URL ?? '/';
|
||||
const homeCustomMarkdown = computedAsync(async () => {
|
||||
try {
|
||||
const remoteCustomHomeMarkdownResponse = await fetch(`${base}home.custom.md`);
|
||||
if (remoteCustomHomeMarkdownResponse.ok) {
|
||||
return await remoteCustomHomeMarkdownResponse.text();
|
||||
}
|
||||
}
|
||||
catch {}
|
||||
return '';
|
||||
});
|
||||
|
||||
const toolStore = useToolStore();
|
||||
|
||||
useHead({ title: 'IT Tools - Handy online tools for developers' });
|
||||
@@ -87,6 +100,10 @@ function onUpdateFavoriteTools() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="homeCustomMarkdown">
|
||||
<VueMarkdown :source="homeCustomMarkdown" />
|
||||
</div>
|
||||
|
||||
<h3 class="mb-5px mt-25px font-500 text-neutral-400">
|
||||
{{ $t('home.categories.allTools') }}
|
||||
</h3>
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<script setup lang="ts">
|
||||
import mappingData from './ad-mapping.json';
|
||||
import { useFuzzySearch } from '@/composable/fuzzySearch';
|
||||
import useDebouncedRef from '@/composable/debouncedref';
|
||||
|
||||
const data = mappingData.map(i => ({ ...i, all: `${i.TAB} - ${i.ActiveDirectoryField}` }));
|
||||
const searchQuery = useDebouncedRef('', 500);
|
||||
|
||||
const { searchResult } = useFuzzySearch({
|
||||
search: searchQuery,
|
||||
data,
|
||||
options: {
|
||||
keys: ['all'],
|
||||
threshold: 0.2,
|
||||
isCaseSensitive: false,
|
||||
minMatchCharLength: 3,
|
||||
useExtendedSearch: true,
|
||||
filterEmpty: false,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div mx-auto max-w-2400px important:flex-1>
|
||||
<div flex items-center gap-3>
|
||||
<c-input-text
|
||||
v-model:value="searchQuery"
|
||||
placeholder="Search Active Directory LDAP mapping"
|
||||
mx-auto max-w-600px
|
||||
>
|
||||
<template #prefix>
|
||||
<icon-mdi-search mr-6px color-black op-70 dark:color-white />
|
||||
</template>
|
||||
</c-input-text>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div
|
||||
v-if="searchResult.length === 0"
|
||||
|
||||
mt-4 text-center text-20px font-bold
|
||||
>
|
||||
No results
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div mt-4 text-20px font-bold>
|
||||
Search result
|
||||
</div>
|
||||
|
||||
<n-table>
|
||||
<thead>
|
||||
<th>TAB</th>
|
||||
<th>Active Directory Field</th>
|
||||
<th>LDAP Attribute</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(result, ix) in searchResult" :key="ix">
|
||||
<td>
|
||||
<input-copyable :value="result.TAB" />
|
||||
</td>
|
||||
<td>
|
||||
<input-copyable :value="result.ActiveDirectoryField" />
|
||||
</td>
|
||||
<td>
|
||||
<input-copyable :value="result.LDAPAttribute" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</n-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,157 @@
|
||||
[
|
||||
{
|
||||
"TAB": "General",
|
||||
"ActiveDirectoryField": "First Name",
|
||||
"LDAPAttribute": "givenName"
|
||||
},
|
||||
{
|
||||
"TAB": "General",
|
||||
"ActiveDirectoryField": "Initials",
|
||||
"LDAPAttribute": "initials"
|
||||
},
|
||||
{
|
||||
"TAB": "General",
|
||||
"ActiveDirectoryField": "Last name",
|
||||
"LDAPAttribute": "sn"
|
||||
},
|
||||
{
|
||||
"TAB": "General",
|
||||
"ActiveDirectoryField": "Display name",
|
||||
"LDAPAttribute": "displayName"
|
||||
},
|
||||
{
|
||||
"TAB": "General",
|
||||
"ActiveDirectoryField": "Description",
|
||||
"LDAPAttribute": "description"
|
||||
},
|
||||
{
|
||||
"TAB": "General",
|
||||
"ActiveDirectoryField": "Office",
|
||||
"LDAPAttribute": "physicalDeliveryOfficeName"
|
||||
},
|
||||
{
|
||||
"TAB": "General",
|
||||
"ActiveDirectoryField": "Telephone number",
|
||||
"LDAPAttribute": "telephoneNumber"
|
||||
},
|
||||
{
|
||||
"TAB": "General",
|
||||
"ActiveDirectoryField": "E-mail",
|
||||
"LDAPAttribute": "mail"
|
||||
},
|
||||
{
|
||||
"TAB": "General",
|
||||
"ActiveDirectoryField": "Web page",
|
||||
"LDAPAttribute": "wWWHomePage"
|
||||
},
|
||||
{
|
||||
"TAB": "Address",
|
||||
"ActiveDirectoryField": "Street",
|
||||
"LDAPAttribute": "streetAddress"
|
||||
},
|
||||
{
|
||||
"TAB": "Address",
|
||||
"ActiveDirectoryField": "P.O Box",
|
||||
"LDAPAttribute": "postOfficeBox"
|
||||
},
|
||||
{
|
||||
"TAB": "Address",
|
||||
"ActiveDirectoryField": "City",
|
||||
"LDAPAttribute": "l"
|
||||
},
|
||||
{
|
||||
"TAB": "Address",
|
||||
"ActiveDirectoryField": "State/province",
|
||||
"LDAPAttribute": "St"
|
||||
},
|
||||
{
|
||||
"TAB": "Address",
|
||||
"ActiveDirectoryField": "Zip/Postal Code",
|
||||
"LDAPAttribute": "postalCode"
|
||||
},
|
||||
{
|
||||
"TAB": "Address",
|
||||
"ActiveDirectoryField": "County/region",
|
||||
"LDAPAttribute": "co"
|
||||
},
|
||||
{
|
||||
"TAB": "Account",
|
||||
"ActiveDirectoryField": "User logon name",
|
||||
"LDAPAttribute": "userPrincipalName"
|
||||
},
|
||||
{
|
||||
"TAB": "Account",
|
||||
"ActiveDirectoryField": "user logon name (pre-Windows 200)",
|
||||
"LDAPAttribute": "sAMAccountName"
|
||||
},
|
||||
{
|
||||
"TAB": "Profile",
|
||||
"ActiveDirectoryField": "Profile path",
|
||||
"LDAPAttribute": "profilePath"
|
||||
},
|
||||
{
|
||||
"TAB": "Profile",
|
||||
"ActiveDirectoryField": "Logon script",
|
||||
"LDAPAttribute": "scriptPath"
|
||||
},
|
||||
{
|
||||
"TAB": "Profile",
|
||||
"ActiveDirectoryField": "Local path",
|
||||
"LDAPAttribute": "homeDirectory"
|
||||
},
|
||||
{
|
||||
"TAB": "Profile",
|
||||
"ActiveDirectoryField": "Connect",
|
||||
"LDAPAttribute": "homeDrive"
|
||||
},
|
||||
{
|
||||
"TAB": "Telephones",
|
||||
"ActiveDirectoryField": "Home",
|
||||
"LDAPAttribute": "homePhone"
|
||||
},
|
||||
{
|
||||
"TAB": "Telephones",
|
||||
"ActiveDirectoryField": "Pager",
|
||||
"LDAPAttribute": "pager"
|
||||
},
|
||||
{
|
||||
"TAB": "Telephones",
|
||||
"ActiveDirectoryField": "Mobile",
|
||||
"LDAPAttribute": "Mobile"
|
||||
},
|
||||
{
|
||||
"TAB": "Telephones",
|
||||
"ActiveDirectoryField": "Fax",
|
||||
"LDAPAttribute": "facsimileTelephoneNumber"
|
||||
},
|
||||
{
|
||||
"TAB": "Telephones",
|
||||
"ActiveDirectoryField": "IP Phone",
|
||||
"LDAPAttribute": "ipPhone"
|
||||
},
|
||||
{
|
||||
"TAB": "Organization",
|
||||
"ActiveDirectoryField": "Job Title",
|
||||
"LDAPAttribute": "title"
|
||||
},
|
||||
{
|
||||
"TAB": "Organization",
|
||||
"ActiveDirectoryField": "Department",
|
||||
"LDAPAttribute": "department"
|
||||
},
|
||||
{
|
||||
"TAB": "Organization",
|
||||
"ActiveDirectoryField": "Company",
|
||||
"LDAPAttribute": "company"
|
||||
},
|
||||
{
|
||||
"TAB": "Organization",
|
||||
"ActiveDirectoryField": "Manager",
|
||||
"LDAPAttribute": "manager"
|
||||
},
|
||||
{
|
||||
"TAB": "Organization",
|
||||
"ActiveDirectoryField": "Direct Reports",
|
||||
"LDAPAttribute": "directreports"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Folder } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'ActiveDirectory LDAP properties searcher',
|
||||
path: '/ad-ldap-searcher',
|
||||
description: 'Search in mapping of LDAP properties and ActiveDirectory UI',
|
||||
keywords: ['active', 'directory', 'ad', 'ldap', 'prop', 'searcher'],
|
||||
component: () => import('./ad-ldap-searcher.vue'),
|
||||
icon: Folder,
|
||||
createdAt: new Date('2024-08-15'),
|
||||
category: 'Forensic',
|
||||
});
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import figlet from 'figlet';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
import { languages, translateToLanguage } from '@/utils/ascii-lang-utils';
|
||||
import { languages, printToLanguage } from '@/utils/ascii-lang-utils';
|
||||
|
||||
const input = ref('Ascii ART');
|
||||
const language = useStorage('ascii-text-drawer:language', 'raw');
|
||||
@@ -40,7 +40,7 @@ watchEffect(async () => {
|
||||
resolve(text ?? '');
|
||||
})));
|
||||
|
||||
output.value = translateToLanguage(rawOutput, languageValue);
|
||||
output.value = printToLanguage(rawOutput, languageValue);
|
||||
errored.value = false;
|
||||
}
|
||||
catch (e: any) {
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
<script setup lang="ts">
|
||||
import { Base64 } from 'js-base64';
|
||||
import hexArray from 'hex-array';
|
||||
import { useCopy } from '@/composable/copy';
|
||||
import { isValidBase64 } from '@/utils/base64';
|
||||
|
||||
const textInput = ref('');
|
||||
const base64Output = computed(() => {
|
||||
try {
|
||||
return Base64.fromUint8Array(hexArray.fromString(textInput.value));
|
||||
}
|
||||
catch (e: any) {
|
||||
return e.toString();
|
||||
}
|
||||
});
|
||||
const { copy: copyTextBase64 } = useCopy({ source: base64Output, text: 'Base64 Hex Array copied to the clipboard' });
|
||||
|
||||
const uppercase = ref(false);
|
||||
const grouping = ref(0);
|
||||
const rowlength = ref(0);
|
||||
|
||||
const base64Input = ref('');
|
||||
const textOutput = computed(() => {
|
||||
try {
|
||||
return hexArray.toString(Base64.toUint8Array(base64Input.value), {
|
||||
uppercase: uppercase.value,
|
||||
grouping: grouping.value,
|
||||
rowlength: rowlength.value,
|
||||
});
|
||||
}
|
||||
catch (e: any) {
|
||||
return e.toString();
|
||||
}
|
||||
},
|
||||
);
|
||||
const { copy: copyText } = useCopy({ source: textOutput, text: 'Hex Array copied to the clipboard' });
|
||||
const b64ValidationRules = [
|
||||
{
|
||||
message: 'Invalid base64 string',
|
||||
validator: (value: string) => isValidBase64(value.trim()),
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<c-card title="Hex Array to Base64">
|
||||
<c-input-text
|
||||
v-model:value="textInput"
|
||||
multiline
|
||||
placeholder="Put your Hex Array here..."
|
||||
rows="5"
|
||||
label="Hex Array to encode"
|
||||
raw-text
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<c-input-text
|
||||
label="Base64 of Hex Array"
|
||||
:value="base64Output"
|
||||
multiline
|
||||
readonly
|
||||
placeholder="The Base64 encoding of your Hex Array will be here"
|
||||
rows="5"
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<div flex justify-center>
|
||||
<c-button @click="copyTextBase64()">
|
||||
Copy Base64
|
||||
</c-button>
|
||||
</div>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Base64 to Hex Array">
|
||||
<n-space align="baseline" justify="center" mb-1>
|
||||
<n-form-item label="Uppercase" label-placement="left">
|
||||
<n-switch v-model:value="uppercase" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Group by" label-placement="left">
|
||||
<n-input-number v-model:value="grouping" :min="0" style="width: 6em" mr-1 /> digits (0 = no grouping)
|
||||
</n-form-item>
|
||||
<n-form-item label="Split as rows by" label-placement="left">
|
||||
<n-input-number v-model:value="rowlength" :min="0" style="width: 6em" mr-1 /> group of digits (0 = no rows)
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
<c-input-text
|
||||
v-model:value="base64Input"
|
||||
multiline
|
||||
placeholder="Your Base64 Hex Array..."
|
||||
rows="5"
|
||||
:validation-rules="b64ValidationRules"
|
||||
label="Base64 Hex Array to decode"
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<c-input-text
|
||||
v-model:value="textOutput"
|
||||
label="Decoded Hex Array"
|
||||
placeholder="The decoded Hex Array will be here"
|
||||
multiline
|
||||
rows="5"
|
||||
readonly
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<div flex justify-center>
|
||||
<c-button @click="copyText()">
|
||||
Copy Decoded Hex Array
|
||||
</c-button>
|
||||
</div>
|
||||
</c-card>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { FileDigit } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Base64 Hex array encoder/decoder',
|
||||
path: '/base64-hex-converter',
|
||||
description: 'Simply encode and decode Hex array into a their base64 representation.',
|
||||
keywords: ['base64', 'converter', 'conversion', 'web', 'data', 'format', 'atob', 'btoa', 'hex'],
|
||||
component: () => import('./base64-hex-converter.vue'),
|
||||
icon: FileDigit,
|
||||
createdAt: new Date('2025-02-09'),
|
||||
category: 'Converters',
|
||||
});
|
||||
@@ -7,7 +7,7 @@ const themeVars = useThemeVars();
|
||||
|
||||
const input = ref('');
|
||||
const saltCount = ref(10);
|
||||
const hashed = computed(() => hashSync(input.value, saltCount.value));
|
||||
const hashed = computed(() => hashSync(input.value, saltCount.value || 10));
|
||||
const { copy } = useCopy({ source: hashed, text: 'Hashed string copied to the clipboard' });
|
||||
|
||||
const compareString = ref('');
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { NCard, NForm, NFormItem, NInput } from 'naive-ui';
|
||||
|
||||
const bimiData = ref({
|
||||
domain: '',
|
||||
logoUrl: '',
|
||||
vmcUrl: '',
|
||||
});
|
||||
|
||||
const bimiRecord = computed(() => {
|
||||
if (!bimiData.value.domain || !bimiData.value.logoUrl) {
|
||||
return '';
|
||||
}
|
||||
|
||||
let record = `default._bimi.${bimiData.value.domain} IN TXT "v=BIMI1; l=${bimiData.value.logoUrl}`;
|
||||
|
||||
if (bimiData.value.vmcUrl) {
|
||||
record += `; a=${bimiData.value.vmcUrl}`;
|
||||
}
|
||||
|
||||
record += '"';
|
||||
|
||||
return record;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="BIMI DNS Record Generator">
|
||||
<NForm :model="bimiData" label-placement="left" label-width="150px">
|
||||
<NFormItem label="Domain:">
|
||||
<NInput v-model:value="bimiData.domain" placeholder="example.com" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Logo URL:">
|
||||
<NInput v-model:value="bimiData.logoUrl" placeholder="https://example.com/logo.svg" />
|
||||
</NFormItem>
|
||||
<NFormItem label="VMC Certificate URL:">
|
||||
<NInput v-model:value="bimiData.vmcUrl" placeholder="https://example.com/vmc.pem" />
|
||||
</NFormItem>
|
||||
</NForm>
|
||||
|
||||
<c-card title="Generated BIMI record">
|
||||
<textarea-copyable :value="bimiRecord" />
|
||||
</c-card>
|
||||
</NCard>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { World } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'BIMI DNS Generator',
|
||||
path: '/bimi-dns-generator',
|
||||
description: 'Generate BIMI DNS TXT record',
|
||||
keywords: ['bimi', 'dns', 'txt'],
|
||||
component: () => import('./bimi-dns-generator.vue'),
|
||||
icon: World,
|
||||
createdAt: new Date('2025-04-21'),
|
||||
category: 'Network',
|
||||
});
|
||||
@@ -0,0 +1,66 @@
|
||||
<script setup lang="ts">
|
||||
const units = ref('metric');
|
||||
const weight = ref<number | null>(null);
|
||||
const height = ref<number | null>(null);
|
||||
|
||||
const options = [
|
||||
{ label: 'Metric (kg, m)', value: 'metric' },
|
||||
{ label: 'US (lbs, in)', value: 'us' },
|
||||
];
|
||||
|
||||
const bmi = computed(() => {
|
||||
if (!weight.value || !height.value) {
|
||||
return null;
|
||||
}
|
||||
let convertedWeight = weight.value;
|
||||
let convertedHeight = height.value;
|
||||
|
||||
if (units.value === 'us') {
|
||||
convertedWeight = weight.value * 0.453592; // lbs to kg
|
||||
convertedHeight = height.value * 0.0254; // inches to meters
|
||||
}
|
||||
|
||||
return (convertedWeight / (convertedHeight * convertedHeight)).toFixed(2);
|
||||
});
|
||||
|
||||
const bmiCategory = computed(() => {
|
||||
if (!bmi.value) {
|
||||
return '';
|
||||
}
|
||||
const value = Number.parseFloat(bmi.value);
|
||||
if (value < 18.5) {
|
||||
return 'Underweight';
|
||||
}
|
||||
if (value < 24.999) {
|
||||
return 'Normal weight';
|
||||
}
|
||||
if (value < 29.999) {
|
||||
return 'Overweight';
|
||||
}
|
||||
if (value < 34.999) {
|
||||
return 'Class 1 Obesity';
|
||||
}
|
||||
if (value < 39.999) {
|
||||
return 'Class 2 Obesity';
|
||||
}
|
||||
return 'Severe Obesity (Class 3 Obesity)';
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<c-card title="BMI Calculator" max-w-800px>
|
||||
<c-select v-model:value="units" label="Select Units:" :options="options" mb-2 label-position="left" />
|
||||
<n-space justify="space-evenly">
|
||||
<n-form-item :label="`Weight (${(units === 'metric' ? 'kg' : 'lbs')}):`" label-placement="left" mb-2>
|
||||
<n-input-number v-model:value="weight" placeholder="Enter weight" />
|
||||
</n-form-item>
|
||||
<n-form-item :label="`Height (${(units === 'metric' ? 'm' : 'in')}):`" label-placement="left" mb-2>
|
||||
<n-input-number v-model:value="height" placeholder="Enter height" />
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
<c-card v-if="bmi" title="Result">
|
||||
<input-copyable label="BMI:" label-position="left" label-width="100px" :value="bmi" mb-1 />
|
||||
<input-copyable label="Category:" label-position="left" label-width="100px" :value="bmiCategory" />
|
||||
</c-card>
|
||||
</c-card>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { MedicalCross } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'BMI Calculator',
|
||||
path: '/bmi-calculator',
|
||||
description: 'Body Mass Index Calculator (us or metric units)',
|
||||
keywords: ['bmi', 'body', 'mass'],
|
||||
component: () => import('./bmi-calculator.vue'),
|
||||
icon: MedicalCross,
|
||||
createdAt: new Date('2025-04-21'),
|
||||
category: 'Data',
|
||||
});
|
||||
@@ -12,7 +12,7 @@ const [coinFlip, refreshCoinFlip] = computedRefreshable(() => ({
|
||||
<div>
|
||||
<Transition name="bounce" mode="out-in">
|
||||
<div :key="coinFlip.dt" flex items-center justify-center>
|
||||
<div flex items-center justify-center rounded-full outline style="width: 5em; height: 5em">
|
||||
<div style="width: 5em; height: 5em" mb-1 mt-1 flex items-center justify-center rounded-full outline>
|
||||
{{ coinFlip.coin }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,25 +1,49 @@
|
||||
<script setup lang="ts">
|
||||
import { contrastRatio, passesWCAG } from 'wcag-contrast-utils';
|
||||
import { apcaContrastValue, hex, wcag, wcagContrastValue } from 'a11y-color-contrast';
|
||||
import { useQueryParam } from '@/composable/queryParams';
|
||||
|
||||
const forecolor = useQueryParam({ name: 'fg', defaultValue: '#000' });
|
||||
const backcolor = useQueryParam({ name: 'bg', defaultValue: '#fff' });
|
||||
|
||||
const levels = [
|
||||
{ score: 3, text: 'Very poor', bg: '#fbd0da', fg: '#5f071c', stars: 1 },
|
||||
{ score: 4.5, text: 'Poor', bg: '#fbd0da', fg: '#5f071c', stars: 2 },
|
||||
{ score: 7, text: 'Good', bg: '#fbf5d0', fg: '#5f5207', stars: 3 },
|
||||
{ score: 12, text: 'Very good', bg: '#d2fbd0', fg: '#0d5f07', stars: 4 },
|
||||
{ score: 9999, text: 'Super', bg: '#d2fbd0', fg: '#0d5f07', stars: 5 },
|
||||
];
|
||||
const smallLevels = [
|
||||
{ score: 4.5, bg: '#fbd0da', fg: '#5f071c', stars: 1 },
|
||||
{ score: 7, bg: '#fbf5d0', fg: '#5f5207', stars: 2 },
|
||||
{ score: 9999, bg: '#d2fbd0', fg: '#0d5f07', stars: 3 },
|
||||
];
|
||||
const largeLevels = [
|
||||
{ score: 3, bg: '#fbd0da', fg: '#5f071c', stars: 1 },
|
||||
{ score: 4.5, bg: '#fbf5d0', fg: '#5f5207', stars: 2 },
|
||||
{ score: 9999, bg: '#d2fbd0', fg: '#0d5f07', stars: 3 },
|
||||
];
|
||||
|
||||
const result = computed(() => {
|
||||
try {
|
||||
const constrastValue = contrastRatio(forecolor.value, backcolor.value);
|
||||
const wcagLevel = passesWCAG(constrastValue);
|
||||
const fgHex = hex(forecolor.value);
|
||||
const bgHex = hex(backcolor.value);
|
||||
|
||||
const wcagLevel = wcagContrastValue(bgHex, fgHex);
|
||||
return {
|
||||
constrastValue,
|
||||
wcagLevel,
|
||||
wcag21ConstrastValue: wcagLevel,
|
||||
aaNormal: wcag(bgHex, fgHex, { level: 'AA', size: 'normal' }).pass,
|
||||
aaaNormal: wcag(bgHex, fgHex, { level: 'AAA', size: 'normal' }).pass,
|
||||
aaLarge: wcag(bgHex, fgHex, { level: 'AA', size: 'large' }).pass,
|
||||
aaaLarge: wcag(bgHex, fgHex, { level: 'AAA', size: 'large' }).pass,
|
||||
level: levels.find(l => wcagLevel < l.score),
|
||||
largeLevel: largeLevels.find(l => wcagLevel < l.score),
|
||||
smallLevel: smallLevels.find(l => wcagLevel < l.score),
|
||||
apcaContrastValue: apcaContrastValue(bgHex, fgHex),
|
||||
error: '',
|
||||
};
|
||||
}
|
||||
catch (e: any) {
|
||||
return {
|
||||
constrastValue: -1,
|
||||
wcagLevel: '',
|
||||
error: e.toString(),
|
||||
};
|
||||
}
|
||||
@@ -57,7 +81,57 @@ const result = computed(() => {
|
||||
{{ result.error }}
|
||||
</c-alert>
|
||||
|
||||
<input-copyable v-if="!result.error" readonly label="Constrast:" label-width="100px" label-position="left" :value="result.constrastValue" mb-2 />
|
||||
<input-copyable v-if="!result.error" readonly label="Level:" label-width="100px" label-position="left" :value="result.wcagLevel" />
|
||||
<c-card v-if="!result.error" title="WCAG 2.1">
|
||||
<input-copyable readonly label="WCAG Constrast:" label-width="130px" label-position="left" :value="result.wcag21ConstrastValue" mb-3 />
|
||||
|
||||
<n-form-item v-if="result.level" label="Contrast quality:" label-width="130px" label-placement="left">
|
||||
<n-tag :max="5" :color="{ color: result.level.bg, textColor: result.level.fg, borderColor: result.level.fg }" mr-2>
|
||||
<span>{{ result.wcag21ConstrastValue.toFixed(2) }} - {{ result.level.text }}</span>
|
||||
</n-tag>
|
||||
<n-tag :max="5" :color="{ color: result.level.bg, textColor: result.level.fg, borderColor: result.level.fg }">
|
||||
<n-rate :count="5" readonly :default-value="result.level.stars" :color="result.level.fg" />
|
||||
</n-tag>
|
||||
</n-form-item>
|
||||
<n-form-item v-if="result.smallLevel" label="Small texts:" label-width="130px" label-placement="left">
|
||||
<n-tag :color="{ color: result.smallLevel.bg, textColor: result.smallLevel.fg, borderColor: result.smallLevel.fg }">
|
||||
<n-rate :count="3" readonly :default-value="result.smallLevel.stars" :color="result.smallLevel.fg" />
|
||||
</n-tag>
|
||||
</n-form-item>
|
||||
<n-form-item v-if="result.largeLevel" label="Large texts:" label-width="130px" label-placement="left">
|
||||
<n-tag :color="{ color: result.largeLevel.bg, textColor: result.largeLevel.fg, borderColor: result.largeLevel.fg }">
|
||||
<n-rate :count="3" readonly :default-value="result.largeLevel.stars" :color="result.largeLevel.fg" />
|
||||
</n-tag>
|
||||
</n-form-item>
|
||||
|
||||
<c-card title="Normal text">
|
||||
<n-form-item label="WCAG 2.1 AA:" label-width="130px" label-placement="left">
|
||||
<n-tag :bordered="false" :type="result.aaNormal ? 'success' : 'error'">
|
||||
{{ result.aaNormal ? 'Pass' : 'Fail' }}
|
||||
</n-tag>
|
||||
</n-form-item>
|
||||
<n-form-item label="WCAG 2.1 AAA:" label-width="130px" label-placement="left">
|
||||
<n-tag :bordered="false" :type="result.aaaNormal ? 'success' : 'error'">
|
||||
{{ result.aaaNormal ? 'Pass' : 'Fail' }}
|
||||
</n-tag>
|
||||
</n-form-item>
|
||||
</c-card>
|
||||
<c-card title="Large text">
|
||||
<n-p><i>Text that is 14pt (18.67px) and bold or any text bigger than 18pt (24px) is defined as large scale text.</i></n-p>
|
||||
<n-form-item label="WCAG 2.1 AA:" label-width="130px" label-placement="left">
|
||||
<n-tag :bordered="false" :type="result.aaLarge ? 'success' : 'error'">
|
||||
{{ result.aaLarge ? 'Pass' : 'Fail' }}
|
||||
</n-tag>
|
||||
</n-form-item>
|
||||
<n-form-item label="WCAG 2.1 AAA:" label-width="130px" label-placement="left">
|
||||
<n-tag :bordered="false" :type="result.aaaLarge ? 'success' : 'error'">
|
||||
{{ result.aaaLarge ? 'Pass' : 'Fail' }}
|
||||
</n-tag>
|
||||
</n-form-item>
|
||||
</c-card>
|
||||
</c-card>
|
||||
|
||||
<c-card v-if="!result.error" title="APCA">
|
||||
<input-copyable readonly label="APCA Constrast:" label-width="130px" label-position="left" :value="result.apcaContrastValue" mb-2 />
|
||||
</c-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,41 @@
|
||||
<script lang="ts" setup>
|
||||
import { useQueryParam } from '@/composable/queryParams';
|
||||
|
||||
const cookieHeader = useQueryParam({ name: 'cookies', defaultValue: '' });
|
||||
|
||||
const parsedCookies = computed(() => {
|
||||
return (cookieHeader.value || '').replace(/^Cookie:\s*/, '').split('; ').map((cookie) => {
|
||||
const [name, ...values] = cookie.split('=');
|
||||
return { name, value: decodeURIComponent(values?.join('=') || '') };
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-card title="Cookie Parser">
|
||||
<n-space vertical>
|
||||
<n-input v-model:value="cookieHeader" placeholder="Enter cookie header" type="text" />
|
||||
</n-space>
|
||||
<n-p>
|
||||
Tip: Navigate to a website to test, open F12 Console and run <n-tag :bordered="false">
|
||||
<code>window.copy(document.cookie)</code>
|
||||
</n-tag>. This will copy the cookie string to your clipboard. Note: This will only copy cookies available to javascript (HTTP only and secure cookies will be omitted).
|
||||
</n-p>
|
||||
<n-table v-if="parsedCookies.length">
|
||||
<thead><tr><th>Name</th><th>Value</th></tr></thead>
|
||||
<tbody>
|
||||
<tr v-for="cookie in parsedCookies" :key="cookie.name">
|
||||
<td>
|
||||
<n-a :href="`https://cookiedatabase.org/?s=${cookie.name}`" target="_blank">
|
||||
{{ cookie.name }}
|
||||
</n-a>
|
||||
</td>
|
||||
<td>{{ cookie.value }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</n-table>
|
||||
<n-alert v-else type="warning">
|
||||
No cookies found
|
||||
</n-alert>
|
||||
</n-card>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Cookie } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Cookies Parser',
|
||||
path: '/cookies-parser',
|
||||
description: 'Parse Cookie HTTP Header',
|
||||
keywords: ['cookies', 'parser'],
|
||||
component: () => import('./cookies-parser.vue'),
|
||||
icon: Cookie,
|
||||
createdAt: new Date('2025-05-01'),
|
||||
category: 'Forensic',
|
||||
});
|
||||
@@ -0,0 +1,164 @@
|
||||
<script setup lang="ts">
|
||||
import { Countdown } from 'vue3-flip-countdown';
|
||||
import moment from 'moment';
|
||||
import { useQueryParam } from '@/composable/queryParams';
|
||||
|
||||
interface CountDown {
|
||||
d: number
|
||||
h: number
|
||||
m: number
|
||||
s: number
|
||||
}
|
||||
|
||||
function getCountDownHref(c: CountDown) {
|
||||
const parsedUrl = new URL(window.location.href);
|
||||
parsedUrl.searchParams.set('d', c.d.toString());
|
||||
parsedUrl.searchParams.set('h', c.h.toString());
|
||||
parsedUrl.searchParams.set('m', c.m.toString());
|
||||
parsedUrl.searchParams.set('s', c.s.toString());
|
||||
return parsedUrl.toString();
|
||||
}
|
||||
|
||||
const days = useQueryParam({ name: 'd', defaultValue: 0 });
|
||||
const hours = useQueryParam({ name: 'h', defaultValue: 0 });
|
||||
const minutes = useQueryParam({ name: 'm', defaultValue: 15 });
|
||||
const seconds = useQueryParam({ name: 's', defaultValue: 0 });
|
||||
const history = useStorage<CountDown[]>('countdown:hst', []);
|
||||
|
||||
const status = ref<'stopped' | 'ended' | 'running'>('stopped');
|
||||
|
||||
const audio = ref<HTMLAudioElement | null>(null);
|
||||
|
||||
watchEffect(() => {
|
||||
if (status.value === 'ended') {
|
||||
audio.value?.play();
|
||||
}
|
||||
});
|
||||
|
||||
const now = ref(moment());
|
||||
const deadlineDate = computed(() => {
|
||||
return now.value
|
||||
.add(days.value, 'd')
|
||||
.add(hours.value, 'h')
|
||||
.add(minutes.value, 'm')
|
||||
.add(seconds.value, 's')
|
||||
.toDate();
|
||||
});
|
||||
const fmt = 'YYYY-MM-DD HH:mm:ss';
|
||||
const deadlineFormatted = computed(() => {
|
||||
return now.value
|
||||
.add(days.value, 'd')
|
||||
.add(hours.value, 'h')
|
||||
.add(minutes.value, 'm')
|
||||
.add(seconds.value, 's')
|
||||
.format(fmt);
|
||||
});
|
||||
|
||||
function start() {
|
||||
now.value = moment();
|
||||
status.value = 'running';
|
||||
const histoEntry = { d: days.value, h: hours.value, m: minutes.value, s: seconds.value };
|
||||
if (!history.value.find(h => h.d === histoEntry.d && h.h === histoEntry.h && h.m === histoEntry.m && h.s === histoEntry.s)) {
|
||||
history.value = [histoEntry, ...history.value];
|
||||
}
|
||||
}
|
||||
|
||||
function stop() {
|
||||
status.value = 'stopped';
|
||||
audio.value?.pause();
|
||||
}
|
||||
|
||||
function ended() {
|
||||
if (status.value === 'running') {
|
||||
status.value = 'ended';
|
||||
}
|
||||
}
|
||||
|
||||
const isEnded = computed(() => status.value === 'ended');
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div max-w-600px>
|
||||
<c-card :disabled="status !== 'stopped'" title="Countdown time" mb-4>
|
||||
<div mb-4 flex justify-center gap-2>
|
||||
<n-input-number v-model:value="days" :min="0">
|
||||
<template #suffix>
|
||||
days
|
||||
</template>
|
||||
</n-input-number>
|
||||
<n-input-number v-model:value="hours" :min="0">
|
||||
<template #suffix>
|
||||
hours
|
||||
</template>
|
||||
</n-input-number>
|
||||
<n-input-number v-model:value="minutes" :min="0">
|
||||
<template #suffix>
|
||||
minutes
|
||||
</template>
|
||||
</n-input-number>
|
||||
<n-input-number v-model:value="seconds" :min="0">
|
||||
<template #suffix>
|
||||
seconds
|
||||
</template>
|
||||
</n-input-number>
|
||||
</div>
|
||||
|
||||
<div flex justify-center>
|
||||
<c-button
|
||||
@click="start"
|
||||
>
|
||||
Start
|
||||
</c-button>
|
||||
</div>
|
||||
</c-card>
|
||||
|
||||
<Countdown :deadline="deadlineFormatted" :stop="status !== 'running'" mb-2 @time-elapsed="ended()" />
|
||||
|
||||
<n-p align="center">
|
||||
Alarm at: {{ deadlineDate }}
|
||||
</n-p>
|
||||
|
||||
<div mb-2 flex justify-center>
|
||||
<c-button
|
||||
:disabled="status === 'stopped'"
|
||||
@click="stop"
|
||||
>
|
||||
Stop
|
||||
</c-button>
|
||||
</div>
|
||||
|
||||
<n-modal v-model:show="isEnded" mask-closable="false">
|
||||
<n-card
|
||||
style="width: 600px"
|
||||
title="Timer finished"
|
||||
:bordered="false"
|
||||
size="huge"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
>
|
||||
<p>Timer ellapsed!</p>
|
||||
<template #footer>
|
||||
<n-button @click="stop()">
|
||||
OK
|
||||
</n-button>
|
||||
</template>
|
||||
</n-card>
|
||||
</n-modal>
|
||||
|
||||
<c-card v-if="history" title="History">
|
||||
<div flex justify-center gap-1>
|
||||
<template v-for="(entry, index) in history" :key="index">
|
||||
{{ index > 0 ? ' / ' : '' }}
|
||||
<n-a :href="getCountDownHref(entry)">
|
||||
{{ entry.d > 0 ? `${entry.d} days` : '' }}
|
||||
{{ entry.h > 0 ? `${entry.h}h` : '' }}
|
||||
{{ entry.m > 0 ? `${entry.m}m` : '' }}
|
||||
{{ entry.s > 0 ? `${entry.s}s` : '' }}
|
||||
</n-a>
|
||||
</template>
|
||||
</div>
|
||||
</c-card>
|
||||
|
||||
<audio ref="audio" loop src="/Beep.mp3" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Alarm } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Countdown',
|
||||
path: '/countdown',
|
||||
description: 'Countdown and alarm at ellapsed duration',
|
||||
keywords: ['countdown'],
|
||||
component: () => import('./countdown.vue'),
|
||||
icon: Alarm,
|
||||
createdAt: new Date('2025-03-09'),
|
||||
category: 'Datetime',
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
declare module "vue3-flip-countdown" {
|
||||
export function Countdown(): any;
|
||||
}
|
||||
@@ -36,25 +36,25 @@ const commonHelpers = [
|
||||
{
|
||||
symbol: '*',
|
||||
meaning: 'Any value',
|
||||
example: '* * * *',
|
||||
example: '* * * * *',
|
||||
equivalent: 'Every minute',
|
||||
},
|
||||
{
|
||||
symbol: '-',
|
||||
meaning: 'Range of values',
|
||||
example: '1-10 * * *',
|
||||
example: '1-10 * * * *',
|
||||
equivalent: 'Minutes 1 through 10',
|
||||
},
|
||||
{
|
||||
symbol: ',',
|
||||
meaning: 'List of values',
|
||||
example: '1,10 * * *',
|
||||
example: '1,10 * * * *',
|
||||
equivalent: 'At minutes 1 and 10',
|
||||
},
|
||||
{
|
||||
symbol: '/',
|
||||
meaning: 'Step values',
|
||||
example: '*/10 * * *',
|
||||
example: '*/10 * * * *',
|
||||
equivalent: 'Every 10 minutes',
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useThemeVars } from 'naive-ui';
|
||||
import Memo from './css-selectors-memo.md';
|
||||
import Memo from './css-selectors.md';
|
||||
|
||||
const themeVars = useThemeVars();
|
||||
</script>
|
||||
|
||||
File renamed without changes.
@@ -0,0 +1,130 @@
|
||||
<script lang="ts" setup>
|
||||
import { convertCsvToArray } from '../csv-to-json/csv-to-json.service';
|
||||
import { objectArrayToData } from '@/utils/objectarray.export';
|
||||
import type { ExportFormat } from '@/utils/objectarray.export';
|
||||
|
||||
const inputType = ref<'file' | 'content'>('file');
|
||||
const csvContent = ref('');
|
||||
const fileInput = ref() as Ref<File | null>;
|
||||
const error = ref('');
|
||||
|
||||
const convertedData = ref<string>('');
|
||||
const selectedFormat = ref<string>('json');
|
||||
const tableName = ref<string>('TableName');
|
||||
const nestify = ref(false);
|
||||
const typedValues = ref(false);
|
||||
|
||||
const formats = [
|
||||
{ label: 'JSON', value: 'json' },
|
||||
{ label: 'YAML', value: 'yaml' },
|
||||
{ label: 'SQL INSERT', value: 'sql' },
|
||||
{ label: 'CSV (comma)', value: 'csv' },
|
||||
{ label: 'CSV (semicolon)', value: 'csv_semicolon' },
|
||||
{ label: 'CSV (tab)', value: 'tsv' },
|
||||
{ label: 'Markdown', value: 'markdown' },
|
||||
{ label: 'XML', value: 'xml' },
|
||||
];
|
||||
|
||||
async function handleFileUpload(file: File) {
|
||||
if (file) {
|
||||
fileInput.value = file;
|
||||
}
|
||||
}
|
||||
|
||||
function readFileAsString(file: File) {
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
const fr = new FileReader();
|
||||
fr.onload = () => {
|
||||
resolve(fr.result as string || '');
|
||||
};
|
||||
fr.onerror = reject;
|
||||
fr.readAsText(file);
|
||||
});
|
||||
}
|
||||
|
||||
async function convertFile() {
|
||||
let csvContentValue = csvContent.value;
|
||||
const file = fileInput.value;
|
||||
error.value = '';
|
||||
try {
|
||||
if (inputType.value === 'file' && file) {
|
||||
csvContentValue = await readFileAsString(file);
|
||||
}
|
||||
|
||||
const data = convertCsvToArray(csvContentValue, typedValues.value);
|
||||
convertedData.value = objectArrayToData(data, selectedFormat.value as ExportFormat, {
|
||||
tableName: tableName.value,
|
||||
nestify: nestify.value,
|
||||
});
|
||||
}
|
||||
catch (e: any) {
|
||||
error.value = e.toString();
|
||||
return null;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="CSV Converter">
|
||||
<c-card>
|
||||
<n-radio-group v-model:value="inputType" name="radiogroup" mb-2 flex justify-center>
|
||||
<n-space>
|
||||
<n-radio
|
||||
value="file"
|
||||
label="File"
|
||||
/>
|
||||
<n-radio
|
||||
value="content"
|
||||
label="Content"
|
||||
/>
|
||||
</n-space>
|
||||
</n-radio-group>
|
||||
|
||||
<c-file-upload
|
||||
v-if="inputType === 'file'"
|
||||
accept=".csv,.tsv"
|
||||
title="Drag and drop a CSV file here, or click to select a file"
|
||||
@file-upload="handleFileUpload"
|
||||
/>
|
||||
|
||||
<c-input-text
|
||||
v-if="inputType === 'content'"
|
||||
v-model:value="csvContent"
|
||||
label="Paste your CSV Content:"
|
||||
placeholder="Your CSV..."
|
||||
multiline
|
||||
rows="8"
|
||||
data-test-id="input"
|
||||
/>
|
||||
</c-card>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-form-item label="Typed Values" label-placement="left">
|
||||
<n-checkbox v-model:checked="typedValues" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Nestify ('a.b.c' to nested objects)" label-placement="left">
|
||||
<n-checkbox v-model:checked="nestify" />
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
|
||||
<NFormItem label="Select output format:" label-placement="left">
|
||||
<NSelect v-model:value="selectedFormat" :options="formats" placeholder="Select format" />
|
||||
</NFormItem>
|
||||
|
||||
<c-input-text v-if="selectedFormat === 'sql'" v-model:value="tableName" label="Table Name:" label-placement="left" />
|
||||
|
||||
<div mt-3 flex justify-center>
|
||||
<NButton :disabled="!((inputType === 'file' && fileInput) || csvContent)" @click="convertFile">
|
||||
Convert
|
||||
</NButton>
|
||||
</div>
|
||||
|
||||
<c-alert v-if="error">
|
||||
{{ error }}
|
||||
</c-alert>
|
||||
|
||||
<c-card v-if="convertedData" title="Converted data">
|
||||
<textarea-copyable :value="convertedData" :language="selectedFormat" />
|
||||
</c-card>
|
||||
</NCard>
|
||||
</template>
|
||||
@@ -0,0 +1,14 @@
|
||||
import { TableExport } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Csv to Data',
|
||||
path: '/csv-to-data',
|
||||
description: 'Convert CSV file to JSON, YAML, CSV, SQL INSERT, XML or Markdown',
|
||||
keywords: ['excel', 'csv', 'xlsx', 'sql', 'json', 'yaml', 'insert', 'markdown', 'md', 'tsv', 'xml'],
|
||||
component: () => import('./csv-to-data.vue'),
|
||||
icon: TableExport,
|
||||
createdAt: new Date('2025-05-01'),
|
||||
redirectFrom: ['/csv-to-json'],
|
||||
category: 'Converters',
|
||||
});
|
||||
@@ -4,15 +4,27 @@ import { convertCsvToArray, getHeaders } from './csv-to-json.service';
|
||||
describe('csv-to-json service', () => {
|
||||
describe('getHeaders', () => {
|
||||
it('extracts all the keys from the first line of the CSV', () => {
|
||||
expect(getHeaders('a,b,c\n1,2,3\n4,5,6')).toEqual(['a', 'b', 'c']);
|
||||
expect(getHeaders('a,b,c\n1,2,3\n4,5,6', ',')).toEqual(['a', 'b', 'c']);
|
||||
});
|
||||
|
||||
it('returns an empty array if the CSV is empty', () => {
|
||||
expect(getHeaders('')).toEqual([]);
|
||||
expect(getHeaders('', ',')).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('convertCsvToArray', () => {
|
||||
it('detects and converts with different separators', () => {
|
||||
const res = [
|
||||
{ a: '1', b: '2' },
|
||||
{ a: '3', b: '4' },
|
||||
];
|
||||
|
||||
expect(convertCsvToArray('a,b\n1,2\n3,4')).toEqual(res);
|
||||
expect(convertCsvToArray('a;b\n1;2\n3;4')).toEqual(res);
|
||||
expect(convertCsvToArray('a\tb\n1\t2\n3\t4')).toEqual(res);
|
||||
expect(convertCsvToArray('a|b\n1|2\n3|4')).toEqual(res);
|
||||
});
|
||||
|
||||
it('converts a CSV string to an array of objects', () => {
|
||||
const csv = 'a,b\n1,2\n3,4';
|
||||
|
||||
@@ -22,6 +34,16 @@ describe('csv-to-json service', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it('converts a CSV string to an array of typed objects', () => {
|
||||
const csv = 'a,b\n1,2\ntrue, false\ntruc, bidule';
|
||||
|
||||
expect(convertCsvToArray(csv, true)).toEqual([
|
||||
{ a: 1, b: 2 },
|
||||
{ a: true, b: false },
|
||||
{ a: 'truc', b: 'bidule' },
|
||||
]);
|
||||
});
|
||||
|
||||
it('converts a CSV string with different keys to an array of objects', () => {
|
||||
const csv = 'a,b,c\n1,2,\n3,,4';
|
||||
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
import detectCSV from 'detect-csv';
|
||||
|
||||
export { getHeaders, convertCsvToArray };
|
||||
|
||||
function getHeaders(csv: string): string[] {
|
||||
function getHeaders(csv: string, delimiter: string): string[] {
|
||||
if (csv.trim() === '') {
|
||||
return [];
|
||||
}
|
||||
|
||||
const firstLine = csv.split('\n')[0];
|
||||
return firstLine.split(/[,;]/).map(header => header.trim());
|
||||
return firstLine.split(new RegExp(`[${delimiter}]`)).map(header => header.trim());
|
||||
}
|
||||
function deserializeValue(value: string): unknown {
|
||||
function deserializeValue(value: string, tryParseValues: boolean): unknown {
|
||||
if (value === 'null') {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (value === '') {
|
||||
if (value === '' || typeof value === 'undefined') {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -23,18 +25,26 @@ function deserializeValue(value: string): unknown {
|
||||
return valueAsString.slice(1, -1);
|
||||
}
|
||||
|
||||
return valueAsString;
|
||||
if (!tryParseValues) {
|
||||
return valueAsString;
|
||||
}
|
||||
try {
|
||||
return JSON.parse(valueAsString);
|
||||
}
|
||||
catch (_) {
|
||||
return valueAsString;
|
||||
}
|
||||
}
|
||||
|
||||
function convertCsvToArray(csv: string): Record<string, unknown>[] {
|
||||
const lines = csv.split('\n');
|
||||
const headers = getHeaders(csv);
|
||||
function convertCsvToArray(csv: string, tryParseValues: boolean = false): Record<string, unknown>[] {
|
||||
const delimiter = detectCSV(csv)?.delimiter || ',';
|
||||
const headers = getHeaders(csv, delimiter);
|
||||
|
||||
return lines.slice(1).map((line) => {
|
||||
return csv.split('\n').slice(1).map((line) => {
|
||||
// Split on comma or semicolon not within quotes
|
||||
const data = line.split(/[,;](?=(?:(?:[^"]*"){2})*[^"]*$)/).map(value => value.trim());
|
||||
const data = line.split(new RegExp(`[${delimiter}](?=(?:(?:[^"]*"){2})*[^"]*$)`)).map(value => value.trim());
|
||||
return headers.reduce((obj, header, index) => {
|
||||
obj[header] = deserializeValue(data[index]);
|
||||
obj[header] = deserializeValue(data[index], tryParseValues);
|
||||
return obj;
|
||||
}, {} as Record<string, unknown>);
|
||||
});
|
||||
|
||||
@@ -4,24 +4,29 @@ import FormatTransformer from '@/components/FormatTransformer.vue';
|
||||
import type { UseValidationRule } from '@/composable/validation';
|
||||
import { withDefaultOnError } from '@/utils/defaults';
|
||||
|
||||
const typedValues = ref(false);
|
||||
|
||||
function transformer(value: string) {
|
||||
return withDefaultOnError(() => {
|
||||
if (value === '') {
|
||||
return '';
|
||||
}
|
||||
return JSON.stringify(convertCsvToArray(value), null, 2);
|
||||
return JSON.stringify(convertCsvToArray(value, typedValues.value), null, 2);
|
||||
}, '');
|
||||
}
|
||||
|
||||
const rules: UseValidationRule<string>[] = [
|
||||
{
|
||||
validator: (v: string) => v === '' || ((v.includes(',') || v.includes(';')) && v.includes('\n')),
|
||||
validator: (v: string) => v === '' || ((v.includes(',') || v.includes(';') || v.includes('\t') || v.includes('|')) && v.includes('\n')),
|
||||
message: 'Provided CSV is not valid.',
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-form-item label="Typed Values" label-placement="left">
|
||||
<n-checkbox v-model:checked="typedValues" />
|
||||
</n-form-item>
|
||||
<FormatTransformer
|
||||
input-label="Your raw CSV"
|
||||
input-placeholder="Paste your raw CSV here..."
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
declare module "detect-csv" {
|
||||
export default function DetectCSV(content: string): Nullable<{
|
||||
delimiter: string
|
||||
newline: string
|
||||
}>
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<script setup lang="ts">
|
||||
import JSON5 from 'json5';
|
||||
import { useValidation } from '@/composable/validation';
|
||||
|
||||
const url = ref('');
|
||||
const method = ref('POST'); // Default method set to POST for body support
|
||||
const bodyType = ref('json'); // Default body type
|
||||
const jsonData = ref('');
|
||||
|
||||
const headers = ref([{ key: '', value: '' }]);
|
||||
const formData = ref([{ key: '', value: '' }]);
|
||||
|
||||
const methods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'];
|
||||
|
||||
const optionsList = [
|
||||
{ key: 'compressed', description: 'Request compressed response' },
|
||||
{ key: 'compressed-ssh', description: 'Enable SSH compression' },
|
||||
{ key: 'fail', description: 'Fail silently on HTTP errors' },
|
||||
{ key: 'fail-early', description: 'Fail on first transfer error, do not continue' },
|
||||
{ key: 'head', description: 'Show document info only' },
|
||||
{ key: 'include', description: 'Include protocol response headers in output' },
|
||||
{ key: 'insecure', description: 'Allow insecure server connections when using SSL' },
|
||||
{ key: 'ipv4', description: 'Resolve names to IPv4 addresses' },
|
||||
{ key: 'ipv6', description: 'Resolve names to IPv6 addresses' },
|
||||
{ key: 'list-only', description: 'List only mode' },
|
||||
{ key: 'location', description: 'Follow redirects' },
|
||||
{ key: 'location-trusted', description: 'Follow redirects and send auth to other hosts' },
|
||||
{ key: 'no-keepalive', description: 'Disable TCP keepalive on connection' },
|
||||
{ key: 'show-error', description: 'Show error even when silent mode is used' },
|
||||
{ key: 'silent', description: 'Suppress output' },
|
||||
{ key: 'ssl', description: 'Try SSL/TLS connection' },
|
||||
{ key: 'sslv2', description: 'Use SSLv2' },
|
||||
{ key: 'sslv3', description: 'Use SSLv3' },
|
||||
{ key: 'verbose', description: 'Increase output verbosity' },
|
||||
];
|
||||
|
||||
const selectedOptions = ref<Record<string, boolean>>({});
|
||||
|
||||
const curlCommand = computed(() => {
|
||||
let command = `curl -X ${method.value} "${url.value}"`;
|
||||
|
||||
headers.value.forEach(({ key, value }) => {
|
||||
if (key && value) {
|
||||
command += ` -H "${key}: ${value}"`;
|
||||
}
|
||||
});
|
||||
|
||||
if (bodyType.value === 'json' && jsonData.value) {
|
||||
command += ` -H "Content-Type: application/json" --data '${JSON.stringify(JSON5.parse(jsonData.value))}'`;
|
||||
}
|
||||
else if (bodyType.value === 'form-data') {
|
||||
formData.value.forEach(({ key, value }) => {
|
||||
if (key && value) {
|
||||
command += ` -F "${key}=${value}"`;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
optionsList.forEach(({ key }) => {
|
||||
if (selectedOptions.value[key]) {
|
||||
command += ` --${key}`;
|
||||
}
|
||||
});
|
||||
|
||||
return command;
|
||||
});
|
||||
|
||||
const jsonBodyValidation = useValidation({
|
||||
source: jsonData,
|
||||
rules: [
|
||||
{
|
||||
message: 'Invalid JSON string',
|
||||
validator: value => !value || JSON5.parse(value),
|
||||
},
|
||||
],
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<NFormItem label="Url:" label-placement="left">
|
||||
<NInput v-model:value="url" placeholder="Enter URL" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Method:" label-placement="left">
|
||||
<NSelect v-model:value="method" :options="methods.map(m => ({ label: m, value: m }))" />
|
||||
</NFormItem>
|
||||
|
||||
<NRadioGroup v-model:value="bodyType" mb-2>
|
||||
<NRadio value="json">
|
||||
JSON Body
|
||||
</NRadio>
|
||||
<NRadio value="form-data">
|
||||
Multipart Form-Data
|
||||
</NRadio>
|
||||
</NRadioGroup>
|
||||
|
||||
<c-card v-if="bodyType === 'json'" title="JSON Body:" mb-2>
|
||||
<c-input-text
|
||||
v-model:value="jsonData" multiline rows="6"
|
||||
placeholder="Enter JSON body" :validation="jsonBodyValidation"
|
||||
/>
|
||||
</c-card>
|
||||
|
||||
<c-card v-else title="Form entries:" mb-2>
|
||||
<NDynamicInput v-model:value="formData" preset="pair" key-placeholder="Key" value-placeholder="Value" />
|
||||
</c-card>
|
||||
|
||||
<c-card title="HTTP Headers:" mb-2>
|
||||
<NDynamicInput v-model:value="headers" preset="pair" key-placeholder="Header" value-placeholder="Value" />
|
||||
</c-card>
|
||||
|
||||
<c-card title="Options:" mb-2>
|
||||
<template v-for="option in optionsList" :key="option.key">
|
||||
<NCheckbox v-model:checked="selectedOptions[option.key]">
|
||||
{{ `--${option.key}` }} <em>({{ option.description }})</em>
|
||||
</NCheckbox>
|
||||
</template>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Generated curl command">
|
||||
<textarea-copyable :value="curlCommand" />
|
||||
</c-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Download } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Curl Command Generator',
|
||||
path: '/curl-generator',
|
||||
description: 'Generate CURL command lines',
|
||||
keywords: ['curl'],
|
||||
component: () => import('./curl-generator.vue'),
|
||||
icon: Download,
|
||||
createdAt: new Date('2025-04-21'),
|
||||
category: 'Network',
|
||||
});
|
||||
@@ -0,0 +1,156 @@
|
||||
<script setup lang="ts">
|
||||
import { type Faker, allFakers } from '@faker-js/faker';
|
||||
import JSON5 from 'json5';
|
||||
import { objectArrayToData } from '@/utils/objectarray.export';
|
||||
import type { ExportFormat } from '@/utils/objectarray.export';
|
||||
import type { UseValidationRule } from '@/composable/validation';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const jsonInput = useQueryParamOrStorage({
|
||||
name: 'template',
|
||||
storageName: 'faker:tmpl',
|
||||
defaultValue: JSON.stringify({
|
||||
name: 'faker.person.fullName',
|
||||
email: 'faker.internet.email',
|
||||
address: {
|
||||
street: 'faker.location.streetAddress',
|
||||
city: 'faker.location.city',
|
||||
country: 'faker.location.country',
|
||||
},
|
||||
phone: 'faker.phone.number',
|
||||
}, null, 2),
|
||||
});
|
||||
|
||||
const generatedData = ref<string>('');
|
||||
const itemCount = useQueryParamOrStorage({ name: 'count', storageName: 'faker:c', defaultValue: 1 });
|
||||
const error = ref('');
|
||||
const selectedFormat = useQueryParamOrStorage({ name: 'fmt', storageName: 'faker:f', defaultValue: 'json' });
|
||||
const tableName = ref<string>('TableName');
|
||||
const nestify = ref(false);
|
||||
|
||||
const allLocales = Object.keys(allFakers);
|
||||
const selectedLocale = useQueryParamOrStorage({ name: 'locale', storageName: 'faker:l', defaultValue: 'en' });
|
||||
const faker = computed(() => (allFakers as Record<string, Faker>)[selectedLocale.value]);
|
||||
|
||||
const formats = [
|
||||
{ label: 'JSON', value: 'json' },
|
||||
{ label: 'YAML', value: 'yaml' },
|
||||
{ label: 'SQL INSERT', value: 'sql' },
|
||||
{ label: 'CSV (comma)', value: 'csv' },
|
||||
{ label: 'CSV (semicolon)', value: 'csv_semicolon' },
|
||||
{ label: 'CSV (tab)', value: 'tsv' },
|
||||
{ label: 'Markdown', value: 'markdown' },
|
||||
{ label: 'XML', value: 'xml' },
|
||||
];
|
||||
|
||||
// Extract all faker methods dynamically
|
||||
const fakerMethods = computed(() => {
|
||||
const methods: string[] = [];
|
||||
const fakerObj = (faker as Record<string, any>);
|
||||
Object.keys(fakerObj).forEach((category) => {
|
||||
if (typeof fakerObj[category] === 'object') {
|
||||
Object.keys(fakerObj[category]).forEach((method) => {
|
||||
methods.push(`faker.${category}.${method}`);
|
||||
});
|
||||
}
|
||||
});
|
||||
return methods.map(method => ({ label: method, value: method }));
|
||||
});
|
||||
|
||||
// Selected faker method for insertion
|
||||
const selectedMethod = ref<string>('');
|
||||
|
||||
function resolveFakerValue(value: string) {
|
||||
try {
|
||||
return value.startsWith('faker.')
|
||||
? value.split('.').slice(1).reduce((acc: any, prop: string) => acc[prop], faker.value)()
|
||||
: value;
|
||||
}
|
||||
catch {
|
||||
return value; // Fallback for invalid faker function names
|
||||
}
|
||||
}
|
||||
|
||||
function generateFakeData(template: Record<string, any>): Record<string, any> {
|
||||
return Object.entries(template).reduce((result, [key, value]) => {
|
||||
result[key] = typeof value === 'object' && value !== null
|
||||
? generateFakeData(value) // Recursive handling for nested objects
|
||||
: resolveFakerValue(value);
|
||||
return result;
|
||||
}, {} as Record<string, any>);
|
||||
}
|
||||
|
||||
function handleGenerate() {
|
||||
try {
|
||||
error.value = '';
|
||||
const parsedTemplate = JSON.parse(jsonInput.value);
|
||||
generatedData.value = objectArrayToData(
|
||||
Array.from({ length: itemCount.value },
|
||||
() => generateFakeData(parsedTemplate)),
|
||||
selectedFormat.value as ExportFormat, {
|
||||
tableName: tableName.value,
|
||||
nestify: nestify.value,
|
||||
});
|
||||
}
|
||||
catch (e: any) {
|
||||
error.value = e.toString();
|
||||
}
|
||||
}
|
||||
|
||||
function insertMethodIntoJson() {
|
||||
if (selectedMethod.value) {
|
||||
jsonInput.value = jsonInput.value.replace(/\n?\}$/, `,\n "newField": "${selectedMethod.value}"\n}`);
|
||||
}
|
||||
}
|
||||
|
||||
const rules: UseValidationRule<string>[] = [
|
||||
{
|
||||
validator: (v: string) => v === '' || JSON5.parse(v),
|
||||
message: 'Provided JSON is not valid.',
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="Fake Data Generator">
|
||||
<c-input-text v-model:value="jsonInput" label="JSON Template:" multiline mb-1 rows="10" placeholder="Enter JSON template..." :validation-rules="rules" />
|
||||
|
||||
<c-card title="Faker Method insertion" mb-1>
|
||||
<n-space>
|
||||
<c-select v-model:value="selectedMethod" style="width: 200px" :options="fakerMethods" searchable placeholder="Search Faker Method" />
|
||||
<NButton @click="insertMethodIntoJson">
|
||||
Insert Selected Method
|
||||
</NButton>
|
||||
</n-space>
|
||||
</c-card>
|
||||
|
||||
<n-space mb-1>
|
||||
<NFormItem label="Number of objects to generate:" label-placement="left">
|
||||
<NInputNumber v-model:value="itemCount" :min="1" placeholder="Number of objects to generate" />
|
||||
</NFormItem>
|
||||
<n-form-item label="Nestify (handle nested objects)" label-placement="left">
|
||||
<n-checkbox v-model:checked="nestify" />
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
|
||||
<c-select v-model:value="selectedLocale" label="Locale:" label-position="left" :options="allLocales" searchable mb-1 placeholder="Search locale version" />
|
||||
|
||||
<NFormItem label="Select output format:" label-placement="left" mb-1>
|
||||
<NSelect v-model:value="selectedFormat" :options="formats" placeholder="Select format" />
|
||||
</NFormItem>
|
||||
|
||||
<c-input-text v-if="selectedFormat === 'sql'" v-model:value="tableName" label="Table Name:" label-placement="left" mb-1 />
|
||||
|
||||
<NButton mb-2 mt-2 @click="handleGenerate">
|
||||
Generate Fake Data
|
||||
</NButton>
|
||||
|
||||
<c-alert v-if="error">
|
||||
{{ error }}
|
||||
</c-alert>
|
||||
|
||||
<c-card v-if="generatedData" title="Generated data">
|
||||
<textarea-copyable :value="generatedData" :language="selectedFormat" />
|
||||
</c-card>
|
||||
</NCard>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { ArrowsShuffle } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Data Faker',
|
||||
path: '/data-faker',
|
||||
description: 'Generate fake data using JSON template',
|
||||
keywords: ['data', 'json', 'sample', 'faker'],
|
||||
component: () => import('./data-faker.vue'),
|
||||
icon: ArrowsShuffle,
|
||||
createdAt: new Date('2025-05-01'),
|
||||
category: 'Development',
|
||||
});
|
||||
@@ -53,6 +53,13 @@ const convertedValue = computed(() => {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<n-p text-center>
|
||||
1MiB = 1024KiB ; 1MB = 1000kB ; 1GiB = 1024MiB ; 1GB = 1000MB ;
|
||||
<n-a href="https://en.wikipedia.org/wiki/Byte" target="_blank" rel="noopener">
|
||||
see here for details
|
||||
</n-a>
|
||||
</n-p>
|
||||
|
||||
<c-card>
|
||||
<n-form-item label="Input Size:" label-placement="left" mb-1>
|
||||
<c-input-text
|
||||
|
||||
@@ -142,6 +142,13 @@ const amountTransferableOutput = computed(() => {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<n-p text-center>
|
||||
1MiB = 1024KiB ; 1MB = 1000kB ; 1GiB = 1024MiB ; 1GB = 1000MB ;
|
||||
<n-a href="https://en.wikipedia.org/wiki/Byte" target="_blank" rel="noopener">
|
||||
see here for details
|
||||
</n-a>
|
||||
</n-p>
|
||||
|
||||
<c-card title="Transfer Time" mb-2>
|
||||
<n-form-item label="Data Size:" label-placement="left">
|
||||
<n-input v-model:value="transferTimeInput.dataSize" placeholder="Data Size..." :min="0" w-full />
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { countBy, orderBy } from 'lodash';
|
||||
|
||||
const inputText = ref('');
|
||||
const sortedWordCounts = computed(() => {
|
||||
// Remove punctuation, extract words, count occurrences
|
||||
const cleanedText = inputText.value.replace(/\p{P}+\s|\s\p{P}+|\p{P}+$|^\p{P}+|\s+/gu, ' ').trim(); // Remove punctuation
|
||||
const wordCountObj = countBy(cleanedText.split(' ') || []);
|
||||
|
||||
// Convert to array and sort by count descending
|
||||
return orderBy(Object.entries(wordCountObj), ([, count]) => count, 'desc');
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-input-text v-model:value="inputText" multiline rows="10" label="Text:" placeholder="Enter text..." mb-1 />
|
||||
<c-card title="Distinct words">
|
||||
<n-table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Word</th>
|
||||
<th>Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="([word, count]) in sortedWordCounts" :key="word">
|
||||
<td>{{ word }}</td><td>{{ count }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</n-table>
|
||||
</c-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { FileText } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Distinct Words',
|
||||
path: '/distinct-words',
|
||||
description: 'Extract and count occurences of each unique word in a text',
|
||||
keywords: ['distinct', 'words'],
|
||||
component: () => import('./distinct-words.vue'),
|
||||
icon: FileText,
|
||||
createdAt: new Date('2025-05-01'),
|
||||
category: 'Text',
|
||||
});
|
||||
@@ -0,0 +1,86 @@
|
||||
<script setup lang="ts">
|
||||
import { NForm, NFormItem, NInput, NSelect } from 'naive-ui';
|
||||
import { generateKeyPair } from '../rsa-key-pair-generator/rsa-key-pair-generator.service';
|
||||
import { withDefaultOnErrorAsync } from '@/utils/defaults';
|
||||
import { computedRefreshableAsync } from '@/composable/computedRefreshable';
|
||||
|
||||
const domain = ref('');
|
||||
const selector = ref('default');
|
||||
const keySize = ref('2048');
|
||||
const password = ref('');
|
||||
|
||||
const keySizes = [
|
||||
{ label: '1024-bit (Less secure, but faster)', value: '1024' },
|
||||
{ label: '2048-bit (Recommended for security)', value: '2048' },
|
||||
{ label: '4096-bit (Stronger security, but slower)', value: '4096' },
|
||||
];
|
||||
|
||||
const emptyCerts = { publicKey: '', privateKey: '' };
|
||||
const [certs, refreshCerts] = computedRefreshableAsync(
|
||||
() => withDefaultOnErrorAsync(() => generateKeyPair({
|
||||
bits: Number(keySize.value),
|
||||
password: password.value,
|
||||
format: 'pem',
|
||||
}), emptyCerts),
|
||||
emptyCerts,
|
||||
);
|
||||
|
||||
const dKIMRecord = computed(() => {
|
||||
if (!domain.value || !selector.value) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const pubKey = certs.value.publicKey.replace(/-----(BEGIN|END) PUBLIC KEY-----|\s/g, '');
|
||||
const parts = [
|
||||
'v=DKIM1',
|
||||
'k=rsa',
|
||||
`p=${pubKey}`,
|
||||
];
|
||||
|
||||
const record = parts.join('; ');
|
||||
return `${selector.value}._domainkey.${domain.value} IN TXT "${record}"`;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NForm label-placement="top">
|
||||
<NFormItem label="Domain Name:">
|
||||
<NInput v-model:value="domain" placeholder="Enter domain (e.g., example.com)" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Selector (Unique name used to distinguish DKIM records for the same domain):">
|
||||
<NInput v-model:value="selector" placeholder="Enter selector (e.g., default)" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Key Size (of the RSA key used for signing emails):">
|
||||
<NSelect v-model:value="keySize" :options="keySizes" placeholder="Select key size" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Passphrase (of private key):">
|
||||
<NInput
|
||||
v-model:value="password"
|
||||
type="password"
|
||||
show-password-on="mousedown"
|
||||
placeholder="Passphrase"
|
||||
/>
|
||||
</NFormItem>
|
||||
|
||||
<div mb-2 flex justify-center>
|
||||
<n-button @click="refreshCerts()">
|
||||
Refresh Certificate
|
||||
</n-button>
|
||||
</div>
|
||||
|
||||
<c-card title="Generate DKIM Record" mb-1>
|
||||
<textarea-copyable :value="dKIMRecord" />
|
||||
</c-card>
|
||||
|
||||
<c-card v-if="dKIMRecord" title="RSA Public Key" mb-1>
|
||||
<textarea-copyable :value="certs.publicKey" />
|
||||
</c-card>
|
||||
|
||||
<c-card v-if="dKIMRecord" title="PEM RSA Private key">
|
||||
<textarea-copyable :value="certs.privateKey" />
|
||||
</c-card>
|
||||
</NForm>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { World } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'DKIM DNS Generator',
|
||||
path: '/dkim-dns-generator',
|
||||
description: 'Generate DKIM DNS TXT record',
|
||||
keywords: ['dkim', 'dns'],
|
||||
component: () => import('./dkim-dns-generator.vue'),
|
||||
icon: World,
|
||||
createdAt: new Date('2025-04-21'),
|
||||
category: 'Network',
|
||||
});
|
||||
@@ -0,0 +1,96 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
|
||||
const domain = ref('');
|
||||
const policy = ref('none');
|
||||
const subPolicy = ref('none');
|
||||
const percentage = ref(100);
|
||||
const rua = ref('');
|
||||
const ruf = ref('');
|
||||
const aspf = ref('r');
|
||||
const adkim = ref('r');
|
||||
const ri = ref(86400);
|
||||
const dmarcRecord = computed(() => {
|
||||
const recordParts = ['v=DMARC1', `p=${policy.value}`, `sp=${subPolicy.value}`];
|
||||
|
||||
if (percentage.value !== 100) {
|
||||
recordParts.push(`pct=${percentage.value}`);
|
||||
}
|
||||
if (rua.value) {
|
||||
recordParts.push(`rua=mailto:${rua.value}`);
|
||||
}
|
||||
if (ruf.value) {
|
||||
recordParts.push(`ruf=mailto:${ruf.value}`);
|
||||
}
|
||||
if (aspf.value) {
|
||||
recordParts.push(`aspf=${aspf.value}`);
|
||||
}
|
||||
if (adkim.value) {
|
||||
recordParts.push(`adkim=${adkim.value}`);
|
||||
}
|
||||
if (ri.value) {
|
||||
recordParts.push(`ri=${ri.value}`);
|
||||
}
|
||||
|
||||
return recordParts.join('; ');
|
||||
});
|
||||
|
||||
const policies = [
|
||||
{ label: 'None', value: 'none' },
|
||||
{ label: 'Quarantine', value: 'quarantine' },
|
||||
{ label: 'Reject', value: 'reject' },
|
||||
];
|
||||
|
||||
const alignments = [
|
||||
{ label: 'Relaxed (r)', value: 'r' },
|
||||
{ label: 'Strict (s)', value: 's' },
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-card title="DMARC Record Generator" max-w-600px>
|
||||
<n-form-item label="Domain:" label-placement="left">
|
||||
<n-input v-model:value="domain" placeholder="example.com" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Policy:" label-placement="left">
|
||||
<n-select v-model:value="policy" :options="policies" placeholder="Select policy" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Subdomain Policy:" label-placement="left">
|
||||
<n-select v-model:value="subPolicy" :options="policies" placeholder="Select policy" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Percentage (of emails subject to DMARC policy enforcement (0-100%)):" label-placement="top">
|
||||
<n-input-number v-model:value="percentage" :min="0" :max="100" placeholder="Enter percentage" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Aggregate Email (where aggregate DMARC reports should be sent):" label-placement="top">
|
||||
<n-input v-model:value="rua" placeholder="admin@example.com" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Forensic Email (where forensic DMARC failure reports should be sent):" label-placement="top">
|
||||
<n-input v-model:value="ruf" placeholder="admin@example.com" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Alignment (SPF):" label-placement="left">
|
||||
<n-select v-model:value="aspf" :options="alignments" placeholder="Select alignment" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Alignment (DKIM):" label-placement="left">
|
||||
<n-select v-model:value="adkim" :options="alignments" placeholder="Select alignment" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Reporting Interval (for sending DMARC aggregate reports):" label-placement="top">
|
||||
<n-input-number v-model:value="ri" :min="3600" placeholder="Enter interval">
|
||||
<template #suffix>
|
||||
seconds
|
||||
</template>
|
||||
</n-input-number>
|
||||
</n-form-item>
|
||||
|
||||
<n-card v-if="dmarcRecord" title="Generated DMARC Record">
|
||||
<textarea-copyable :value="dmarcRecord" />
|
||||
</n-card>
|
||||
</n-card>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { World } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'DMARC DNS Generator',
|
||||
path: '/dmarc-dns-generator',
|
||||
description: 'Generate DMARC DNS TXT record',
|
||||
keywords: ['dmarc', 'dns'],
|
||||
component: () => import('./dmarc-dns-generator.vue'),
|
||||
icon: World,
|
||||
createdAt: new Date('2025-04-21'),
|
||||
category: 'Network',
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
<script setup lang="ts">
|
||||
import { useThemeVars } from 'naive-ui';
|
||||
import Memo from './docker.md';
|
||||
|
||||
const themeVars = useThemeVars();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<Memo style="overflow-x: auto;" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
::v-deep(pre) {
|
||||
margin: 0;
|
||||
padding: 15px 22px;
|
||||
background-color: v-bind('themeVars.cardColor');
|
||||
border-radius: 4px;
|
||||
overflow: auto;
|
||||
}
|
||||
::v-deep(table) {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
::v-deep(table), ::v-deep(td), ::v-deep(th) {
|
||||
border: 1px solid v-bind('themeVars.textColor1');
|
||||
padding: 5px;
|
||||
}
|
||||
::v-deep(a) {
|
||||
color: v-bind('themeVars.textColor1');
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,163 @@
|
||||
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security allows you to run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you do not need to rely on what is currently installed on the host. You can easily share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.
|
||||
|
||||
## INSTALLATION
|
||||
|
||||
## GENERAL COMMANDS
|
||||
|
||||
Docker Desktop is available for Mac, Linux and Windows https://docs.docker.com/desktop
|
||||
|
||||
View example projects that use Docker
|
||||
|
||||
https://github.com/docker/awesome-compose
|
||||
|
||||
Check out our docs for information on using Docker https://docs.docker.com
|
||||
|
||||
## IMAGES
|
||||
|
||||
Docker images are a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.
|
||||
|
||||
Build an Image from a Dockerfile
|
||||
|
||||
```bash
|
||||
docker build -t <image_name> .
|
||||
```
|
||||
|
||||
Build an Image from a Dockerfile without the cache
|
||||
|
||||
```bash
|
||||
docker build -t <image\_name> . -no-cache
|
||||
```
|
||||
|
||||
List local images
|
||||
|
||||
```bash
|
||||
docker images
|
||||
```
|
||||
|
||||
Delete an Image
|
||||
|
||||
```bash
|
||||
docker rmi <image\_name>
|
||||
```
|
||||
|
||||
Remove all unused images
|
||||
|
||||
```bash
|
||||
docker image prune
|
||||
```
|
||||
|
||||
## DOCKER HUB
|
||||
|
||||
Docker Hub is a service provided by Docker for finding and sharing container images with your team. Learn more and find images at https://hub.docker.com
|
||||
|
||||
Login into Docker
|
||||
|
||||
```bash
|
||||
docker login -u <username>
|
||||
```
|
||||
|
||||
Publish an image to Docker Hub
|
||||
|
||||
```bash
|
||||
docker push <username>/<image\_name>
|
||||
```
|
||||
|
||||
Search Hub for an image
|
||||
|
||||
```bash
|
||||
docker search <image\_name>
|
||||
```
|
||||
|
||||
Pull an image from a Docker Hub
|
||||
|
||||
```bash
|
||||
docker pull <image\_name>
|
||||
```
|
||||
|
||||
Start the docker daemon
|
||||
|
||||
```bash
|
||||
docker -d
|
||||
```
|
||||
|
||||
Get help with Docker. Can also use -help on all subcommands
|
||||
|
||||
```bash
|
||||
docker --help
|
||||
```
|
||||
|
||||
Display system-wide information
|
||||
|
||||
```bash
|
||||
docker info
|
||||
```
|
||||
|
||||
## CONTAINERS
|
||||
|
||||
A container is a runtime instance of a docker image. A container will always run the same, regardless of the infrastructure. Containers isolate software from its environment and ensure that it works uniformly despite differences for instance between development and staging.
|
||||
|
||||
Create and run a container from an image, with a custom name:
|
||||
|
||||
```bash
|
||||
docker run --name <container\_name> <image\_name>
|
||||
```
|
||||
|
||||
Run a container with and publish a container's port(s) to the host.
|
||||
|
||||
```bash
|
||||
docker run -p <host\_port>:<container\_port> <image\_name>
|
||||
```
|
||||
|
||||
Run a container in the background
|
||||
|
||||
```bash
|
||||
docker run -d <image\_name>
|
||||
```
|
||||
|
||||
Start or stop an existing container:
|
||||
|
||||
```bash
|
||||
docker start|stop <container\_name> (or <container-id>)
|
||||
```
|
||||
|
||||
Remove a stopped container:
|
||||
|
||||
```bash
|
||||
docker rm <container\_name>
|
||||
```
|
||||
|
||||
Open a shell inside a running container:
|
||||
|
||||
```bash
|
||||
docker exec -it <container\_name> sh
|
||||
```
|
||||
|
||||
Fetch and follow the logs of a container:
|
||||
|
||||
```bash
|
||||
docker logs -f <container\_name>
|
||||
```
|
||||
|
||||
To inspect a running container:
|
||||
|
||||
```bash
|
||||
docker inspect <container\_name> (or <container\_id>)
|
||||
```
|
||||
|
||||
To list currently running containers:
|
||||
|
||||
```bash
|
||||
docker ps
|
||||
```
|
||||
|
||||
List all docker containers (running and stopped):
|
||||
|
||||
```bash
|
||||
docker ps --all
|
||||
```
|
||||
|
||||
View resource usage stats
|
||||
|
||||
```bash
|
||||
docker container stats
|
||||
```
|
||||
@@ -0,0 +1,13 @@
|
||||
import { BrandDocker } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Docker Cheatsheet',
|
||||
path: '/docker-memo',
|
||||
description: 'Docker command memo',
|
||||
keywords: ['docker', 'memo'],
|
||||
component: () => import('./docker-memo.vue'),
|
||||
icon: BrandDocker,
|
||||
createdAt: new Date('2025-03-09'),
|
||||
category: 'Cheatsheets',
|
||||
});
|
||||
@@ -0,0 +1,56 @@
|
||||
<script setup lang="ts">
|
||||
import _ from 'lodash';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
import { useValidation } from '@/composable/validation';
|
||||
|
||||
const input = ref('');
|
||||
const cleaningRegex = useQueryParamOrStorage({ name: 'clean', storageName: 'dedup:clean', defaultValue: '' });
|
||||
const regexValidation = useValidation({
|
||||
source: cleaningRegex,
|
||||
rules: [
|
||||
{
|
||||
message: 'Invalid regex: {0}',
|
||||
validator: value => new RegExp(value),
|
||||
getErrorMessage: (value) => {
|
||||
const _ = new RegExp(value);
|
||||
return '';
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const duplicatedLines = computed(() => {
|
||||
const clean = new RegExp(cleaningRegex.value, 'g');
|
||||
const lines = input.value.split('\n');
|
||||
return _.uniq(_.filter(lines.map(val => val.replace(clean, '')), (val, i, iteratee) => val && _.includes(iteratee, val, i + 1))).join('\n');
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-input-text
|
||||
v-model:value="input"
|
||||
placeholder="Your string to list duplicated lines..."
|
||||
raw-text
|
||||
multiline
|
||||
rows="10"
|
||||
label="Your text: "
|
||||
mb-2
|
||||
/>
|
||||
<c-input-text
|
||||
v-model:value="cleaningRegex"
|
||||
placeholder="Your cleaning regex..."
|
||||
raw-text
|
||||
label="Cleaning regex: "
|
||||
label-position="left"
|
||||
label-align="right"
|
||||
label-width="120px"
|
||||
:validation="regexValidation"
|
||||
mb-2
|
||||
/>
|
||||
|
||||
<n-form-item label="Duplicated lines:">
|
||||
<textarea-copyable :value="duplicatedLines" />
|
||||
</n-form-item>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { ListSearch } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Duplicate Lines Finder',
|
||||
path: '/duplicate-line-finder',
|
||||
description: 'Find and list duplicated lines',
|
||||
keywords: ['duplicate', 'line', 'finder'],
|
||||
component: () => import('./duplicate-line-finder.vue'),
|
||||
icon: ListSearch,
|
||||
createdAt: new Date('2025-03-09'),
|
||||
category: 'Text',
|
||||
});
|
||||
@@ -0,0 +1,74 @@
|
||||
import { Buffer } from 'node:buffer';
|
||||
import { RC4, Rabbit, TripleDES, enc } from 'crypto-js';
|
||||
import { managedNonce, randomBytes } from '@noble/ciphers/webcrypto';
|
||||
import { aeskw, aeskwp, cbc, cfb, ctr, ecb, gcm, siv } from '@noble/ciphers/aes';
|
||||
import { salsa20, xsalsa20, xsalsa20poly1305 } from '@noble/ciphers/salsa';
|
||||
import { chacha12, chacha20, chacha20poly1305, chacha8, xchacha20, xchacha20poly1305 } from '@noble/ciphers/chacha';
|
||||
import { bytesToUtf8, hexToBytes, utf8ToBytes } from '@noble/ciphers/utils';
|
||||
|
||||
function getCryptoJSKey(key: string, keyEncoding: KeyEncoding) {
|
||||
return keyEncoding === 'Text' ? key : enc.Hex.parse(key);
|
||||
}
|
||||
function getNobleKey(key: string, keyEncoding: KeyEncoding) {
|
||||
return keyEncoding === 'Text' ? utf8ToBytes(key) : hexToBytes(key);
|
||||
}
|
||||
|
||||
function getCryptoJSCipher(cipher: any) {
|
||||
return {
|
||||
encrypt: (value: string, key: string, keyEncoding: KeyEncoding) => cipher.encrypt(value, getCryptoJSKey(key, keyEncoding), { iv: enc.Hex.parse('') }).toString(),
|
||||
decrypt: (value: string, key: string, keyEncoding: KeyEncoding) => cipher.decrypt(value, getCryptoJSKey(key, keyEncoding), { iv: enc.Hex.parse('') }).toString(enc.Utf8),
|
||||
};
|
||||
}
|
||||
function getNobleCipher(algo: any, nonceType: 'auto' | 'none' | 'manual' = 'auto', nonceSize: number = 0) {
|
||||
return {
|
||||
encrypt: (value: string, key: string, keyEncoding: KeyEncoding) => {
|
||||
if (nonceType === 'auto') {
|
||||
return Buffer.from(managedNonce(algo)(getNobleKey(key, keyEncoding)).encrypt(utf8ToBytes(value))).toString('base64');
|
||||
}
|
||||
else if (nonceType === 'none') {
|
||||
return Buffer.from(algo(getNobleKey(key, keyEncoding)).encrypt(utf8ToBytes(value))).toString('base64');
|
||||
}
|
||||
else {
|
||||
const nonce = randomBytes(nonceSize);
|
||||
return Buffer.from(new Uint8Array([...nonce, ...algo(getNobleKey(key, keyEncoding), nonce, utf8ToBytes(value))])).toString('base64');
|
||||
}
|
||||
},
|
||||
decrypt: (value: string, key: string, keyEncoding: KeyEncoding) => {
|
||||
if (nonceType === 'auto') {
|
||||
return bytesToUtf8(managedNonce(algo)(getNobleKey(key, keyEncoding)).decrypt(Buffer.from(value, 'base64')));
|
||||
}
|
||||
else if (nonceType === 'none') {
|
||||
return bytesToUtf8(algo(getNobleKey(key, keyEncoding)).decrypt(Buffer.from(value, 'base64')));
|
||||
}
|
||||
else {
|
||||
const ciphered = Buffer.from(value, 'base64');
|
||||
return bytesToUtf8(algo(getNobleKey(key, keyEncoding), ciphered.subarray(0, nonceSize), ciphered.subarray(nonceSize)));
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export const algos = {
|
||||
'TripleDES': getCryptoJSCipher(TripleDES),
|
||||
'Rabbit': getCryptoJSCipher(Rabbit),
|
||||
'RC4': getCryptoJSCipher(RC4),
|
||||
'AES-GCM': getNobleCipher(gcm),
|
||||
'AES-SIV': getNobleCipher(siv),
|
||||
'AES-CTR': getNobleCipher(ctr),
|
||||
'AES-CFB': getNobleCipher(cfb),
|
||||
'AES-CBC': getNobleCipher(cbc),
|
||||
'AES-ECB': getNobleCipher(ecb, 'none'),
|
||||
'AES-KW': getNobleCipher(aeskw, 'none'),
|
||||
'AES-KWP': getNobleCipher(aeskwp, 'none'),
|
||||
'Salsa-XSalsa20poly1305': getNobleCipher(xsalsa20poly1305),
|
||||
'Chacha-Chacha20poly1305': getNobleCipher(chacha20poly1305),
|
||||
'Chacha-XChacha20poly1305': getNobleCipher(xchacha20poly1305),
|
||||
'Salsa-Salsa20': getNobleCipher(salsa20, 'manual', 8),
|
||||
'Salsa-XSalsa20': getNobleCipher(xsalsa20, 'manual', 24),
|
||||
'Chacha-Chacha20': getNobleCipher(chacha20, 'manual', 12),
|
||||
'Chacha-XChacha20': getNobleCipher(xchacha20, 'manual', 24),
|
||||
'Chacha-Chacha8': getNobleCipher(chacha8, 'manual', 12),
|
||||
'Chacha-Chacha12 ': getNobleCipher(chacha12, 'manual', 12),
|
||||
};
|
||||
|
||||
export type KeyEncoding = 'Text' | 'Hex';
|
||||
@@ -1,24 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
import { AES, RC4, Rabbit, TripleDES, enc } from 'crypto-js';
|
||||
import type { KeyEncoding } from './encryption.service';
|
||||
import { algos } from './encryption.service';
|
||||
import { computedCatch } from '@/composable/computed/catchedComputed';
|
||||
|
||||
const algos = { AES, TripleDES, Rabbit, RC4 };
|
||||
type KeyEncoding = 'Text' | 'Hex';
|
||||
|
||||
const cypherInput = ref('Lorem ipsum dolor sit amet');
|
||||
const cypherAlgo = ref<keyof typeof algos>('AES');
|
||||
const cypherSecret = ref('my secret key');
|
||||
const cypherAlgo = ref<keyof typeof algos>('AES-CBC');
|
||||
const cypherSecret = ref('my secret key 16');
|
||||
const cypherSecretEncoding = ref<KeyEncoding>('Text');
|
||||
const [cypherOutput, cypherError] = computedCatch(() => algos[cypherAlgo.value].encrypt(cypherInput.value, cypherSecretEncoding.value === 'Text' ? cypherSecret.value : enc.Hex.parse(cypherSecret.value), { iv: enc.Hex.parse('') }).toString(), {
|
||||
const [cypherOutput, cypherError] = computedCatch(() => algos[cypherAlgo.value].encrypt(cypherInput.value, cypherSecret.value, cypherSecretEncoding.value), {
|
||||
defaultValue: '',
|
||||
defaultErrorMessage: 'Unable to cypher your text',
|
||||
});
|
||||
|
||||
const decryptInput = ref('U2FsdGVkX1/EC3+6P5dbbkZ3e1kQ5o2yzuU0NHTjmrKnLBEwreV489Kr0DIB+uBs');
|
||||
const decryptAlgo = ref<keyof typeof algos>('AES');
|
||||
const decryptSecret = ref('my secret key');
|
||||
const decryptInput = ref('dopEIE7v5TJlhHl+0+mA4Q+BxNj4xcdTsiVGw4tmpLlkDln8lzmzavO3egJuzpCD');
|
||||
const decryptAlgo = ref<keyof typeof algos>('AES-CBC');
|
||||
const decryptSecret = ref('my secret key 16');
|
||||
const decryptSecretEncoding = ref<KeyEncoding>('Text');
|
||||
const [decryptOutput, decryptError] = computedCatch(() => algos[decryptAlgo.value].decrypt(decryptInput.value, decryptSecretEncoding.value === 'Text' ? decryptSecret.value : enc.Hex.parse(decryptSecret.value), { iv: enc.Hex.parse('') }).toString(enc.Utf8), {
|
||||
const [decryptOutput, decryptError] = computedCatch(() => algos[decryptAlgo.value].decrypt(decryptInput.value, decryptSecret.value, decryptSecretEncoding.value), {
|
||||
defaultValue: '',
|
||||
defaultErrorMessage: 'Unable to decrypt your text',
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ export const tool = defineTool({
|
||||
name: translate('tools.encryption.title'),
|
||||
path: '/encryption',
|
||||
description: translate('tools.encryption.description'),
|
||||
keywords: ['cypher', 'encipher', 'text', 'AES', 'TripleDES', 'Rabbit', 'RC4'],
|
||||
keywords: ['cypher', 'encipher', 'text', 'AES', 'TripleDES', 'Rabbit', 'RC4', 'Salsa', 'ChaCha'],
|
||||
component: () => import('./encryption.vue'),
|
||||
icon: Lock,
|
||||
redirectFrom: ['/cypher'],
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
<script lang="ts" setup>
|
||||
import * as XLSX from 'xlsx';
|
||||
import { objectArrayToData } from '@/utils/objectarray.export';
|
||||
import type { ExportFormat } from '@/utils/objectarray.export';
|
||||
|
||||
const workbook = ref<XLSX.WorkBook | null>(null);
|
||||
const convertedData = ref<string>('');
|
||||
const selectedFormat = ref<string>('json');
|
||||
const tableName = ref<string>('TableName');
|
||||
const nestify = ref(false);
|
||||
const sheetName = ref('');
|
||||
const error = ref('');
|
||||
|
||||
const formats = [
|
||||
{ label: 'JSON', value: 'json' },
|
||||
{ label: 'YAML', value: 'yaml' },
|
||||
{ label: 'SQL INSERT', value: 'sql' },
|
||||
{ label: 'CSV (comma)', value: 'csv' },
|
||||
{ label: 'CSV (semicolon)', value: 'csv_semicolon' },
|
||||
{ label: 'CSV (tab)', value: 'tsv' },
|
||||
{ label: 'Markdown', value: 'markdown' },
|
||||
{ label: 'XML', value: 'xml' },
|
||||
];
|
||||
|
||||
async function handleFileUpload(file: File) {
|
||||
error.value = '';
|
||||
workbook.value = null;
|
||||
sheetName.value = '';
|
||||
try {
|
||||
workbook.value = XLSX.read(await file.arrayBuffer(), { type: 'binary' });
|
||||
sheetName.value = workbook.value.SheetNames[0];
|
||||
}
|
||||
catch (e: any) {
|
||||
error.value = e.toString();
|
||||
}
|
||||
}
|
||||
|
||||
function convertFile() {
|
||||
if (!workbook.value) {
|
||||
return;
|
||||
}
|
||||
const data = XLSX.utils.sheet_to_json(workbook.value.Sheets[sheetName.value]);
|
||||
if (!data.length || !selectedFormat.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
convertedData.value = objectArrayToData(data, selectedFormat.value as ExportFormat, {
|
||||
tableName: tableName.value,
|
||||
nestify: nestify.value,
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="XLSX Converter">
|
||||
<c-file-upload
|
||||
title="Drag and drop a XLSX here, or click to select a file"
|
||||
accept=".xlsx"
|
||||
mb-3
|
||||
@file-upload="handleFileUpload"
|
||||
/>
|
||||
|
||||
<NFormItem v-if="workbook" label="Select Sheet to use:" label-placement="left">
|
||||
<NSelect v-model:value="sheetName" :options="workbook.SheetNames?.map((s) => ({ label: s, value: s }))" placeholder="Select sheet" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Select output format:" label-placement="left">
|
||||
<NSelect v-model:value="selectedFormat" :options="formats" placeholder="Select format" />
|
||||
</NFormItem>
|
||||
|
||||
<n-form-item label="Nestify ('a.b.c' to nested objects)" label-placement="left">
|
||||
<n-checkbox v-model:checked="nestify" />
|
||||
</n-form-item>
|
||||
|
||||
<c-input-text v-if="selectedFormat === 'sql'" v-model:value="tableName" label="Table Name:" label-placement="left" />
|
||||
|
||||
<div mt-3 flex justify-center>
|
||||
<NButton :disabled="!workbook" @click="convertFile">
|
||||
Convert
|
||||
</NButton>
|
||||
</div>
|
||||
|
||||
<c-alert v-if="error">
|
||||
{{ error }}
|
||||
</c-alert>
|
||||
|
||||
<c-card v-if="convertedData" title="Converted data">
|
||||
<textarea-copyable :value="convertedData" :language="selectedFormat" />
|
||||
</c-card>
|
||||
</NCard>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { TableExport } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Excel to data',
|
||||
path: '/excel-to-data',
|
||||
description: 'Convert XLSX file to JSON, YAML, CSV, SQL INSERT, XML or Markdown',
|
||||
keywords: ['excel', 'csv', 'xlsx', 'sql', 'json', 'yaml', 'insert', 'markdown', 'md', 'tsv', 'xml'],
|
||||
component: () => import('./excel-to-data.vue'),
|
||||
icon: TableExport,
|
||||
createdAt: new Date('2024-12-25'),
|
||||
category: 'Converters',
|
||||
});
|
||||
@@ -0,0 +1,58 @@
|
||||
<script setup lang="ts">
|
||||
const zone = ref<string>('public');
|
||||
const action = ref<string>('add');
|
||||
const ruleType = ref<string>('service');
|
||||
const value = ref<string>('http');
|
||||
const permanent = ref<boolean>(true);
|
||||
|
||||
const ruleTypes = [
|
||||
{ label: 'Service', value: 'service' },
|
||||
{ label: 'Port', value: 'port' },
|
||||
{ label: 'Protocol', value: 'protocol' },
|
||||
{ label: 'Rich Rule', value: 'rich-rule' },
|
||||
];
|
||||
|
||||
const actions = [
|
||||
{ label: 'Add', value: 'add' },
|
||||
{ label: 'Remove', value: 'remove' },
|
||||
];
|
||||
|
||||
const command = computed(() => {
|
||||
let result = `firewall-cmd --zone=${zone.value} --${action.value}-${ruleType.value}=${value.value}`;
|
||||
if (permanent.value) {
|
||||
result += ' --permanent';
|
||||
}
|
||||
result += ' && firewall-cmd --reload';
|
||||
return result;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<NForm label-width="120px" label-placement="left">
|
||||
<NFormItem label="Zone:">
|
||||
<NSelect v-model:value="zone" :options="[{ label: 'Public', value: 'public' }, { label: 'Home', value: 'home' }, { label: 'Work', value: 'work' }]" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Action:">
|
||||
<NSelect v-model:value="action" :options="actions" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Rule Type:">
|
||||
<NSelect v-model:value="ruleType" :options="ruleTypes" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Value:">
|
||||
<NInput v-model:value="value" placeholder="Enter the service/port/protocol" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Permanent">
|
||||
<NSelect v-model:value="permanent" :options="[{ label: 'Yes', value: true }, { label: 'No', value: false }]" />
|
||||
</NFormItem>
|
||||
</NForm>
|
||||
|
||||
<c-card title="Generated fw command:" mt-2>
|
||||
<textarea-copyable :value="command" />
|
||||
</c-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Firetruck } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'FW command line generator',
|
||||
path: '/firewalld-generator',
|
||||
description: 'Generate fw command lines',
|
||||
keywords: ['firewalld', 'fw'],
|
||||
component: () => import('./firewalld-generator.vue'),
|
||||
icon: Firetruck,
|
||||
createdAt: new Date('2025-04-21'),
|
||||
category: 'Network',
|
||||
});
|
||||
@@ -21,19 +21,25 @@ const inputStructure = ref([
|
||||
'empty dir',
|
||||
].join('\n'));
|
||||
const outputTree = computed(() => withDefaultOnError(() => generateTree(parseInput(inputStructure.value)), ''));
|
||||
|
||||
const MONACO_EDITOR_OPTIONS = {
|
||||
automaticLayout: true,
|
||||
formatOnType: true,
|
||||
formatOnPaste: true,
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-input-text
|
||||
v-model:value="inputStructure"
|
||||
label="Your indented structure"
|
||||
placeholder="Paste your indented structure here..."
|
||||
rows="20"
|
||||
multiline
|
||||
raw-text
|
||||
monospace
|
||||
/>
|
||||
<c-card title="Your indented structure" w-full>
|
||||
<c-monaco-editor
|
||||
v-model:value="inputStructure"
|
||||
theme="vs-dark"
|
||||
height="250px"
|
||||
placeholder="Paste your indented structure here..."
|
||||
:options="MONACO_EDITOR_OPTIONS"
|
||||
/>
|
||||
</c-card>
|
||||
|
||||
<n-divider />
|
||||
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
<script setup lang="ts">
|
||||
import { NForm, NFormItem, NInput, NSelect } from 'naive-ui';
|
||||
|
||||
const device = ref('');
|
||||
const mountPoint = ref('');
|
||||
const fsType = ref('auto');
|
||||
const options = ref<string[]>([]);
|
||||
const dump = ref('0');
|
||||
const pass = ref('0');
|
||||
const username = ref('');
|
||||
const password = ref('');
|
||||
|
||||
const fileSystems = [
|
||||
'auto', 'ext2', 'ext3', 'ext4', 'xfs', 'btrfs', 'jfs', 'reiserfs', 'nfs', 'cifs', 'smbfs',
|
||||
'tmpfs', 'devtmpfs', 'overlay', 'aufs', 'iso9660', 'udf', 'vfat', 'ntfs',
|
||||
'swap',
|
||||
];
|
||||
|
||||
const defaultOptions = [
|
||||
{ value: 'defaults', description: 'Standard mount options (rw, suid, dev, exec, auto, nouser, async).' },
|
||||
{ value: 'noatime', description: 'Prevents access time updates for better performance.' },
|
||||
{ value: 'nodiratime', description: 'Prevents directory access time updates.' },
|
||||
{ value: 'relatime', description: 'Updates access time only when modified or accessed after reboot.' },
|
||||
{ value: 'ro', description: 'Mount filesystem as read-only.' },
|
||||
{ value: 'rw', description: 'Mount filesystem as read/write.' },
|
||||
{ value: 'sync', description: 'Writes synchronously for better integrity.' },
|
||||
{ value: 'async', description: 'Writes asynchronously for better performance.' },
|
||||
{ value: 'user', description: 'Allow normal users to mount the filesystem.' },
|
||||
{ value: 'nouser', description: 'Only root can mount.' },
|
||||
{ value: 'exec', description: 'Allows execution of binaries.' },
|
||||
{ value: 'noexec', description: 'Disables execution of binaries (security measure).' },
|
||||
{ value: 'errors=remount-ro', description: 'Remount as read-only upon errors.' },
|
||||
{ value: 'auto', description: 'Mount automatically at boot.' },
|
||||
{ value: 'noauto', description: 'Requires manual mount.' },
|
||||
{ value: 'dev', description: 'Interpret character or block special devices on the file system.' },
|
||||
{ value: 'nodev', description: 'Do not interpret character or block special devices on the file system.' },
|
||||
{ value: 'suid', description: 'Permit the operation of suid, and sgid bits.' },
|
||||
{ value: 'nosuid', description: 'Block the operation of suid, and sgid bits.' },
|
||||
]; ;
|
||||
|
||||
const nfsOptions = [
|
||||
{ value: 'vers=3', description: 'Use NFS protocol version 3.' },
|
||||
{ value: 'soft', description: 'Fail after timeout if server is unreachable.' },
|
||||
{ value: 'hard', description: 'Retry indefinitely if server is unreachable.' },
|
||||
{ value: 'rsize=8192,wsize=8192', description: 'Tunable read/write buffer sizes.' },
|
||||
];
|
||||
|
||||
const cifsOptions = [
|
||||
{ value: 'sec=ntlm', description: 'Use NTLM security protocol.' },
|
||||
];
|
||||
|
||||
const tmpfsOptions = [
|
||||
{ value: 'size=512M', description: 'Define tmpfs size limit.' },
|
||||
{ value: 'mode=1777', description: 'Set permissions on tmpfs mount.' },
|
||||
];
|
||||
|
||||
const filesystemOptions = computed(() => {
|
||||
if (fsType.value === 'nfs') {
|
||||
return [...defaultOptions, ...nfsOptions];
|
||||
}
|
||||
if (fsType.value === 'cifs') {
|
||||
return [...defaultOptions, ...cifsOptions];
|
||||
}
|
||||
if (fsType.value === 'tmpfs') {
|
||||
return [...defaultOptions, ...tmpfsOptions];
|
||||
}
|
||||
return defaultOptions;
|
||||
});
|
||||
|
||||
const fstabLine = computed(
|
||||
() => {
|
||||
if (!device.value || !mountPoint.value) {
|
||||
return '';
|
||||
}
|
||||
const allOptions = [...options.value];
|
||||
if (username.value) {
|
||||
allOptions.push(`user=${username.value}`);
|
||||
}
|
||||
if (password.value) {
|
||||
allOptions.push(`pass=${password.value}`);
|
||||
}
|
||||
if (!allOptions.length) {
|
||||
allOptions.push('defaults');
|
||||
}
|
||||
return `${device.value} ${mountPoint.value} ${fsType.value} ${allOptions.join(',')} ${dump.value} ${pass.value}`;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NForm>
|
||||
<NFormItem label="Device:" label-placement="left" label-width="140px">
|
||||
<NInput v-model:value="device" placeholder="/dev/sda1 or UUID=... or server:/path" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Mount Point:" label-placement="left" label-width="140px">
|
||||
<NInput v-model:value="mountPoint" placeholder="/mnt/data or /home" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Filesystem Type:" label-placement="left" label-width="140px">
|
||||
<NSelect v-model:value="fsType" :options="fileSystems.map(fs => ({ label: fs, value: fs }))" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Filesystem options:">
|
||||
<NSelect
|
||||
v-model:value="options" placeholder="By default: Standard mount options (rw, suid, dev, exec, auto, nouser, async)"
|
||||
multiple
|
||||
:options="filesystemOptions.map(o => ({ value: o.value, label: `${o.description} (${o.value})` }))"
|
||||
/>
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Dump (Determines whether the 'dump' utility should back up this filesystem):">
|
||||
<NSelect v-model:value="dump" :options="[{ label: 'Do not include in backups', value: '0' }, { label: 'Include in backups', value: '1' }]" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Pass (Controls the order for filesystem checks at boot):">
|
||||
<NSelect
|
||||
v-model:value="pass"
|
||||
:options="[{ label: 'No check', value: '0' }, { label: 'Root filesystem first', value: '1' }, { label: 'Other filesystems after root', value: '2' }]"
|
||||
/>
|
||||
</NFormItem>
|
||||
|
||||
<c-input-text
|
||||
v-model:value="username"
|
||||
placeholder="Username"
|
||||
label="Username:"
|
||||
label-position="left"
|
||||
label-width="140px"
|
||||
label-align="right"
|
||||
raw-text
|
||||
mb-1
|
||||
flex-1
|
||||
/>
|
||||
|
||||
<c-input-text
|
||||
v-model:value="password"
|
||||
placeholder="Password"
|
||||
label="Password:"
|
||||
label-position="left"
|
||||
label-width="140px"
|
||||
label-align="right"
|
||||
raw-text
|
||||
flex-1
|
||||
/>
|
||||
|
||||
<c-card title="Generated /etc/fstab line" mt-5>
|
||||
<textarea-copyable :value="fstabLine" />
|
||||
</c-card>
|
||||
</NForm>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { DeviceFloppy } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'FStab Generator',
|
||||
path: '/fstab-generator',
|
||||
description: 'Generate /etc/fstab line',
|
||||
keywords: ['fstab', 'etc'],
|
||||
component: () => import('./fstab-generator.vue'),
|
||||
icon: DeviceFloppy,
|
||||
createdAt: new Date('2025-04-21'),
|
||||
category: 'Network',
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
# Semantic Commit Messages
|
||||
|
||||
See how a minor change to your commit message style can make you a better programmer.
|
||||
|
||||
Format: `<type>(<scope>): <subject>`
|
||||
|
||||
`<scope>` is optional
|
||||
|
||||
## Example
|
||||
|
||||
```
|
||||
feat: add hat wobble
|
||||
^--^ ^------------^
|
||||
| |
|
||||
| +-> Summary in present tense.
|
||||
|
|
||||
+-------> Type: chore, docs, feat, fix, refactor, style, or test.
|
||||
```
|
||||
|
||||
More Examples:
|
||||
|
||||
- `feat`: (new feature for the user, not a new feature for build script)
|
||||
- `fix`: (bug fix for the user, not a fix to a build script)
|
||||
- `docs`: (changes to the documentation)
|
||||
- `style`: (formatting, missing semi colons, etc; no production code change)
|
||||
- `refactor`: (refactoring production code, eg. renaming a variable)
|
||||
- `test`: (adding missing tests, refactoring tests; no production code change)
|
||||
- `chore`: (updating grunt tasks etc; no production code change)
|
||||
|
||||
References:
|
||||
|
||||
- https://www.conventionalcommits.org/
|
||||
- https://seesparkbox.com/foundry/semantic_commit_messages
|
||||
- http://karma-runner.github.io/1.0/dev/git-commit-msg.html
|
||||
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
import { useThemeVars } from 'naive-ui';
|
||||
import Memo from './git-sem.memo.md';
|
||||
|
||||
const themeVars = useThemeVars();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<Memo />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
::v-deep(pre) {
|
||||
margin: 0;
|
||||
padding: 15px 22px;
|
||||
background-color: v-bind('themeVars.cardColor');
|
||||
border-radius: 4px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { GitCommit } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Git Semantic Commit Cheatsheet',
|
||||
path: '/git-semantic-commit-memo',
|
||||
description: 'Cheatsheet for committing using semantic prefixes',
|
||||
keywords: ['git', 'semantic', 'commit', 'cheatsheet'],
|
||||
component: () => import('./git-semantic-commit-memo.vue'),
|
||||
icon: GitCommit,
|
||||
createdAt: new Date('2025-05-01'),
|
||||
category: 'Cheatsheets',
|
||||
});
|
||||
@@ -32,6 +32,12 @@ const claimedUnit = ref('tb');
|
||||
label="Unit:"
|
||||
:options="dec_units"
|
||||
/>
|
||||
<n-p>
|
||||
1MiB = 1024KiB ; 1MB = 1000kB ; 1GiB = 1024MiB ; 1GB = 1000MB ;
|
||||
<n-a href="https://en.wikipedia.org/wiki/Byte" target="_blank" rel="noopener">
|
||||
see here for details
|
||||
</n-a>
|
||||
</n-p>
|
||||
|
||||
<n-divider />
|
||||
|
||||
|
||||
@@ -0,0 +1,272 @@
|
||||
<script setup lang="ts">
|
||||
const formData = ref({
|
||||
domainName: '',
|
||||
redirects: [] as { key: string; value: string }[],
|
||||
cacheExtensions: '',
|
||||
cacheDuration: 60,
|
||||
cacheDurationMultiple: '60',
|
||||
cacheType: 'public',
|
||||
mustRevalidate: false,
|
||||
protectedFile: '',
|
||||
htpasswdPath: '',
|
||||
referrer: '',
|
||||
hotlinkExtensions: '',
|
||||
nohotlinkImageHref: '',
|
||||
errorPages: [] as { key: string; value: string }[],
|
||||
ipRules: [] as { key: string; value: string }[],
|
||||
blockBots: false,
|
||||
defaultPage: '',
|
||||
preventDirectoryListing: false,
|
||||
preventViewingHtaccess: true,
|
||||
});
|
||||
|
||||
const htaccessContent = computed(() => {
|
||||
let content = '';
|
||||
|
||||
if (formData.value.domainName) {
|
||||
content += `Options +FollowSymLinks\nRewriteEngine On\nRewriteCond %{HTTP_HOST} ^${formData.value.domainName}[nc]\nRewriteRule ^(.*)$ https://www.${formData.value.domainName}/$1 [R=301,nc]\n\n`;
|
||||
}
|
||||
|
||||
formData.value.redirects.forEach(({ key, value }) => {
|
||||
if (!key || !value) {
|
||||
return;
|
||||
}
|
||||
content += `Redirect 301 ${key} ${value}\n`;
|
||||
});
|
||||
|
||||
if (formData.value.cacheExtensions) {
|
||||
content += `<FilesMatch "\\.(${formData.value.cacheExtensions.split(',').join('|')})$">\nHeader set Cache-Control "${formData.value.cacheType}${(formData.value.mustRevalidate ? ', proxy-revalidate' : '')}, max-age=${formData.value.cacheDuration * Number(formData.value.cacheDurationMultiple)}"\n</FilesMatch>\n\n`;
|
||||
}
|
||||
|
||||
if (formData.value.protectedFile && formData.value.htpasswdPath) {
|
||||
content += `<Files "${formData.value.protectedFile}">\nAuthType Basic\nAuthName "Restricted"\nAuthUserFile ${formData.value.htpasswdPath}\nRequire valid-user\n</Files>\n\n`;
|
||||
}
|
||||
|
||||
if (formData.value.referrer && formData.value.hotlinkExtensions) {
|
||||
content += `RewriteCond %{HTTP_REFERER} !^$\nRewriteCond %{HTTP_REFERER} !^https?://(www\.)?${formData.value.referrer}/.*$ [NC]\nRewriteRule \\.(${formData.value.hotlinkExtensions.split(',').join('|')})$ ${formData.value.nohotlinkImageHref}[R=302,L]\n\n`;
|
||||
}
|
||||
|
||||
formData.value.errorPages.forEach(({ key, value }) => {
|
||||
if (!key || !value) {
|
||||
return;
|
||||
}
|
||||
content += `ErrorDocument ${key} ${value}\n`;
|
||||
});
|
||||
|
||||
formData.value.ipRules.forEach(({ key, value }) => {
|
||||
if (!key || !value) {
|
||||
return;
|
||||
}
|
||||
content += `${key === 'Block' ? 'Deny' : 'Allow'} from ${value}\n`;
|
||||
});
|
||||
|
||||
if (formData.value.blockBots) {
|
||||
content += `//Block bad bots
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Bot\\ mailto:craftbot@yahoo.com [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Download\\ Demon [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Express\\ WebPictures [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Image\\ Stripper [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Image\\ Sucker [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} Indy\\ Library [NC,OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Internet\\ Ninja [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^JOC\\ Web\\ Spider [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Mass\\ Downloader [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^MIDown\\ tool [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Mister\\ PiX [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Net\\ Vampire [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Offline\\ Explorer [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Offline\\ Navigator [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Papa\\ Foto [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Teleport\\ Pro [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Web\\ Image\\ Collector [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Web\\ Sucker [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^WebGo\\ IS [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Website\\ eXtractor [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Website\\ Quester [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\\ WebSpider [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Zeus
|
||||
RewriteRule ^.* - [F,L]\n\n`;
|
||||
}
|
||||
|
||||
if (formData.value.defaultPage) {
|
||||
content += `DirectoryIndex ${formData.value.defaultPage}\n\n`;
|
||||
}
|
||||
|
||||
if (formData.value.preventDirectoryListing) {
|
||||
content += 'Options All -Indexes\n\n';
|
||||
}
|
||||
|
||||
if (formData.value.preventViewingHtaccess) {
|
||||
content += `<Files .htaccess>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</Files>\n\n`;
|
||||
}
|
||||
|
||||
return content;
|
||||
});
|
||||
|
||||
function onCreateIpRule() {
|
||||
return {
|
||||
key: 'Allow',
|
||||
value: '',
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="HTAccess Generator">
|
||||
<NForm :model="formData" label-placement="left">
|
||||
<c-card title="Rewrite to www" mb-1>
|
||||
<NFormItem label="Domain Name">
|
||||
<NInput v-model:value="formData.domainName" placeholder="example.com" />
|
||||
</NFormItem>
|
||||
</c-card>
|
||||
|
||||
<c-card title="301 Redirect File or Directory" mb-1>
|
||||
<NDynamicInput v-model:value="formData.redirects" preset="pair" key-placeholder="Old Path" value-placeholder="New Path" />
|
||||
</c-card>
|
||||
|
||||
<c-card title="Cache Settings" mb-1>
|
||||
<NFormItem label="Cache Extensions:">
|
||||
<NInput v-model:value="formData.cacheExtensions" placeholder="js, css, png" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Cache Duration">
|
||||
<NInputNumber v-model:value="formData.cacheDuration" mr-1 />
|
||||
<NSelect
|
||||
v-model:value="formData.cacheDurationMultiple"
|
||||
:options="[{ label: 'Seconds', value: '1' }, { label: 'Minutes', value: '60' }, { label: 'Hours', value: '3600' }, { label: 'Days', value: '86400' }, { label: 'Weeks', value: '36288000' }, { label: 'Months', value: '160704000' }]"
|
||||
/>
|
||||
</NFormItem>
|
||||
<NFormItem label="Cache Type:">
|
||||
<NSelect v-model:value="formData.cacheType" :options="[{ label: 'Public', value: 'public' }, { label: 'Private', value: 'private' }]" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Must Revalidate">
|
||||
<NSwitch v-model:value="formData.mustRevalidate" />
|
||||
</NFormItem>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Password Protection" mb-1>
|
||||
<NFormItem label="Path to protect:">
|
||||
<NInput v-model:value="formData.protectedFile" label-position="left" placeholder="Path to protect" />
|
||||
</NFormItem>
|
||||
<NFormItem label=".htpasswd file path:">
|
||||
<NInput v-model:value="formData.htpasswdPath" label-position="left" placeholder=".htpasswd file path" />
|
||||
</NFormItem>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Prevent Hotlinking" mb-1>
|
||||
<NFormItem label="Referring URL:">
|
||||
<NInput v-model:value="formData.referrer" placeholder="The domain that is hotlinking to you." />
|
||||
</NFormItem>
|
||||
<NFormItem label="File Extension:">
|
||||
<NInput v-model:value="formData.hotlinkExtensions" placeholder="Extensions" />
|
||||
</NFormItem>
|
||||
<NFormItem label="No hotlinking Image:">
|
||||
<NInput v-model:value="formData.nohotlinkImageHref" placeholder="Href" />
|
||||
</NFormItem>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Custom Error Pages" mb-1>
|
||||
<NDynamicInput v-model:value="formData.errorPages" preset="pair" key-placeholder="Error Code" value-placeholder="File Path" />
|
||||
</c-card>
|
||||
|
||||
<c-card title="Block or Allow IP addresses" mb-1>
|
||||
<NDynamicInput v-model:value="formData.ipRules" preset="pair" :on-create="onCreateIpRule">
|
||||
<template #default="{ value }">
|
||||
<div style="display: flex; align-items: center; width: 100%">
|
||||
<n-select
|
||||
v-model:value="value.key"
|
||||
:options="[{ label: 'Allow', value: 'Allow' }, { label: 'Block', value: 'Block' }]"
|
||||
placeholder="Select authorization"
|
||||
style="width: 150px"
|
||||
mr-2
|
||||
/>
|
||||
<n-input
|
||||
v-model:value="value.value"
|
||||
placeholder="IP Address"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</NDynamicInput>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Directory Settings">
|
||||
<NFormItem label="Default Directory Page:">
|
||||
<NInput v-model:value="formData.defaultPage" placeholder="Default Directory Page" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Prevent Directory Listing">
|
||||
<NSwitch v-model:value="formData.preventDirectoryListing" />
|
||||
</NFormItem>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Other Settings">
|
||||
<NFormItem label="Block Bots">
|
||||
<NSwitch v-model:value="formData.blockBots" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Prevent viewing of .htaccess file">
|
||||
<NSwitch v-model:value="formData.preventViewingHtaccess" />
|
||||
</NFormItem>
|
||||
</c-card>
|
||||
</NForm>
|
||||
|
||||
<c-card title="Generated .htaccess file" mt-2>
|
||||
<textarea-copyable :value="htaccessContent" />
|
||||
</c-card>
|
||||
</NCard>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { ShieldLock } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'HTAccess generator',
|
||||
path: '/htaccess-generator',
|
||||
description: 'Generate .htaccess file',
|
||||
keywords: ['htaccess'],
|
||||
component: () => import('./htaccess-generator.vue'),
|
||||
icon: ShieldLock,
|
||||
createdAt: new Date('2025-04-21'),
|
||||
category: 'Network',
|
||||
});
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ImageToAsciiArt } from 'image-to-ascii-art';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
import { languages, translateToLanguage } from '@/utils/ascii-lang-utils';
|
||||
import { languages, printToLanguage } from '@/utils/ascii-lang-utils';
|
||||
|
||||
const inputBase64 = ref('');
|
||||
const language = useStorage('image-to-ascii-art:language', 'raw');
|
||||
@@ -39,7 +39,7 @@ const output = computedAsync(async () => {
|
||||
drawHeight: scaleValue * 0.4,
|
||||
},
|
||||
});
|
||||
outputValue = translateToLanguage(await imageToAsciiArt.convert(inputBase64Value), languageValue);
|
||||
outputValue = printToLanguage(await imageToAsciiArt.convert(inputBase64Value), languageValue);
|
||||
imageToAsciiArt.destroy();
|
||||
}
|
||||
catch (e) {
|
||||
|
||||
@@ -36,8 +36,8 @@ async function onGetInfos() {
|
||||
|
||||
const geoInfoQueryResponse = await fetch(
|
||||
token.value !== ''
|
||||
? `https://ipinfo.io/${ip.value}/json?token=${token.value}`
|
||||
: `https://ipinfo.io/${ip.value}/json`);
|
||||
? `//ipinfo.io/${ip.value}/json?token=${token.value}`
|
||||
: `//ipinfo.io/${ip.value}/json`);
|
||||
if (!geoInfoQueryResponse.ok) {
|
||||
throw geoInfoQueryResponse.statusText;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Firetruck } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Iptables Generator',
|
||||
path: '/iptables-generator',
|
||||
description: 'Generate iptables command lines',
|
||||
keywords: ['iptables', 'firewall'],
|
||||
component: () => import('./iptables-generator.vue'),
|
||||
icon: Firetruck,
|
||||
createdAt: new Date('2025-04-21'),
|
||||
category: 'Network',
|
||||
});
|
||||
@@ -0,0 +1,135 @@
|
||||
<script setup lang="ts">
|
||||
const actionOptions = [
|
||||
{ label: 'ACCEPT', value: 'ACCEPT' },
|
||||
{ label: 'DROP', value: 'DROP' },
|
||||
{ label: 'REJECT', value: 'REJECT' },
|
||||
];
|
||||
|
||||
const protocolOptions = [
|
||||
{ label: 'TCP', value: 'tcp' },
|
||||
{ label: 'UDP', value: 'udp' },
|
||||
{ label: 'ICMP', value: 'icmp' },
|
||||
{ label: 'IP', value: 'ip' },
|
||||
];
|
||||
|
||||
const chainOptions = [
|
||||
{ label: 'INPUT', value: 'INPUT' },
|
||||
{ label: 'OUTPUT', value: 'OUTPUT' },
|
||||
{ label: 'FORWARD', value: 'FORWARD' },
|
||||
{ label: 'PREROUTING', value: 'PREROUTING' },
|
||||
];
|
||||
|
||||
const action = ref('ACCEPT');
|
||||
const protocol = ref('tcp');
|
||||
const sourceIP = ref('');
|
||||
const destinationIP = ref('');
|
||||
const sourcePort = ref<number | null>(null);
|
||||
const destinationPort = ref<number | null>(null);
|
||||
const ruleOrder = ref<number | null>(null);
|
||||
const chain = ref('INPUT');
|
||||
const command = computed(() => {
|
||||
let cmd = `iptables -A ${chain.value}`;
|
||||
if (ruleOrder.value) {
|
||||
cmd += ` ${ruleOrder.value}`;
|
||||
}
|
||||
if (protocol.value) {
|
||||
cmd += ` -p ${protocol.value}`;
|
||||
}
|
||||
if (sourceIP.value) {
|
||||
cmd += ` -s ${sourceIP.value}`;
|
||||
}
|
||||
if (destinationIP.value) {
|
||||
cmd += ` -d ${destinationIP.value}`;
|
||||
}
|
||||
if (sourcePort.value !== null) {
|
||||
cmd += ` --sport ${sourcePort.value}`;
|
||||
}
|
||||
if (destinationPort.value !== null) {
|
||||
cmd += ` --dport ${destinationPort.value}`;
|
||||
}
|
||||
cmd += ` -j ${action.value}`;
|
||||
return cmd;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NForm label-placement="left" label-width="140px">
|
||||
<NFormItem label="Action:">
|
||||
<NSelect v-model:value="action" :options="actionOptions" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Protocol:">
|
||||
<NSelect v-model:value="protocol" :options="protocolOptions" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Source IP:">
|
||||
<NInput v-model:value="sourceIP" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Destination IP:">
|
||||
<NInput v-model:value="destinationIP" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Source Port:">
|
||||
<NInputNumber v-model:value="sourcePort" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Destination Port:">
|
||||
<NInputNumber v-model:value="destinationPort" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Chain:">
|
||||
<NSelect v-model:value="chain" :options="chainOptions" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Rule Order:">
|
||||
<NInputNumber v-model:value="ruleOrder" />
|
||||
</NFormItem>
|
||||
</NForm>
|
||||
|
||||
<c-card title="Generated iptables command">
|
||||
<textarea-copyable :value="command" />
|
||||
</c-card>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<table border="1" class="w-full border-collapse text-left text-sm text-gray-500 dark:text-gray-400">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Meaning</strong></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>iptables -L</td>
|
||||
<td>List all rules in the selected chain</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>iptables -t nat -n -L</td>
|
||||
<td>List all NAT rules</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>iptables -L -n --line-numbers</td>
|
||||
<td>List all rules including their line number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>iptables -F</td>
|
||||
<td>Delete existing rules</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>iptables -D INPUT 2</td>
|
||||
<td>Delete the second rule in the INPUT chain</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>iptables -t nat -D PREROUTING 2</td>
|
||||
<td>Delete the second rule in the NAT table</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>iptables -A INPUT -s "<ip address>" -j DROP</td>
|
||||
<td>Block a specific IP address</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>iptables -A INPUT -p tcp --dport 80 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT</td>
|
||||
<td>Limit connections to 25 per minute on port 80, after 100 connections have been reached</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>iptables -N MYCHAIN</td>
|
||||
<td>Create a new chain called "MYCHAIN"</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</template>
|
||||
@@ -6,7 +6,7 @@ export const tool = defineTool({
|
||||
name: translate('tools.javascript-to-json.title'),
|
||||
path: '/javascript-to-json',
|
||||
description: translate('tools.javascript-to-json.description'),
|
||||
keywords: ['javascript', 'to', 'json'],
|
||||
keywords: ['javascript', 'json'],
|
||||
component: () => import('./javascript-to-json.vue'),
|
||||
icon: Braces,
|
||||
createdAt: new Date('2024-03-29'),
|
||||
|
||||
@@ -4,12 +4,21 @@ import type { UseValidationRule } from '@/composable/validation';
|
||||
import { isNotThrowing } from '@/utils/boolean';
|
||||
import { withDefaultOnError } from '@/utils/defaults';
|
||||
|
||||
function parseJSON(value: string) {
|
||||
try {
|
||||
return JSON5.parse(value);
|
||||
}
|
||||
catch {
|
||||
return JSON5.parse(value.replace(/`((?:[^`]|\\`)*)`/g, (_m, s) => `"${s.replace(/"/g, '\\""').replace(/\r/g, '\\r').replace(/\n/g, '\\n')}"`));
|
||||
}
|
||||
}
|
||||
|
||||
const indentSize = useStorage('json-prettify:indent-size', 3);
|
||||
const transformer = (value: string) => withDefaultOnError(() => JSON.stringify(JSON5.parse(value), null, indentSize.value), '');
|
||||
const transformer = (value: string) => withDefaultOnError(() => JSON.stringify(parseJSON(value), null, indentSize.value), '');
|
||||
|
||||
const rules: UseValidationRule<string>[] = [
|
||||
{
|
||||
validator: (value: string) => value === '' || isNotThrowing(() => JSON.stringify(JSON5.parse(value))),
|
||||
validator: (value: string) => value === '' || isNotThrowing(() => JSON.stringify(parseJSON(value))),
|
||||
message: 'Provided JS Object is not valid.',
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useThemeVars } from 'naive-ui';
|
||||
import Memo from './jq-memo.md';
|
||||
import Memo from './jq.md';
|
||||
|
||||
const themeVars = useThemeVars();
|
||||
</script>
|
||||
|
||||
File renamed without changes.
@@ -1,20 +0,0 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { jsonToGo } from './json-to-go.service';
|
||||
import testCases from './json-to-go.test.data.json';
|
||||
|
||||
describe('json-to-go', () => {
|
||||
describe('jsonToGo', () => {
|
||||
for (const includeExampleData of [true, false]) {
|
||||
it(`must return correct results (includeExampleData = ${includeExampleData})`, () => {
|
||||
for (const testCase of testCases) {
|
||||
const got = jsonToGo(testCase.input, '', false, includeExampleData);
|
||||
const expected = includeExampleData
|
||||
? testCase.expectedWithExample
|
||||
: testCase.expected;
|
||||
|
||||
expect(got.go).to.equal(expected);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,430 +0,0 @@
|
||||
// JSON-to-Go
|
||||
// by Matt Holt
|
||||
// https://github.com/mholt/json-to-go
|
||||
// A simple utility to translate JSON into a Go type definition.
|
||||
export function jsonToGo(json: string, typename: string | '', flatten = true, example = false, allOmitempty = false) {
|
||||
let data;
|
||||
let scope;
|
||||
let go = '';
|
||||
let tabs = 0;
|
||||
const seen: { [key: string]: any } = {};
|
||||
const stack: any[] = [];
|
||||
let accumulator = '';
|
||||
const innerTabs = 0;
|
||||
let parent = '';
|
||||
|
||||
try {
|
||||
data = JSON.parse(json.replace(/(:\s*\[?\s*-?\d*)\.0/g, '$1.1')); // NOSONAR : hack that forces floats to stay as floats
|
||||
scope = data;
|
||||
}
|
||||
catch (e) {
|
||||
return {
|
||||
go: '',
|
||||
};
|
||||
}
|
||||
|
||||
typename = format(typename || 'AutoGenerated');
|
||||
append(`type ${typename} `);
|
||||
|
||||
parseScope(scope);
|
||||
|
||||
return {
|
||||
go: flatten
|
||||
? go += accumulator
|
||||
: go,
|
||||
};
|
||||
|
||||
function parseScope(scope: string | any[] | null, depth = 0) {
|
||||
if (typeof scope === 'object' && scope !== null) {
|
||||
if (Array.isArray(scope)) {
|
||||
let sliceType;
|
||||
const scopeLength = scope.length;
|
||||
|
||||
for (let i = 0; i < scopeLength; i++) {
|
||||
const thisType = goType(scope[i]);
|
||||
if (!sliceType) {
|
||||
sliceType = thisType;
|
||||
}
|
||||
else if (sliceType !== thisType) {
|
||||
sliceType = mostSpecificPossibleGoType(thisType, sliceType);
|
||||
if (sliceType === 'any') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const slice = flatten && ['struct', 'slice'].includes(sliceType ?? '[]')
|
||||
? `[]${parent}`
|
||||
: '[]';
|
||||
|
||||
if (flatten && depth >= 2) {
|
||||
appender(slice);
|
||||
}
|
||||
else { append(slice); };
|
||||
if (sliceType === 'struct') {
|
||||
const allFields = {} as Record<string, { value: string; count: number }>;
|
||||
|
||||
// for each field counts how many times appears
|
||||
for (let i = 0; i < scopeLength; i++) {
|
||||
const keys = Object.keys(scope[i]);
|
||||
for (const k in keys) {
|
||||
let keyname = keys[k];
|
||||
if (!(keyname in allFields)) {
|
||||
allFields[keyname] = {
|
||||
value: scope[i][keyname],
|
||||
count: 0,
|
||||
};
|
||||
}
|
||||
else {
|
||||
const existingValue = allFields[keyname].value;
|
||||
const currentValue = scope[i][keyname];
|
||||
|
||||
if (compareObjects(existingValue, currentValue)) {
|
||||
const comparisonResult = compareObjectKeys(
|
||||
Object.keys(currentValue),
|
||||
Object.keys(existingValue),
|
||||
);
|
||||
if (!comparisonResult) {
|
||||
keyname = `${keyname}_${uuidv4()}`;
|
||||
allFields[keyname] = {
|
||||
value: currentValue,
|
||||
count: 0,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
allFields[keyname].count++;
|
||||
}
|
||||
}
|
||||
|
||||
// create a common struct with all fields found in the current array
|
||||
// omitempty dict indicates if a field is optional
|
||||
const keys = Object.keys(allFields);
|
||||
const struct = {} as Record<string, string>;
|
||||
const omitempty = {} as Record<string, boolean>;
|
||||
for (const k in keys) {
|
||||
const keyname = keys[k];
|
||||
const elem = allFields[keyname];
|
||||
|
||||
struct[keyname] = elem.value;
|
||||
omitempty[keyname] = elem.count !== scopeLength;
|
||||
}
|
||||
parseStruct(depth + 1, innerTabs, struct, omitempty); // finally parse the struct !!
|
||||
}
|
||||
else if (sliceType === 'slice') {
|
||||
parseScope(scope[0], depth);
|
||||
}
|
||||
else {
|
||||
if (flatten && depth >= 2) {
|
||||
appender(sliceType || 'any');
|
||||
}
|
||||
else {
|
||||
append(sliceType || 'any');
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (flatten) {
|
||||
if (depth >= 2) {
|
||||
appender(parent);
|
||||
}
|
||||
else {
|
||||
append(parent);
|
||||
}
|
||||
}
|
||||
parseStruct(depth + 1, innerTabs, scope, undefined);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (flatten && depth >= 2) {
|
||||
appender(goType(scope));
|
||||
}
|
||||
else {
|
||||
append(goType(scope));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parseStruct(depth: number | undefined, innerTabs: number, scope: { [x: string]: any }, omitempty: { [x: string]: boolean } | undefined) {
|
||||
if (flatten) {
|
||||
if (depth !== undefined) {
|
||||
stack.push(
|
||||
depth >= 2
|
||||
? '\n'
|
||||
: '',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const seenTypeNames = [];
|
||||
|
||||
if (flatten && depth !== undefined && depth >= 2) {
|
||||
const parentType = `type ${parent}`;
|
||||
const scopeKeys = formatScopeKeys(Object.keys(scope));
|
||||
|
||||
// this can only handle two duplicate items
|
||||
// future improvement will handle the case where there could
|
||||
// three or more duplicate keys with different values
|
||||
if (parent in seen && compareObjectKeys(scopeKeys, seen[parent])) {
|
||||
stack.pop();
|
||||
return;
|
||||
}
|
||||
seen[parent] = scopeKeys;
|
||||
|
||||
appender(`${parentType} struct {\n`);
|
||||
++innerTabs;
|
||||
const keys = Object.keys(scope);
|
||||
for (const i in keys) {
|
||||
const keyname = getOriginalName(keys[i]);
|
||||
indenter(innerTabs);
|
||||
const typename = uniqueTypeName(format(keyname), seenTypeNames);
|
||||
seenTypeNames.push(typename);
|
||||
|
||||
appender(`${typename} `);
|
||||
parent = typename;
|
||||
parseScope(scope[keys[i]], depth);
|
||||
appender(` \`json:"${keyname}`);
|
||||
if (allOmitempty || (omitempty && omitempty[keys[i]] === true)) {
|
||||
appender(',omitempty');
|
||||
}
|
||||
appender('"`\n');
|
||||
}
|
||||
indenter(--innerTabs);
|
||||
appender('}');
|
||||
}
|
||||
else {
|
||||
append('struct {\n');
|
||||
++tabs;
|
||||
const keys = Object.keys(scope);
|
||||
for (const i in keys) {
|
||||
const keyname = getOriginalName(keys[i]);
|
||||
indent(tabs);
|
||||
const typename = uniqueTypeName(format(keyname), seenTypeNames);
|
||||
seenTypeNames.push(typename);
|
||||
append(`${typename} `);
|
||||
parent = typename;
|
||||
parseScope(scope[keys[i]], depth);
|
||||
append(` \`json:"${keyname}`);
|
||||
if (allOmitempty || (omitempty && omitempty[keys[i]] === true)) {
|
||||
append(',omitempty');
|
||||
}
|
||||
if (example && scope[keys[i]] !== '' && typeof scope[keys[i]] !== 'object') {
|
||||
append(`" example:"${scope[keys[i]]}`);
|
||||
}
|
||||
append('"`\n');
|
||||
}
|
||||
indent(--tabs);
|
||||
append('}');
|
||||
}
|
||||
if (flatten) {
|
||||
accumulator += stack.pop();
|
||||
}
|
||||
}
|
||||
|
||||
function indent(tabs: number) {
|
||||
for (let i = 0; i < tabs; i++) {
|
||||
go += '\t';
|
||||
}
|
||||
}
|
||||
|
||||
function append(str: string) {
|
||||
go += str;
|
||||
}
|
||||
|
||||
function indenter(tabs: number) {
|
||||
for (let i = 0; i < tabs; i++) {
|
||||
stack[stack.length - 1] += '\t';
|
||||
}
|
||||
}
|
||||
|
||||
function appender(str: string) {
|
||||
stack[stack.length - 1] += str;
|
||||
}
|
||||
|
||||
// Generate a unique name to avoid duplicate struct field names.
|
||||
// This function appends a number at the end of the field name.
|
||||
function uniqueTypeName(name: string, seen: string | any[]) {
|
||||
if (!seen.includes(name)) {
|
||||
return name;
|
||||
}
|
||||
|
||||
let i = 0;
|
||||
while (true) {
|
||||
const newName = name + i.toString();
|
||||
if (!seen.includes(newName)) {
|
||||
return newName;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
// Sanitizes and formats a string to make an appropriate identifier in Go
|
||||
function format(str: any) {
|
||||
str = formatNumber(str);
|
||||
|
||||
const sanitized = toProperCase(str).replace(/[^a-z0-9]/ig, '');
|
||||
if (!sanitized) {
|
||||
return 'NAMING_FAILED';
|
||||
}
|
||||
|
||||
// After sanitizing the remaining characters can start with a number.
|
||||
// Run the sanitized string again trough formatNumber to make sure the identifier is Num[0-9] or Zero_... instead of 1.
|
||||
return formatNumber(sanitized);
|
||||
}
|
||||
|
||||
// Adds a prefix to a number to make an appropriate identifier in Go
|
||||
function formatNumber(str: string) {
|
||||
if (!str) {
|
||||
return '';
|
||||
}
|
||||
else if (str.match(/^\d+$/)) {
|
||||
str = `Num${str}`;
|
||||
}
|
||||
else if (str.charAt(0).match(/\d/)) {
|
||||
const numbers: { [key: string]: string } = {
|
||||
0: 'Zero_',
|
||||
1: 'One_',
|
||||
2: 'Two_',
|
||||
3: 'Three_',
|
||||
4: 'Four_',
|
||||
5: 'Five_',
|
||||
6: 'Six_',
|
||||
7: 'Seven_',
|
||||
8: 'Eight_',
|
||||
9: 'Nine_',
|
||||
};
|
||||
str = numbers[str.charAt(0)] + str.substr(1);
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// Determines the most appropriate Go type
|
||||
function goType(val: string | number | null) {
|
||||
if (val === null) {
|
||||
return 'any';
|
||||
}
|
||||
|
||||
switch (typeof val) {
|
||||
case 'string':
|
||||
if (/\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(\+\d\d:\d\d|Z)/.test(val)) {
|
||||
return 'time.Time';
|
||||
}
|
||||
else { return 'string'; }
|
||||
case 'number':
|
||||
if (val % 1 === 0) {
|
||||
if (val > -2147483648 && val < 2147483647) {
|
||||
return 'int';
|
||||
}
|
||||
else { return 'int64'; }
|
||||
}
|
||||
else { return 'float64'; }
|
||||
case 'boolean':
|
||||
return 'bool';
|
||||
case 'object':
|
||||
if (Array.isArray(val)) {
|
||||
return 'slice';
|
||||
}
|
||||
return 'struct';
|
||||
default:
|
||||
return 'any';
|
||||
}
|
||||
}
|
||||
|
||||
// Given two types, returns the more specific of the two
|
||||
function mostSpecificPossibleGoType(typ1: string, typ2: string) {
|
||||
if (typ1.substr(0, 5) === 'float' && typ2.substr(0, 3) === 'int') {
|
||||
return typ1;
|
||||
}
|
||||
else if (typ1.substr(0, 3) === 'int' && typ2.substr(0, 5) === 'float') {
|
||||
return typ2;
|
||||
}
|
||||
else { return 'any'; }
|
||||
}
|
||||
|
||||
// Proper cases a string according to Go conventions
|
||||
function toProperCase(str: string) {
|
||||
// ensure that the SCREAMING_SNAKE_CASE is converted to snake_case
|
||||
if (str.match(/^[_A-Z0-9]+$/)) {
|
||||
str = str.toLowerCase();
|
||||
}
|
||||
|
||||
// https://github.com/golang/lint/blob/5614ed5bae6fb75893070bdc0996a68765fdd275/lint.go#L771-L810
|
||||
const commonInitialisms = [
|
||||
'ACL', 'API', 'ASCII', 'CPU', 'CSS', 'DNS', 'EOF', 'GUID', 'HTML', 'HTTP',
|
||||
'HTTPS', 'ID', 'IP', 'JSON', 'LHS', 'QPS', 'RAM', 'RHS', 'RPC', 'SLA',
|
||||
'SMTP', 'SQL', 'SSH', 'TCP', 'TLS', 'TTL', 'UDP', 'UI', 'UID', 'UUID',
|
||||
'URI', 'URL', 'UTF8', 'VM', 'XML', 'XMPP', 'XSRF', 'XSS',
|
||||
];
|
||||
|
||||
return str.replace(/(^|[^a-zA-Z])([a-z]+)/g, (unused: any, sep: any, frag: string | string[]) => {
|
||||
if (!Array.isArray(frag) && commonInitialisms.includes(frag.toUpperCase())) {
|
||||
return sep + frag.toUpperCase();
|
||||
}
|
||||
else {
|
||||
return sep + frag[0].toUpperCase() + (frag as string).substr(1).toLowerCase();
|
||||
}
|
||||
}).replace(/([A-Z])([a-z]+)/g, (unused: any, sep: any, frag: string) => {
|
||||
if (commonInitialisms.includes(sep + frag.toUpperCase())) {
|
||||
return (sep + frag).toUpperCase();
|
||||
}
|
||||
else { return sep + frag; }
|
||||
});
|
||||
}
|
||||
|
||||
function uuidv4() {
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
||||
const r = Math.random() * 16 | 0; // NOSONAR
|
||||
const v = c === 'x' ? r : (r & 0x3 | 0x8);
|
||||
return v.toString(16);
|
||||
});
|
||||
}
|
||||
|
||||
function getOriginalName(unique: string) {
|
||||
const reLiteralUUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
||||
const uuidLength = 36;
|
||||
|
||||
if (unique.length >= uuidLength) {
|
||||
const tail = unique.substr(-uuidLength);
|
||||
if (reLiteralUUID.test(tail)) {
|
||||
return unique.slice(0, -1 * (uuidLength + 1));
|
||||
}
|
||||
}
|
||||
return unique;
|
||||
}
|
||||
|
||||
function compareObjects(objectA: any, objectB: any) {
|
||||
const object = '[object Object]';
|
||||
return Object.prototype.toString.call(objectA) === object && Object.prototype.toString.call(objectB) === object;
|
||||
}
|
||||
|
||||
function compareObjectKeys(itemAKeys: string | any[], itemBKeys: string | any[]) {
|
||||
const lengthA = itemAKeys.length;
|
||||
const lengthB = itemBKeys.length;
|
||||
|
||||
// nothing to compare, probably identical
|
||||
if (lengthA === 0 && lengthB === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// duh
|
||||
if (lengthA !== lengthB) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const item of itemAKeys) {
|
||||
if (!itemBKeys.includes(item)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function formatScopeKeys(keys: string[]) {
|
||||
for (const i in keys) {
|
||||
keys[i] = format(keys[i]);
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
|
||||
[
|
||||
{
|
||||
"input": "{\"SourceCode\": \"exampleDataHere\"}",
|
||||
"expected": "type AutoGenerated struct {\n\tSourceCode string `json:\"SourceCode\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tSourceCode string `json:\"SourceCode\" example:\"exampleDataHere\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"source_code\": \"exampleDataHere\"}",
|
||||
"expected": "type AutoGenerated struct {\n\tSourceCode string `json:\"source_code\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tSourceCode string `json:\"source_code\" example:\"exampleDataHere\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"sourceCode\": \"exampleDataHere\"}",
|
||||
"expected": "type AutoGenerated struct {\n\tSourceCode string `json:\"sourceCode\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tSourceCode string `json:\"sourceCode\" example:\"exampleDataHere\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"SOURCE_CODE\": \"\"}",
|
||||
"expected": "type AutoGenerated struct {\n\tSourceCode string `json:\"SOURCE_CODE\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tSourceCode string `json:\"SOURCE_CODE\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"PublicIP\": \"\"}",
|
||||
"expected": "type AutoGenerated struct {\n\tPublicIP string `json:\"PublicIP\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tPublicIP string `json:\"PublicIP\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"public_ip\": \"\"}",
|
||||
"expected": "type AutoGenerated struct {\n\tPublicIP string `json:\"public_ip\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tPublicIP string `json:\"public_ip\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"publicIP\": \"\"}",
|
||||
"expected": "type AutoGenerated struct {\n\tPublicIP string `json:\"publicIP\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tPublicIP string `json:\"publicIP\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"PUBLIC_IP\": \"\"}",
|
||||
"expected": "type AutoGenerated struct {\n\tPublicIP string `json:\"PUBLIC_IP\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tPublicIP string `json:\"PUBLIC_IP\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"+1\": \"Fails\", \"-1\": \"This should not cause duplicate field name\"}",
|
||||
"expected": "type AutoGenerated struct {\n\tNum1 string `json:\"+1\"`\n\tNum10 string `json:\"-1\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tNum1 string `json:\"+1\" example:\"Fails\"`\n\tNum10 string `json:\"-1\" example:\"This should not cause duplicate field name\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"age\": 46}",
|
||||
"expected": "type AutoGenerated struct {\n\tAge int `json:\"age\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tAge int `json:\"age\" example:\"46\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"negativeFloat\": -1.00}",
|
||||
"expected": "type AutoGenerated struct {\n\tNegativeFloat float64 `json:\"negativeFloat\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tNegativeFloat float64 `json:\"negativeFloat\" example:\"-1.1\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"zeroFloat\": 0.00}",
|
||||
"expected": "type AutoGenerated struct {\n\tZeroFloat float64 `json:\"zeroFloat\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tZeroFloat float64 `json:\"zeroFloat\" example:\"0.1\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"positiveFloat\": 1.00}",
|
||||
"expected": "type AutoGenerated struct {\n\tPositiveFloat float64 `json:\"positiveFloat\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tPositiveFloat float64 `json:\"positiveFloat\" example:\"1.1\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"negativeFloats\": [-1.00, -2.00, -3.00]}",
|
||||
"expected": "type AutoGenerated struct {\n\tNegativeFloats []float64 `json:\"negativeFloats\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tNegativeFloats []float64 `json:\"negativeFloats\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"zeroFloats\": [0.00, 0.00, 0.00]}",
|
||||
"expected": "type AutoGenerated struct {\n\tZeroFloats []float64 `json:\"zeroFloats\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tZeroFloats []float64 `json:\"zeroFloats\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"positiveFloats\": [1.00, 2.00, 3.00]}",
|
||||
"expected": "type AutoGenerated struct {\n\tPositiveFloats []float64 `json:\"positiveFloats\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tPositiveFloats []float64 `json:\"positiveFloats\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"topLevel\": { \"secondLevel\": \"exampleDataHere\"} }",
|
||||
"expected": "type AutoGenerated struct {\n\tTopLevel struct {\n\t\tSecondLevel string `json:\"secondLevel\"`\n\t} `json:\"topLevel\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tTopLevel struct {\n\t\tSecondLevel string `json:\"secondLevel\" example:\"exampleDataHere\"`\n\t} `json:\"topLevel\"`\n}"
|
||||
},
|
||||
{
|
||||
"input": "{\"people\": [{ \"name\": \"Frank\"}, {\"name\": \"Dennis\"}, {\"name\": \"Dee\"}, {\"name\": \"Charley\"}, {\"name\":\"Mac\"}] }",
|
||||
"expected": "type AutoGenerated struct {\n\tPeople []struct {\n\t\tName string `json:\"name\"`\n\t} `json:\"people\"`\n}",
|
||||
"expectedWithExample": "type AutoGenerated struct {\n\tPeople []struct {\n\t\tName string `json:\"name\" example:\"Frank\"`\n\t} `json:\"people\"`\n}"
|
||||
}
|
||||
]
|
||||
@@ -1,14 +1,82 @@
|
||||
<script setup lang="ts">
|
||||
import JSON5 from 'json5';
|
||||
import { jsonToGo } from './json-to-go.service';
|
||||
import { InputData, jsonInputForTargetLanguage, quicktype } from 'quicktype-core';
|
||||
import type { UseValidationRule } from '@/composable/validation';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const defaultValue = `{
|
||||
a:"n",
|
||||
arr: [1, 2],
|
||||
nested: {
|
||||
a:1,
|
||||
b:"2"
|
||||
}
|
||||
}`;
|
||||
const jsonInput = ref(defaultValue);
|
||||
const rootName = useQueryParamOrStorage({ name: 'root', storageName: 'json-go:r', defaultValue: 'MyType' });
|
||||
const packageName = useQueryParamOrStorage({ name: 'package', storageName: 'json-go:p', defaultValue: 'main' });
|
||||
const tags = useQueryParamOrStorage({ name: 'tags', storageName: 'json-go:t', defaultValue: 'json' });
|
||||
const plainTypesOnly = useQueryParamOrStorage({ name: 'plainTypes', storageName: 'json-go:pt', defaultValue: false });
|
||||
const plainTypesWithPackageOnly = useQueryParamOrStorage({ name: 'plainTypesPackage', storageName: 'json-go:ptp', defaultValue: false });
|
||||
const optionalProperties = useQueryParamOrStorage({ name: 'optional', storageName: 'json-go:op', defaultValue: false });
|
||||
const omitEmpty = useQueryParamOrStorage({ name: 'omit', storageName: 'json-go:oe', defaultValue: false });
|
||||
|
||||
async function convertJsonToGo(
|
||||
json: string,
|
||||
options: {
|
||||
rootName: string
|
||||
packageName?: string
|
||||
tags?: string
|
||||
plainTypesOnly?: boolean
|
||||
plainTypesWithPackageOnly?: boolean
|
||||
optionalProperties?: boolean
|
||||
omitEmpty?: boolean
|
||||
},
|
||||
): Promise<string> {
|
||||
const targetLanguage = 'go';
|
||||
const inputData = new InputData();
|
||||
const jsonInput = jsonInputForTargetLanguage(targetLanguage);
|
||||
|
||||
await jsonInput.addSource({ name: options.rootName, samples: [JSON.stringify(JSON5.parse(json))] });
|
||||
inputData.addInput(jsonInput);
|
||||
|
||||
const result = await quicktype({
|
||||
inputData,
|
||||
lang: targetLanguage,
|
||||
topLevel: options.rootName,
|
||||
allPropertiesOptional: options.optionalProperties,
|
||||
rendererOptions: {
|
||||
'package': options.packageName ?? 'main',
|
||||
'field-tags': options.tags ?? false,
|
||||
'just-types': options.plainTypesOnly ?? false,
|
||||
'just-types-and-package': options.plainTypesWithPackageOnly ?? false,
|
||||
'omit-empty': options.optionalProperties ?? false,
|
||||
},
|
||||
} as any);
|
||||
|
||||
return result.lines.join('\n');
|
||||
}
|
||||
|
||||
const goOutput = computedAsync(async () => {
|
||||
try {
|
||||
return await convertJsonToGo(jsonInput.value,
|
||||
{
|
||||
rootName: rootName.value,
|
||||
packageName: packageName.value,
|
||||
tags: tags.value,
|
||||
plainTypesOnly: plainTypesOnly.value,
|
||||
plainTypesWithPackageOnly: plainTypesWithPackageOnly.value,
|
||||
optionalProperties: optionalProperties.value,
|
||||
omitEmpty: omitEmpty.value,
|
||||
},
|
||||
);
|
||||
}
|
||||
catch (e: any) {
|
||||
return e.toString();
|
||||
}
|
||||
});
|
||||
|
||||
const definitions = ref(true);
|
||||
const omitempty = ref(false);
|
||||
const example = ref(false);
|
||||
const jsonInput = ref('');
|
||||
const goOutput = computed(() => jsonToGo(jsonInput.value, '', !definitions.value, example.value, omitempty.value).go);
|
||||
const rules: UseValidationRule<string>[] = [
|
||||
{
|
||||
validator: (v: string) => v === '' || JSON5.parse(v),
|
||||
@@ -19,27 +87,35 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<c-card title="JSON to Go">
|
||||
<n-form-item label="Inline type definitions" label-placement="left">
|
||||
<n-switch v-model:value="definitions" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Omit Empty" label-placement="left">
|
||||
<n-switch v-model:value="omitempty" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Example" label-placement="left">
|
||||
<n-switch v-model:value="example" />
|
||||
</n-form-item>
|
||||
<c-input-text
|
||||
v-model:value="jsonInput"
|
||||
multiline
|
||||
placeholder="Put your json string here..."
|
||||
rows="20"
|
||||
label="JSON to GO"
|
||||
label="JSON to Go"
|
||||
:validation-rules="rules"
|
||||
raw-text
|
||||
mb-5
|
||||
/>
|
||||
<n-space justify="center">
|
||||
<c-input v-model:value="rootName" label="Root Name" />
|
||||
<c-input v-model:value="packageName" label="Package Name" />
|
||||
<c-input v-model:value="tags" label="List of tags which should be generated for fields" />
|
||||
<n-checkbox v-model:checked="plainTypesOnly">
|
||||
Plain types only
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="plainTypesWithPackageOnly">
|
||||
Plain types with package only
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="omitEmpty">
|
||||
Omit empty
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="optionalProperties">
|
||||
Make all properties optional
|
||||
</n-checkbox>
|
||||
</n-space>
|
||||
</c-card>
|
||||
<c-card title="Your Go String">
|
||||
<c-card title="Your Go code">
|
||||
<TextareaCopyable
|
||||
:value="goOutput"
|
||||
language="go"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Braces } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Json to PHP Code',
|
||||
path: '/json-to-php',
|
||||
description: 'Generate PHP Classes from JSON',
|
||||
keywords: ['json', 'php'],
|
||||
component: () => import('./json-to-php.vue'),
|
||||
icon: Braces,
|
||||
createdAt: new Date('2025-04-21'),
|
||||
category: 'JSON',
|
||||
});
|
||||
@@ -0,0 +1,117 @@
|
||||
<script setup lang="ts">
|
||||
import JSON5 from 'json5';
|
||||
import { InputData, jsonInputForTargetLanguage, quicktype } from 'quicktype-core';
|
||||
import type { UseValidationRule } from '@/composable/validation';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const defaultValue = `{
|
||||
a:"n",
|
||||
arr: [1, 2],
|
||||
nested: {
|
||||
a:1,
|
||||
b:"2"
|
||||
}
|
||||
}`;
|
||||
const jsonInput = ref(defaultValue);
|
||||
const rootName = useQueryParamOrStorage({ name: 'root', storageName: 'json-php:r', defaultValue: 'GeneratedClass' });
|
||||
const createGetter = useQueryParamOrStorage({ name: 'getter', storageName: 'json-php:pv', defaultValue: true });
|
||||
const getterWithoutValidation = useQueryParamOrStorage({ name: 'novalid', storageName: 'json-php:cl', defaultValue: false });
|
||||
const createSetter = useQueryParamOrStorage({ name: 'setter', storageName: 'json-php:pn', defaultValue: true });
|
||||
const phpClosingTag = useQueryParamOrStorage({ name: 'closing', storageName: 'json-php:pn', defaultValue: true });
|
||||
const optionalProperties = useQueryParamOrStorage({ name: 'optional', storageName: 'json-php:op', defaultValue: false });
|
||||
|
||||
async function convertJsonToPHP(json: string,
|
||||
options: {
|
||||
rootName: string
|
||||
createGetter?: boolean
|
||||
getterWithoutValidation?: boolean
|
||||
createSetter?: boolean
|
||||
phpClosingTag?: boolean
|
||||
optionalProperties?: boolean
|
||||
}): Promise<string> {
|
||||
const jsonInput = jsonInputForTargetLanguage('php');
|
||||
await jsonInput.addSource({ name: options.rootName, samples: [JSON.stringify(JSON5.parse(json))] });
|
||||
|
||||
const inputData = new InputData();
|
||||
inputData.addInput(jsonInput);
|
||||
|
||||
const { lines } = await quicktype({
|
||||
inputData,
|
||||
lang: 'php',
|
||||
topLevel: options.rootName,
|
||||
allPropertiesOptional: options.optionalProperties,
|
||||
rendererOptions: {
|
||||
'with-get': options.createGetter,
|
||||
'fast-get': options.getterWithoutValidation,
|
||||
'with-set': options.createSetter,
|
||||
'with-closing': options.phpClosingTag,
|
||||
},
|
||||
} as any);
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
const phpOutput = computedAsync(async () => {
|
||||
try {
|
||||
return await convertJsonToPHP(jsonInput.value,
|
||||
{
|
||||
rootName: rootName.value,
|
||||
createGetter: createGetter.value,
|
||||
getterWithoutValidation: getterWithoutValidation.value,
|
||||
createSetter: createSetter.value,
|
||||
phpClosingTag: phpClosingTag.value,
|
||||
optionalProperties: optionalProperties.value,
|
||||
},
|
||||
);
|
||||
}
|
||||
catch (e: any) {
|
||||
return e.toString();
|
||||
}
|
||||
});
|
||||
|
||||
const rules: UseValidationRule<string>[] = [
|
||||
{
|
||||
validator: (v: string) => v === '' || JSON5.parse(v),
|
||||
message: 'Provided JSON is not valid.',
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<c-card title="JSON to PHP">
|
||||
<c-input-text
|
||||
v-model:value="jsonInput"
|
||||
multiline
|
||||
placeholder="Put your json string here..."
|
||||
rows="20"
|
||||
label="Your JSON object:"
|
||||
:validation-rules="rules"
|
||||
raw-text
|
||||
mb-5
|
||||
/>
|
||||
<c-input-text v-model:value="rootName" label="Root Name:" label-position="left" mb-2 />
|
||||
<n-space justify="center">
|
||||
<n-checkbox v-model:checked="createGetter">
|
||||
Create Getter
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="getterWithoutValidation">
|
||||
Getter without validation
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="createSetter">
|
||||
Create Setter
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="phpClosingTag">
|
||||
PHP Closing Tag
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="optionalProperties">
|
||||
Make all properties optional
|
||||
</n-checkbox>
|
||||
</n-space>
|
||||
</c-card>
|
||||
<c-card title="Your PHP code">
|
||||
<TextareaCopyable
|
||||
:value="phpOutput"
|
||||
language="php"
|
||||
/>
|
||||
</c-card>
|
||||
</template>
|
||||
Loaded 100 of 189 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user