1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-09-01 18:04:10 +02:00

update tags

This commit is contained in:
codecalm
2023-09-27 22:07:27 +02:00
parent 8b3a25619f
commit 09b4b24892
23 changed files with 32 additions and 15 deletions

View File

@@ -1,30 +1,28 @@
import fs from 'fs'
import csv from 'csv-parser'
import { join } from 'path'
import { HOME_DIR } from './helpers.mjs'
fs.createReadStream(join(HOME_DIR, '_import.tsv')).pipe(csv({
headers: false,
separator: '\t'
})).on('data', (row) => {
console.log(row[2], row[3])
const filename = join(HOME_DIR, `src/_icons/${row[2]}.svg`)
const data = JSON.parse(fs.readFileSync(join(HOME_DIR, 'new/tags.json'), 'utf-8'))
if(row[3].length) {
for (const [key, tags] of Object.entries(data)) {
const filename = join(HOME_DIR, `src/_icons/${key}.svg`)
if (key && tags.length) {
let data = fs.readFileSync(filename).toString()
data = data.replace(/(---[\s\S]+?---)/, function(m, headerContent) {
headerContent = headerContent.replace(/tags: .*\n/, '')
headerContent = headerContent.replace(/---/, `---\ntags: [${row[3]}]`)
headerContent = headerContent.replace(/---/, `---\ntags: [${tags.join(', ')}]`)
return headerContent
})
console.log(`Updating ${key} with tags: ${tags.join(', ')}`)
fs.writeFileSync(filename, data)
}
}
}).on('end', () => {
console.log('CSV file successfully processed')
})
console.log('CSV file successfully processed')

View File

@@ -1,4 +1,5 @@
---
tags: [notification, metric, ringing, mean, alertness, time, clockwork, signal, bell, chime]
category: System
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [merge-left, shift-left, combine-left, direction-left, join-left, move-left, alt-left-arrow, leftward, left-shift, left-merge]
category: Arrows
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [merge-right, shift-right, combine-right, direction-right, join-right, move-right, alt-right-arrow, rightward, right-shift, right-merge]
category: Arrows
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [mattress, sofa, couch, futon, sleeping, restful, horizontal, recline, lying, horizontal-bed]
---
<svg>
<path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />

View File

@@ -1,6 +1,6 @@
---
tags: [furniture, sleeping, comfortable, bedroom, mattress, resting, relax, sleep, futon, cozy]
category: Map
tags: [sleep, night, bedroom, rest]
version: "1.2"
unicode: "eb5c"
---

View File

@@ -1,4 +1,5 @@
---
tags: [mixer, kitchen, appliance, blend, food, smoothie, processing, mixing, grind, blending]
---
<svg>
<path d="M9 10h-3a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h10.802a1 1 0 0 1 .984 1.179l-1.786 9.821" />

View File

@@ -1,4 +1,5 @@
---
tags: [medical, health, biometric, wellness, check-up, diagnostic, physical, anatomy, examination, body-health]
category: System
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [layout, pattern, matrix, arrangement, gridlines, cell, structure, block, squares, grid-pattern]
category: Design
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [layout, matrix, pattern, gridlines, arrangement, structure, block, squares, four-by-four, grid-pattern]
category: Design
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [layout, pattern, matrix, arrangement, golden-ratio, cell, structure, ratio, gridlines, grid-structure]
category: Design
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [data, matrix, layout, pattern, dimension, analysis, structure, mapping, inspection, grid-data]
category: System
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [image, capture, photograph, picture, snapshot, scan-image, photogrammetry, visual-scan, picture-analysis, photo-analysis]
category: System
---
<svg>

View File

@@ -1,6 +1,6 @@
---
tags: [path, journey, direction, trail, navigate, travel, way, road, route-two, 2-direction]
category: Map
tags: [path, navigation, map]
unicode: "f4b6"
version: "1.97"
---

View File

@@ -1,4 +1,5 @@
---
tags: [alternate-left, alternate-route, left-path, alternate-way, left-trail, alt-left-road, leftward-route, shift-left, change-left, left-road]
category: Maps
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [alternate-right, alternate-route, right-path, alternate-way, right-trail, alt-right-road, rightward-route, shift-right, change-right, right-road]
category: Maps
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [square-route, route-square, path, journey, direction, trail, navigate, travel, way, square-direction]
category: Maps
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [path, journey, direction, trail, navigate, travel, way, square, geometric-route, square-path]
category: Maps
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [x-route, route-x, path, journey, direction, trail, navigate, travel, way, crossing]
category: Maps
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [path, journey, direction, trail, navigate, travel, way, cross, x-cross, cross-path]
category: Maps
---
<svg>

View File

@@ -1,6 +1,6 @@
---
tags: [path, journey, direction, trail, navigate, travel, way, road, travel-route, route-way]
category: Map
tags: [path, navigation, map]
version: "1.0"
unicode: "eb17"
---

View File

@@ -1,4 +1,5 @@
---
tags: [identity, biometric, authentication, recognition, profile, verification, user-data, user-profile, scan-identity, identity-verification]
category: System
---
<svg>

View File

@@ -1,4 +1,5 @@
---
tags: [magnify, enlarge, analyze, focus, enhance, view, magnification, zoom-in, scan-zoom, magnify-scan]
category: System
---
<svg>