1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-01-16 20:28:28 +01:00

add missing categories to icons

This commit is contained in:
codecalm 2023-04-02 16:40:27 +02:00
parent 7dba0f0e86
commit 4f7524d936
1043 changed files with 1068 additions and 523 deletions

View File

@ -3,36 +3,40 @@ import fs from 'fs'
import { resolve, join, basename } from 'path'
import { ICONS_SRC_DIR } from './helpers.mjs'
const extensions = ['heart', 'star', 'off', 'bolt', 'cancel', 'check', 'cog', 'dollar', 'dot', 'eco', 'edit', 'x', 'plus', 'minus', 'shield', 'up', 'down', 'move', 'link', 'ribbon', 'question', 'exclamation', '2', '3', 'code', 'pause', 'pin', 'search', 'share']
glob.sync(join(ICONS_SRC_DIR, '*-filled.svg')).forEach(function(file, i) {
const fileOriginal = file.replace(/\-filled.svg$/, '.svg')
extensions.forEach(function (extension) {
if (fs.existsSync(fileOriginal)) {
const dataOriginal = fs.readFileSync(fileOriginal).toString()
glob.sync(join(ICONS_SRC_DIR, `*-${extension}.svg`)).forEach(function (file, i) {
const fileOriginal = file.replace(`-${extension}.svg`, '.svg')
const categoryOriginal = dataOriginal.match(/category: ([a-zA-Z-]+)/),
if (fs.existsSync(fileOriginal)) {
const dataOriginal = fs.readFileSync(fileOriginal).toString()
const categoryOriginal = dataOriginal.match(/category: ([a-zA-Z-]+)/),
tagsOriginal = dataOriginal.match(/tags: (\[.*?\])/)
if (categoryOriginal || tagsOriginal) {
if (categoryOriginal || tagsOriginal) {
let data = fs.readFileSync(file).toString()
data = data.replace(/(---[\s\S]+?---)/, function(m, headerContent) {
console.log('categoryOriginal', fileOriginal, categoryOriginal && categoryOriginal[1], tagsOriginal && tagsOriginal[1])
let data = fs.readFileSync(file).toString()
data = data.replace(/(---[\s\S]+?---)/, function (m, headerContent) {
console.log('categoryOriginal', fileOriginal, categoryOriginal && categoryOriginal[1], tagsOriginal && tagsOriginal[1])
if (categoryOriginal) {
headerContent = headerContent.replace(/category: .*\n/, '')
headerContent = headerContent.replace(/---/, `---\ncategory: ${categoryOriginal[1]}`)
}
if (categoryOriginal) {
headerContent = headerContent.replace(/category: .*\n/, '')
headerContent = headerContent.replace(/---/, `---\ncategory: ${categoryOriginal[1]}`)
}
if (tagsOriginal) {
headerContent = headerContent.replace(/tags: .*\n/, '')
headerContent = headerContent.replace(/---/, `---\ntags: ${tagsOriginal[1]}`)
}
// if (tagsOriginal) {
// headerContent = headerContent.replace(/tags: .*\n/, '')
// headerContent = headerContent.replace(/---/, `---\ntags: ${tagsOriginal[1]}`)
// }
return headerContent
})
return headerContent
})
fs.writeFileSync(file, data)
fs.writeFileSync(file, data)
}
}
}
})
})
})

View File

@ -1,6 +1,6 @@
---
tags: [abacus, math, counting, adding up]
category: Math
tags: [abacus, math, counting, adding up]
unicode: "f3b6"
version: "1.94"
---

View File

@ -1,6 +1,6 @@
---
tags: [device, hosts, airwaves, wireless, network]
category: Devices
tags: [device, hosts, airwaves, wireless, network]
version: "1.25"
unicode: "ed1a"
---

View File

@ -1,6 +1,6 @@
---
tags: [advert, advertisement, marketing, commercial, traffic]
category: Design
tags: [advert, advertisement, marketing, commercial, traffic]
version: "1.41"
unicode: "ef1f"
---

View File

@ -1,6 +1,6 @@
---
tags: [advert, advertisement, marketing, commercial, traffic]
category: Design
tags: [advert, advertisement, marketing, commercial, traffic]
unicode: "f3b7"
version: "1.94"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f7fb"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f7fc"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f7fd"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f7fe"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f7ff"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f800"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f801"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f802"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f803"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f804"
---

View File

@ -1,6 +1,6 @@
---
tags: [equalizer, sliders, controls, settings, filter]
category: System
tags: [equalizer, sliders, controls, settings, filter]
version: "1.62"
unicode: "f0a8"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f805"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f806"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f807"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f808"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f809"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f80a"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f80b"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f80c"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f80d"
---

View File

@ -1,6 +1,6 @@
---
tags: [hold, ship, harbor, docks]
category: Map
tags: [hold, ship, harbor, docks]
version: "1.65"
unicode: "f0f7"
---

View File

@ -1,6 +1,6 @@
---
tags: [hole, opening, vent]
category: Photography
tags: [hole, opening, vent]
unicode: "f3bc"
version: "1.94"
---

View File

@ -1,6 +1,6 @@
---
tags: [box, index, records, old, collect]
category: Document
tags: [box, index, records, old, collect]
version: "1.62"
unicode: "f0ad"
---

View File

@ -1,6 +1,6 @@
---
tags: [pointer, return, revert, reverse, undo, left]
category: Arrows
tags: [pointer, return, revert, reverse, undo, left]
version: "1.3"
unicode: "eb77"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, north]
category: Arrows
tags: [direction, north]
version: "1.57"
unicode: "f044"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, north]
category: Arrows
tags: [direction, north]
version: "1.57"
unicode: "f046"
---

