]> git.ipfire.org Git - thirdparty/google/fonts.git/commitdiff
tags.html: use families_new.csv 9817/head
authorMarc Foley <m.foley.88@gmail.com>
Wed, 10 Sep 2025 14:21:54 +0000 (15:21 +0100)
committerMarc Foley <m.foley.88@gmail.com>
Wed, 10 Sep 2025 14:21:54 +0000 (15:21 +0100)
.ci/tags.html

index e26ce9370260828d29457aeeb57447a4077684fd..ba689eb40e38d06de74d350b6268dc92c51db4b9 100644 (file)
     }
 
     toCsv() {
-        return `${this.name},${this.category},${this.score}`;
+        return `${this.name},,${this.category},${this.score}`;
     }
 
     toTag() {
-      return `${this.name},${this.category},${this.score}`;
+      return `${this.name},,${this.category},${this.score}`;
     }
     get tag() {
       return this.toTag();
@@ -747,7 +747,7 @@ function axesCombos(axes) {
         const url = URL.createObjectURL(blob);
         const a = document.createElement('a');
         a.href = url;
-        a.download = "families.csv";
+        a.download = "families_new.csv";
         document.body.appendChild(a);
         a.click();
         document.body.removeChild(a);
@@ -759,9 +759,9 @@ function axesCombos(axes) {
         alert("Tag data copied to clipboard. A github pull request page will open in a new tab. Please remove the old data and paste in the new.");
         navigator.clipboard.writeText(csv);
         if (this.commit !== "refs/heads/main") {
-          window.open(`https://github.com/google/fonts/edit/${this.commit}/tags/all/families.csv`);
+          window.open(`https://github.com/google/fonts/edit/${this.commit}/tags/all/families_new.csv`);
         } else {
-          window.open("https://github.com/google/fonts/edit/main/tags/all/families.csv")
+          window.open("https://github.com/google/fonts/edit/main/tags/all/families_new.csv")
         }
       },
       loadCSV() {
@@ -773,7 +773,7 @@ function axesCombos(axes) {
         }
         this.history = [];
         this.tags = [];
-        const csvFilePath = `https://raw.githubusercontent.com/google/fonts/${this.commit}/tags/all/families.csv`; // Update this path to your CSV file
+        const csvFilePath = `https://raw.githubusercontent.com/google/fonts/${this.commit}/tags/all/families_new.csv`; // Update this path to your CSV file
         fetch(csvFilePath)
           .then(response => {
             if (response.status === 404) {
@@ -783,11 +783,11 @@ function axesCombos(axes) {
           })
           .then(csvText => {
             this.tags = this.parseCSV(csvText);
-            csvText = "Family,Group/Tag,Weight\r\n" + csvText;
+            csvText = "Family,Axes,Group/Tag,Weight\r\n" + csvText;
         })
       },
       parseCSV(text) {
-        const lines = text.split("\r\n");
+        const lines = text.split("\n");
         let res = [];
         lines.forEach((line) => {
           if (line === "") {