mirror of
https://github.com/tabler/tabler-icons.git
synced 2025-09-02 18:33:18 +02:00
update tags
This commit is contained in:
@@ -1,30 +1,28 @@
|
|||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import csv from 'csv-parser'
|
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import { HOME_DIR } from './helpers.mjs'
|
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()
|
let data = fs.readFileSync(filename).toString()
|
||||||
data = data.replace(/(---[\s\S]+?---)/, function(m, headerContent) {
|
data = data.replace(/(---[\s\S]+?---)/, function(m, headerContent) {
|
||||||
|
|
||||||
headerContent = headerContent.replace(/tags: .*\n/, '')
|
headerContent = headerContent.replace(/tags: .*\n/, '')
|
||||||
headerContent = headerContent.replace(/---/, `---\ntags: [${row[3]}]`)
|
headerContent = headerContent.replace(/---/, `---\ntags: [${tags.join(', ')}]`)
|
||||||
|
|
||||||
return headerContent
|
return headerContent
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log(`Updating ${key} with tags: ${tags.join(', ')}`)
|
||||||
fs.writeFileSync(filename, data)
|
fs.writeFileSync(filename, data)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}).on('end', () => {
|
console.log('CSV file successfully processed')
|
||||||
console.log('CSV file successfully processed')
|
|
||||||
})
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [notification, metric, ringing, mean, alertness, time, clockwork, signal, bell, chime]
|
||||||
category: System
|
category: System
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -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
|
category: Arrows
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -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
|
category: Arrows
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [mattress, sofa, couch, futon, sleeping, restful, horizontal, recline, lying, horizontal-bed]
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
<path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
<path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
|
tags: [furniture, sleeping, comfortable, bedroom, mattress, resting, relax, sleep, futon, cozy]
|
||||||
category: Map
|
category: Map
|
||||||
tags: [sleep, night, bedroom, rest]
|
|
||||||
version: "1.2"
|
version: "1.2"
|
||||||
unicode: "eb5c"
|
unicode: "eb5c"
|
||||||
---
|
---
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [mixer, kitchen, appliance, blend, food, smoothie, processing, mixing, grind, blending]
|
||||||
---
|
---
|
||||||
<svg>
|
<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" />
|
<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" />
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [medical, health, biometric, wellness, check-up, diagnostic, physical, anatomy, examination, body-health]
|
||||||
category: System
|
category: System
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [layout, pattern, matrix, arrangement, gridlines, cell, structure, block, squares, grid-pattern]
|
||||||
category: Design
|
category: Design
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [layout, matrix, pattern, gridlines, arrangement, structure, block, squares, four-by-four, grid-pattern]
|
||||||
category: Design
|
category: Design
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [layout, pattern, matrix, arrangement, golden-ratio, cell, structure, ratio, gridlines, grid-structure]
|
||||||
category: Design
|
category: Design
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [data, matrix, layout, pattern, dimension, analysis, structure, mapping, inspection, grid-data]
|
||||||
category: System
|
category: System
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [image, capture, photograph, picture, snapshot, scan-image, photogrammetry, visual-scan, picture-analysis, photo-analysis]
|
||||||
category: System
|
category: System
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
|
tags: [path, journey, direction, trail, navigate, travel, way, road, route-two, 2-direction]
|
||||||
category: Map
|
category: Map
|
||||||
tags: [path, navigation, map]
|
|
||||||
unicode: "f4b6"
|
unicode: "f4b6"
|
||||||
version: "1.97"
|
version: "1.97"
|
||||||
---
|
---
|
||||||
|
@@ -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
|
category: Maps
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -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
|
category: Maps
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [square-route, route-square, path, journey, direction, trail, navigate, travel, way, square-direction]
|
||||||
category: Maps
|
category: Maps
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [path, journey, direction, trail, navigate, travel, way, square, geometric-route, square-path]
|
||||||
category: Maps
|
category: Maps
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [x-route, route-x, path, journey, direction, trail, navigate, travel, way, crossing]
|
||||||
category: Maps
|
category: Maps
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [path, journey, direction, trail, navigate, travel, way, cross, x-cross, cross-path]
|
||||||
category: Maps
|
category: Maps
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
|
tags: [path, journey, direction, trail, navigate, travel, way, road, travel-route, route-way]
|
||||||
category: Map
|
category: Map
|
||||||
tags: [path, navigation, map]
|
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
unicode: "eb17"
|
unicode: "eb17"
|
||||||
---
|
---
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [identity, biometric, authentication, recognition, profile, verification, user-data, user-profile, scan-identity, identity-verification]
|
||||||
category: System
|
category: System
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
tags: [magnify, enlarge, analyze, focus, enhance, view, magnification, zoom-in, scan-zoom, magnify-scan]
|
||||||
category: System
|
category: System
|
||||||
---
|
---
|
||||||
<svg>
|
<svg>
|
||||||
|
Reference in New Issue
Block a user