Added JS comments, part I
[lw2-viewer.git] / compute_FontAwesome_subset.php
blob6bda247057a09cb47354a9de52efd85ab2018bc4
1 <?php
3 $files = [
4 "www/script.js",
5 "www/style.css.php",
6 "www/style_mobile_additions.css.php",
7 "www/theme_tweaker.css.php",
8 "www/theme-brutalist.css.php",
9 "www/theme-classic.css.php",
10 "www/theme-default.css.php",
11 "www/theme-grey.css.php",
12 "www/theme-less.css.php",
13 "www/theme-rts.css.php",
14 "www/theme-ultramodern.css.php",
15 "www/theme-zero.css.php",
16 "lw2.lisp"
18 $characters = [ ];
20 foreach ($files as $file) {
21 $contents = file_get_contents("{$file}");
23 preg_match_all('/&#x(.{4})/', $contents, $matches);
24 $characters = array_merge($characters, $matches[1]);
26 preg_match_all('/\\\(F.{3})/', $contents, $matches);
27 $characters = array_merge($characters, $matches[1]);
30 foreach ($characters as $key => $value) {
31 $characters[$key] = strtoupper($value);
33 $characters = array_unique($characters);
34 sort($characters);
35 echo implode(",",$characters);
36 echo "\n";