forked from elrumo/macOS_Big_Sur_icons_replacements
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlist-generator.js
30 lines (24 loc) · 1.62 KB
/
list-generator.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var list = []
fetch('https://raw.githubusercontent.com/elrumo/macOS_Big_Sur_icons_replacements/master/icns.txt')
.then(response => response.text())
.then((data) => {
list = data.split(", ")
var csv = []
var i = 0;
for(let icon in list){
if(i == 0){
let iconName = list[icon]
let markDown = '[<img src="https://raw.githubusercontent.com/elrumo/macOS_Big_Sur_icons_replacements/master/icons/png/low-res/'+iconName+'.png" width="100">](https://github.com/elrumo/macOS-Big-Sur-icons-replacements/raw/master/icons/'+iconName+'.icns)<br>['+iconName+'](https://github.com/elrumo/macOS-Big-Sur-icons-replacements/raw/master/icons/'+iconName+'.icns),'
i++
csv.push(markDown)
} else{
let iconName = list[icon]
let markDown = '[<img src="https://raw.githubusercontent.com/elrumo/macOS_Big_Sur_icons_replacements/master/icons/png/low-res/'+iconName+'.png" width="100">](https://github.com/elrumo/macOS-Big-Sur-icons-replacements/raw/master/icons/'+iconName+'.icns)<br>['+iconName+'](https://github.com/elrumo/macOS-Big-Sur-icons-replacements/raw/master/icons/'+iconName+'.icns)'
csv.push(markDown)
i--
}
}
// console.log(list)
csv.forEach(item=>{console.log(item)})
})
// [<img src="https://github.com/elrumo/macOS-Big-Sur-icons-replacements/blob/master/icons/png/1Password.png?raw=true)" width="100">](https://github.com/elrumo/macOS-Big-Sur-icons-replacements/raw/master/icons/1Password.icns)<br>[ 1Password ](https://github.com/elrumo/macOS-Big-Sur-icons-replacements/raw/master/icons/1Password.icns),