View File

@ -1,6 +1,6 @@
---
tags: [point, turn, next, redo, right]
category: Arrows
tags: [point, turn, next, redo, right]
version: "1.3"
unicode: "eb78"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, west]
category: Arrows
tags: [direction, west]
version: "1.57"
unicode: "f04c"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, east]
category: Arrows
tags: [direction, east]
version: "1.57"
unicode: "f04d"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, west]
category: Arrows
tags: [direction, west]
version: "1.57"
unicode: "f04f"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, west]
category: Arrows
tags: [direction, west]
version: "1.57"
unicode: "f050"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, east]
category: Arrows
tags: [direction, east]
version: "1.57"
unicode: "f051"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, east]
category: Arrows
tags: [direction, east]
version: "1.57"
unicode: "f052"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, south, north]
category: Arrows
tags: [direction, south, north]
version: "1.42"
unicode: "ef38"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, north, south]
category: Arrows
tags: [direction, north, south]
version: "1.35"
unicode: "edac"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, west, east]
category: Arrows
tags: [direction, west, east]
version: "1.70"
unicode: "f1f3"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, east]
category: Arrows
tags: [direction, east]
version: "1.35"
unicode: "edae"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, random, cross, mix, music]
category: Arrows
tags: [direction, random, cross, mix, music]
version: "1.53"
unicode: "efff"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, navigation, east]
category: Arrows
tags: [direction, navigation, east]
version: "1.35"
unicode: "edb4"
---

View File

@ -1,6 +1,6 @@
---
tags: [direction, north, south]
category: Arrows
tags: [direction, north, south]
version: "1.35"
unicode: "edb6"
---

View File

@ -1,6 +1,6 @@
---
tags: [graphics, drawing, design, art, canvas]
category: Design
tags: [graphics, drawing, design, art, canvas]
version: "1.62"
unicode: "f0ae"
---

View File

@ -1,6 +1,6 @@
---
tags: [size, dimension, width, height, orientation]
category: Media
tags: [size, dimension, width, height, orientation]
version: "1.62"
unicode: "f0af"
---

View File

@ -1,6 +1,6 @@
---
tags: [sport, game, sportsman, play, match, pitch]
category: Sport
tags: [sport, game, sportsman, play, match, pitch]
unicode: "f3c3"
version: "1.94"
---

View File

@ -1,6 +1,6 @@
---
tags: [sport, game, sportsman, play, match, pitch]
category: Sport
tags: [sport, game, sportsman, play, match, pitch]
version: "1.39"
unicode: "ee05"
---

View File

@ -1,6 +1,6 @@
---
tags: [patch, wound, cut, pain]
category: Health
tags: [patch, wound, cut, pain]
unicode: "f3c4"
version: "1.94"
---

View File

@ -1,6 +1,6 @@
---
tags: [weight, gym, fitness, powerlift]
category: Sport
tags: [weight, gym, fitness, powerlift]
version: "1.62"
unicode: "f0b2"
---

View File

@ -1,6 +1,6 @@
---
tags: [shop, store, online, shopping]
category: E-commerce
tags: [shop, store, online, shopping]
version: "1.62"
unicode: "f0b6"
---

View File

@ -1,6 +1,6 @@
---
tags: [charge, energy, power, electricity]
category: Devices
tags: [charge, energy, power, electricity]
version: "1.42"
unicode: "ef3b"
---

View File

@ -1,6 +1,6 @@
---
tags: [ecology, charge, energy, power, electricity]
category: Devices
tags: [ecology, charge, energy, power, electricity]
version: "1.42"
unicode: "ef3c"
---

View File

@ -1,6 +1,6 @@
---
tags: [energy, power, electricity]
category: Devices
tags: [energy, power, electricity]
version: "1.25"
unicode: "ed1c"
---

View File

@ -1,6 +1,6 @@
---
tags: [sand, sun, umbrella, vacation, travel]
category: Map
tags: [sand, sun, umbrella, vacation, travel]
version: "1.62"
unicode: "f0b7"
---

View File

@ -1,6 +1,6 @@
---
tags: [sleep, night, bedroom, rest]
category: Map
tags: [sleep, night, bedroom, rest]
version: "1.65"
unicode: "f100"
---

View File

@ -1,6 +1,6 @@
---
tags: [alcohol, drink, beverage, bar, pub]
category: Food
tags: [alcohol, drink, beverage, bar, pub]
version: "1.65"
unicode: "f101"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f812"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f813"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f814"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f815"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f816"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f817"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f818"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f819"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f81a"
---

View File

@ -1,6 +1,6 @@
---
tags: [notification, alarm, alert, remove, ring]
category: System
tags: [notification, alarm, alert, remove, ring]
version: "1.37"
unicode: "ede2"
---

View File

@ -1,6 +1,6 @@
---
tags: [alarm, sound, notification]
category: System
tags: [alarm, sound, notification]
version: "1.22"
unicode: "ece9"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f81b"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f81c"
---

View File

@ -1,6 +1,6 @@
---
tags: [alarm, notification, alert, set]
category: System
tags: [alarm, notification, alert, set]
version: "1.37"
unicode: "ede3"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f81d"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f81e"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f81f"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f820"
---

View File

@ -1,4 +1,5 @@
---
category: System
version: "2.10"
unicode: "f821"
---

View File

@ -1,6 +1,6 @@
---
tags: [alarm, ring, sound, alert, disabled]
category: System
tags: [alarm, ring, sound, alert, disabled]
version: "1.37"
unicode: "ede5"
---

View File

@ -1,6 +1,6 @@
---
tags: [cycling, bicycle, sport, wheel]
category: Vehicles
tags: [cycling, bicycle, sport, wheel]
version: "1.62"
unicode: "f0b8"
---

View File

@ -1,6 +1,6 @@
---
tags: [danger, radioactive, toxic, microbe, virus, biotoxin]
category: Symbols
tags: [danger, radioactive, toxic, microbe, virus, biotoxin]
version: "1.63"
unicode: "f0b9"
---

View File

@ -1,6 +1,6 @@
---
tags: [clothing, washing, chemical, laundry]
category: Laundry
tags: [clothing, washing, chemical, laundry]
unicode: "f2f2"
version: "1.84"
---

View File

@ -1,6 +1,6 @@
---
tags: [wireless, connection, connect]
category: Devices
tags: [wireless, connection, connect]
version: "1.22"
unicode: "eceb"
---

View File

@ -1,4 +1,5 @@
---
category: Devices
tags: [multimedia, technology, disabled, connection, communication]
version: "1.60"
unicode: "f081"

View File

@ -1,6 +1,6 @@
---
tags: [edit, photo, photography, tool]
category: Design
tags: [edit, photo, photography, tool]
unicode: "f3c6"
version: "1.94"
---

View File

@ -1,6 +1,6 @@
---
tags: [font, style, boldface]
category: Text
tags: [font, style, boldface]
version: "1.63"
unicode: "f0ba"
---

View File

@ -1,6 +1,6 @@
---
tags: [skeleton, human, dog, body]
category: Food
tags: [skeleton, human, dog, body]
version: "1.63"
unicode: "f0bb"
---

View File

@ -1,6 +1,6 @@
---
tags: [read, dictionary, magazine, library, booklet, novel]
category: Document
tags: [read, dictionary, magazine, library, booklet, novel]
version: "1.50"
unicode: "efc5"
---

View File

@ -1,6 +1,6 @@
---
tags: [read, dictionary, magazine, library, booklet, novel]
category: Document
tags: [read, dictionary, magazine, library, booklet, novel]
version: "1.63"
unicode: "f0bc"
---

View File

@ -1,6 +1,6 @@
---
tags: [read, clip, marker, tag]
category: Document
tags: [read, clip, marker, tag]
version: "1.22"
unicode: "eced"
---

View File

@ -1,6 +1,6 @@
---
tags: [read, clip, marker, tag]
category: Document
tags: [read, clip, marker, tag]
version: "1.63"
unicode: "f0bd"
---

View File

@ -1,6 +1,6 @@
---
tags: [education, learning, reading, school, library]
category: Document
tags: [education, learning, reading, school, library]
version: "1.63"
unicode: "f0be"
---

View File

@ -1,6 +1,6 @@
---
tags: [google, excel, sheets, sheets]
category: Design
tags: [google, excel, sheets, sheets]
version: "1.41"
unicode: "ef22"
---

View File

@ -1,6 +1,6 @@
---
tags: [water, drink, beer, energy, wine ]
category: Food
tags: [water, drink, beer, energy, wine ]
unicode: "f3c8"
version: "1.94"
---

View File

@ -1,6 +1,6 @@
---
tags: [css, cascading, style, section, element, square, website, container]
category: Design
tags: [css, cascading, style, section, element, square, website, container]
unicode: "f3c9"
version: "1.94"
---

View File

@ -1,6 +1,6 @@
---
tags: [css, cascading, style, section, element, square, website, container]
category: Design
tags: [css, cascading, style, section, element, square, website, container]
version: "1.41"
unicode: "ef23"
---

View File

@ -1,6 +1,6 @@
---
tags: [css, cascading, style, section, element, square, website, container]
category: Design
tags: [css, cascading, style, section, element, square, website, container]
unicode: "f3ca"
version: "1.94"
---

View File

@ -1,6 +1,6 @@
---
tags: [punctuation, additional, information]
category: Math
tags: [punctuation, additional, information]
version: "1.63"
unicode: "f0bf"
---

View File

@ -1,6 +1,6 @@
---
tags: [punctuation, additional, information]
category: Math
tags: [punctuation, additional, information]
version: "1.63"
unicode: "f0c0"
---

View File

@ -1,6 +1,6 @@
---
tags: [food, breakfast, sandwich, toast, baking]
category: Food
tags: [food, breakfast, sandwich, toast, baking]
unicode: "f3cb"
version: "1.94"
---

View File

@ -1,6 +1,6 @@
---
tags: [light, dark, screen]
category: Photography
tags: [light, dark, screen]
unicode: "f3cd"
version: "1.94"
---

Some files were not shown because too many files have changed in this diff Show More