feat: launch catppuccin/userstyles

Co-authored-by: rubyowo <[email protected]>
Co-authored-by: Andreas Grafen <[email protected]>
Co-authored-by: winston <[email protected]>
Co-authored-by: Carsten Kragelund <[email protected]>
Co-authored-by: Andreas Grafen <[email protected]>
Co-authored-by: Alaina <[email protected]>
Co-authored-by: jolheiser <[email protected]>
This commit is contained in:
committed 2023-07-20 19:43:01 +01:00
commit 8cfccfd837
186 files changed
+16951

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
{
"lock": "deno.lock"
}
+150
View File
@@ -0,0 +1,150 @@
{
"version": "2",
"remote": {
"https://deno.land/[email protected]/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462",
"https://deno.land/[email protected]/_util/os.ts": "d932f56d41e4f6a6093d56044e29ce637f8dcc43c5a90af43504a889cf1775e3",
"https://deno.land/[email protected]/bytes/bytes_list.ts": "b4cbdfd2c263a13e8a904b12d082f6177ea97d9297274a4be134e989450dfa6a",
"https://deno.land/[email protected]/bytes/concat.ts": "d26d6f3d7922e6d663dacfcd357563b7bf4a380ce5b9c2bbe0c8586662f25ce2",
"https://deno.land/[email protected]/bytes/copy.ts": "939d89e302a9761dcf1d9c937c7711174ed74c59eef40a1e4569a05c9de88219",
"https://deno.land/[email protected]/encoding/_yaml/dumper/dumper.ts": "49053c293a2250b33f2efc0ce3973280c6dc3bc0b41397af3863b5f03340e01b",
"https://deno.land/[email protected]/encoding/_yaml/dumper/dumper_state.ts": "975a3702752a29251c5746206507dfebbfede60dd2c0dec161dc22633fbc6085",
"https://deno.land/[email protected]/encoding/_yaml/error.ts": "e60ab51d7c0253cf0d1cf7d445202e8e3da5c77aae0032071ba7400121c281b4",
"https://deno.land/[email protected]/encoding/_yaml/loader/loader.ts": "6c59f60faaf78d73db0e016293f4bfed19e6356d7064230d07d6b68a65a1df5d",
"https://deno.land/[email protected]/encoding/_yaml/loader/loader_state.ts": "fcc82fcdf167acb0e9e5e32b32682e58b45f2d44210bf685794797ccb5621232",
"https://deno.land/[email protected]/encoding/_yaml/mark.ts": "0027d6f62a70a6c64b85bd1751ddf1646ea97edcefbf5bea1706d5e519f4e34f",
"https://deno.land/[email protected]/encoding/_yaml/parse.ts": "63e79582e07145ca1d3205d1ac72b82bf5ce14159dabae195abe7e36de8111bd",
"https://deno.land/[email protected]/encoding/_yaml/schema.ts": "0833c75c59bf72c8a8f96f6c0615bcd98d23fdd9b076657f42b5c1a4f9d972b0",
"https://deno.land/[email protected]/encoding/_yaml/schema/core.ts": "366f56673336ba24f5723c04319efcc7471be5f55d5f8d95c9b4a38ec233d4c6",
"https://deno.land/[email protected]/encoding/_yaml/schema/default.ts": "96e9ed6ead36f53a0832c542fc9b8cca7f8b4a67c1c8424e1423a39ee7154db7",
"https://deno.land/[email protected]/encoding/_yaml/schema/extended.ts": "f9bd75c79ebdfb92a8e167488b6bde7113a31b8fabe20ad7eed0904fba11bcd2",
"https://deno.land/[email protected]/encoding/_yaml/schema/failsafe.ts": "cddcbf0258bbe0cd77ca10e2f5aec13439f50d4068f96aab08ca2d64496dabe8",
"https://deno.land/[email protected]/encoding/_yaml/schema/json.ts": "c86905dfb1b6c4633750bfbb5bd529a30be5c08287ab7eb6694390b40e276487",
"https://deno.land/[email protected]/encoding/_yaml/schema/mod.ts": "051f93dd97a15aaad2da62bd24627e8fd2f02fb026d21567d924b720d606f078",
"https://deno.land/[email protected]/encoding/_yaml/state.ts": "ef03d55ec235d48dcfbecc0ab3ade90bfae69a61094846e08003421c2cf5cfc6",
"https://deno.land/[email protected]/encoding/_yaml/stringify.ts": "426b73e4dbaeed26ed855add3862786d7e374bd4c59e5e1bd9a6fcd5082be3c7",
"https://deno.land/[email protected]/encoding/_yaml/type.ts": "5ded5472a0f17a219ac3b0e90d96dc8472a68654a40258a31e03a6c6297b6788",
"https://deno.land/[email protected]/encoding/_yaml/type/binary.ts": "935d39794420ac3718d26716192239de6a53566c6f2ba5010e8ed26936b94a89",
"https://deno.land/[email protected]/encoding/_yaml/type/bool.ts": "1c99cfbaa94b022575b636a73e1549569b26fc6bbff2cd5e539aa77b49bdf303",
"https://deno.land/[email protected]/encoding/_yaml/type/float.ts": "f60ad19b27050add694bfc255b7efef27103f047861aa657823ff3f6853bad11",
"https://deno.land/[email protected]/encoding/_yaml/type/function.ts": "65a37f6bef43ef141854ee48a1058d9c9c4c80ed6eed6cd35608329a6957e27a",
"https://deno.land/[email protected]/encoding/_yaml/type/int.ts": "892f59bb7b2dbd64dd9b643c17441af95c0b962ad027e454cb84a68864787b86",
"https://deno.land/[email protected]/encoding/_yaml/type/map.ts": "92e647a6aec0dc184ea4b039a77a15883b54da754311189c595b43f6aaa50030",
"https://deno.land/[email protected]/encoding/_yaml/type/merge.ts": "8192bf3e4d637f32567917f48bb276043da9cf729cf594e5ec191f7cd229337e",
"https://deno.land/[email protected]/encoding/_yaml/type/mod.ts": "060e2b3d38725094b77ea3a3f05fc7e671fced8e67ca18e525be98c4aa8f4bbb",
"https://deno.land/[email protected]/encoding/_yaml/type/nil.ts": "606e8f0c44d73117c81abec822f89ef81e40f712258c74f186baa1af659b8887",
"https://deno.land/[email protected]/encoding/_yaml/type/omap.ts": "fbd5da9970c211335ff7c8fa11e9c5e9256e568d52418ac237d1538c5cb0d5e6",
"https://deno.land/[email protected]/encoding/_yaml/type/pairs.ts": "ea487a44c0ae64d8d952779fa1cb5fa0a12f32a0b5d3d1e8c1f06f446448427c",
"https://deno.land/[email protected]/encoding/_yaml/type/regexp.ts": "672000d22a1062d61577d30b218c28f5cb1d039a7a60079fdde6a4e558d5ca51",
"https://deno.land/[email protected]/encoding/_yaml/type/seq.ts": "39b28f7c7aa41263c5c42cab9d184f03555e9ba19493766afc0c0c325a9ac49f",
"https://deno.land/[email protected]/encoding/_yaml/type/set.ts": "0e30a9f750306b514c8ae9869d1ac2548d57beab55b33e85ea9673ca0a08264c",
"https://deno.land/[email protected]/encoding/_yaml/type/str.ts": "a67a3c6e429d95041399e964015511779b1130ea5889fa257c48457bd3446e31",
"https://deno.land/[email protected]/encoding/_yaml/type/timestamp.ts": "706ea80a76a73e48efaeb400ace087da1f927647b53ad6f754f4e06d51af087f",
"https://deno.land/[email protected]/encoding/_yaml/type/undefined.ts": "94a316ca450597ccbc6750cbd79097ad0d5f3a019797eed3c841a040c29540ba",
"https://deno.land/[email protected]/encoding/_yaml/utils.ts": "26b311f0d42a7ce025060bd6320a68b50e52fd24a839581eb31734cd48e20393",
"https://deno.land/[email protected]/encoding/yaml.ts": "02571d1bbbcfd7c5647789cee872ecf9c1c470e1b1a40948ed219fb661e19d87",
"https://deno.land/[email protected]/io/buf_reader.ts": "90a7adcb3638d8e1361695cdf844d58bcd97c41711dc6f9f8acc0626ebe097f5",
"https://deno.land/[email protected]/io/buf_writer.ts": "759c69d304b04d2909976f2a03a24a107276fbd81ed13593c5c2d43d104b52f3",
"https://deno.land/[email protected]/io/buffer.ts": "24abd4a65403ca3fdffcb6d3f985b0285adfd785f1311ce681708a21126776ad",
"https://deno.land/[email protected]/io/read_delim.ts": "7e102c66f00a118fa1e1ccd4abb080496f43766686907fd8b9522fdf85443586",
"https://deno.land/[email protected]/io/read_lines.ts": "baee9e35034f2fdfccf63bc24b7e3cb45aa1c1c5de26d178f7bcbc572e87772f",
"https://deno.land/[email protected]/io/read_string_delim.ts": "46eb0c9db3547caf8c759631effa200bbe48924f9b34f41edc627bde36cee52d",
"https://deno.land/[email protected]/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0",
"https://deno.land/[email protected]/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b",
"https://deno.land/[email protected]/path/_util.ts": "86c2375a996c1931b2f2ac71fefd5ddf0cf0e579fa4ab12d3e4c552d4223b8d8",
"https://deno.land/[email protected]/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000",
"https://deno.land/[email protected]/path/glob.ts": "d479e0a695621c94d3fd7fe7abd4f9499caf32a8de13f25073451c6ef420a4e1",
"https://deno.land/[email protected]/path/mod.ts": "4b83694ac500d7d31b0cdafc927080a53dc0c3027eb2895790fb155082b0d232",
"https://deno.land/[email protected]/path/posix.ts": "0874b341c2c6968ca38d323338b8b295ea1dae10fa872a768d812e2e7d634789",
"https://deno.land/[email protected]/path/separator.ts": "0fb679739d0d1d7bf45b68dacfb4ec7563597a902edbaf3c59b50d5bcadd93b1",
"https://deno.land/[email protected]/path/win32.ts": "672942919dd66ce1b8c224e77d3447e2ad8254eaff13fe6946420a9f78fa141e",
"https://deno.land/[email protected]/types.d.ts": "220ed56662a0bd393ba5d124aa6ae2ad36a00d2fcbc0e8666a65f4606aaa9784",
"https://deno.land/[email protected]/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462",
"https://deno.land/[email protected]/_util/os.ts": "d932f56d41e4f6a6093d56044e29ce637f8dcc43c5a90af43504a889cf1775e3",
"https://deno.land/[email protected]/bytes/copy.ts": "939d89e302a9761dcf1d9c937c7711174ed74c59eef40a1e4569a05c9de88219",
"https://deno.land/[email protected]/encoding/yaml.ts": "1434324316e821dd76c4d4dcaa88ce792449360335a598b88e7625644c721766",
"https://deno.land/[email protected]/fs/_util.ts": "65381f341af1ff7f40198cee15c20f59951ac26e51ddc651c5293e24f9ce6f32",
"https://deno.land/[email protected]/fs/walk.ts": "ea95ffa6500c1eda6b365be488c056edc7c883a1db41ef46ec3bf057b1c0fe32",
"https://deno.land/[email protected]/io/buffer.ts": "17f4410eaaa60a8a85733e8891349a619eadfbbe42e2f319283ce2b8f29723ab",
"https://deno.land/[email protected]/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0",
"https://deno.land/[email protected]/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b",
"https://deno.land/[email protected]/path/_util.ts": "d7abb1e0dea065f427b89156e28cdeb32b045870acdf865833ba808a73b576d0",
"https://deno.land/[email protected]/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000",
"https://deno.land/[email protected]/path/glob.ts": "d479e0a695621c94d3fd7fe7abd4f9499caf32a8de13f25073451c6ef420a4e1",
"https://deno.land/[email protected]/path/mod.ts": "bf718f19a4fdd545aee1b06409ca0805bd1b68ecf876605ce632e932fe54510c",
"https://deno.land/[email protected]/path/posix.ts": "8b7c67ac338714b30c816079303d0285dd24af6b284f7ad63da5b27372a2c94d",
"https://deno.land/[email protected]/path/separator.ts": "0fb679739d0d1d7bf45b68dacfb4ec7563597a902edbaf3c59b50d5bcadd93b1",
"https://deno.land/[email protected]/path/win32.ts": "d186344e5583bcbf8b18af416d13d82b35a317116e6460a5a3953508c3de5bba",
"https://deno.land/[email protected]/types.d.ts": "dbaeb2c4d7c526db9828fc8df89d8aecf53b9ced72e0c4568f97ddd8cda616a4",
"https://deno.land/[email protected]/yaml/_dumper/dumper.ts": "a2c937a53a2b0473125a31a330334cc3f30e98fd82f8143bc225583d1260890b",
"https://deno.land/[email protected]/yaml/_dumper/dumper_state.ts": "f0d0673ceea288334061ca34b63954c2bb5feb5bf6de5e4cfe9a942cdf6e5efe",
"https://deno.land/[email protected]/yaml/_error.ts": "b59e2c76ce5a47b1b9fa0ff9f96c1dd92ea1e1b17ce4347ece5944a95c3c1a84",
"https://deno.land/[email protected]/yaml/_loader/loader.ts": "04cf748a736a9b3a29bd3d4b3c77d81489f82cfe8391627fd6ba8327e1e8cec2",
"https://deno.land/[email protected]/yaml/_loader/loader_state.ts": "0841870b467169269d7c2dfa75cd288c319bc06f65edd9e42c29e5fced91c7a4",
"https://deno.land/[email protected]/yaml/_mark.ts": "dcd8585dee585e024475e9f3fe27d29740670fb64ebb970388094cad0fc11d5d",
"https://deno.land/[email protected]/yaml/_state.ts": "ef03d55ec235d48dcfbecc0ab3ade90bfae69a61094846e08003421c2cf5cfc6",
"https://deno.land/[email protected]/yaml/_type/binary.ts": "d34d8c8d8ed521e270cfede3401c425b971af4f6c69da1e2cb32b172d42c7da7",
"https://deno.land/[email protected]/yaml/_type/bool.ts": "5bfa75da84343d45347b521ba4e5aeace9fe6f53447405290d53315a3fc20e66",
"https://deno.land/[email protected]/yaml/_type/float.ts": "056bd3cb9c5586238b20517511014fb24b0e36f98f9f6073e12da308b6b9808a",
"https://deno.land/[email protected]/yaml/_type/function.ts": "ff574fe84a750695302864e1c31b93f12d14ada4bde79a5f93197fc33ad17471",
"https://deno.land/[email protected]/yaml/_type/int.ts": "563ad074f0fa7aecf6b6c3d84135bcc95a8269dcc15de878de20ce868fd773fa",
"https://deno.land/[email protected]/yaml/_type/map.ts": "7b105e4ab03a361c61e7e335a0baf4d40f06460b13920e5af3fb2783a1464000",
"https://deno.land/[email protected]/yaml/_type/merge.ts": "8192bf3e4d637f32567917f48bb276043da9cf729cf594e5ec191f7cd229337e",
"https://deno.land/[email protected]/yaml/_type/mod.ts": "060e2b3d38725094b77ea3a3f05fc7e671fced8e67ca18e525be98c4aa8f4bbb",
"https://deno.land/[email protected]/yaml/_type/nil.ts": "606e8f0c44d73117c81abec822f89ef81e40f712258c74f186baa1af659b8887",
"https://deno.land/[email protected]/yaml/_type/omap.ts": "cfe59a294726f5cea705c39a61fd2b08199cf48f4ccd6b040cb550ec0f38d0a1",
"https://deno.land/[email protected]/yaml/_type/pairs.ts": "0032fdfe57558d21696a4f8cf5b5cfd1f698743177080affc18629685c905666",
"https://deno.land/[email protected]/yaml/_type/regexp.ts": "1ce118de15b2da43b4bd8e4395f42d448b731acf3bdaf7c888f40789f9a95f8b",
"https://deno.land/[email protected]/yaml/_type/seq.ts": "95333abeec8a7e4d967b8c8328b269e342a4bbdd2585395549b9c4f58c8533a2",
"https://deno.land/[email protected]/yaml/_type/set.ts": "f28ba44e632ef2a6eb580486fd47a460445eeddbdf1dbc739c3e62486f566092",
"https://deno.land/[email protected]/yaml/_type/str.ts": "a67a3c6e429d95041399e964015511779b1130ea5889fa257c48457bd3446e31",
"https://deno.land/[email protected]/yaml/_type/timestamp.ts": "706ea80a76a73e48efaeb400ace087da1f927647b53ad6f754f4e06d51af087f",
"https://deno.land/[email protected]/yaml/_type/undefined.ts": "94a316ca450597ccbc6750cbd79097ad0d5f3a019797eed3c841a040c29540ba",
"https://deno.land/[email protected]/yaml/_utils.ts": "26b311f0d42a7ce025060bd6320a68b50e52fd24a839581eb31734cd48e20393",
"https://deno.land/[email protected]/yaml/parse.ts": "1fbbda572bf3fff578b6482c0d8b85097a38de3176bf3ab2ca70c25fb0c960ef",
"https://deno.land/[email protected]/yaml/schema.ts": "96908b78dc50c340074b93fc1598d5e7e2fe59103f89ff81e5a49b2dedf77a67",
"https://deno.land/[email protected]/yaml/schema/core.ts": "fa406f18ceedc87a50e28bb90ec7a4c09eebb337f94ef17468349794fa828639",
"https://deno.land/[email protected]/yaml/schema/default.ts": "0047e80ae8a4a93293bc4c557ae8a546aabd46bb7165b9d9b940d57b4d88bde9",
"https://deno.land/[email protected]/yaml/schema/extended.ts": "0784416bf062d20a1626b53c03380e265b3e39b9409afb9f4cb7d659fd71e60d",
"https://deno.land/[email protected]/yaml/schema/failsafe.ts": "d219ab5febc43f770917d8ec37735a4b1ad671149846cbdcade767832b42b92b",
"https://deno.land/[email protected]/yaml/schema/json.ts": "5f41dd7c2f1ad545ef6238633ce9ee3d444dfc5a18101e1768bd5504bf90e5e5",
"https://deno.land/[email protected]/yaml/schema/mod.ts": "4472e827bab5025e92bc2eb2eeefa70ecbefc64b2799b765c69af84822efef32",
"https://deno.land/[email protected]/yaml/stringify.ts": "fffc09c65c68d3d63f8159e8cbaa3f489bc20a8e55b4fbb61a8c2e9f914d1d02",
"https://deno.land/[email protected]/yaml/type.ts": "1aabb8e0a3f4229ce0a3526256f68826d9bdf65a36c8a3890ead8011fcba7670",
"https://raw.githubusercontent.com/catppuccin/catppuccin/main/resources/generate/types.d.ts": "d0c5ac99cbb0d55d54efd56c9d7d4dcae1ef690ed3f1d5ecf7eb56c56eb0396a",
"https://raw.githubusercontent.com/catppuccin/catppuccin/main/resources/ports.schema.json": "58dce2a85f75f4afedd48e69870dc42c43b08cbb9cf683c1c25bf9f2fd354287"
},
"npm": {
"specifiers": { "[email protected]": "[email protected]" },
"packages": {
"[email protected]": {
"integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
"dependencies": {
"fast-deep-equal": "[email protected]",
"json-schema-traverse": "[email protected]",
"require-from-string": "[email protected]",
"uri-js": "[email protected]"
}
},
"[email protected]": {
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dependencies": {}
},
"[email protected]": {
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dependencies": {}
},
"[email protected]": {
"integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
"dependencies": {}
},
"[email protected]": {
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
"dependencies": {}
},
"[email protected]": {
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dependencies": { "punycode": "[email protected]" }
}
}
}
}
+10
View File
@@ -0,0 +1,10 @@
export { parse as parseYaml } from "https://deno.land/[email protected]/encoding/yaml.ts";
import Ajv from "npm:[email protected]";
import * as path from "https://deno.land/[email protected]/path/mod.ts";
import { walkSync } from "https://deno.land/[email protected]/fs/walk.ts";
import schema from "../userstyles.schema.json" assert { type: "json" };
import portsSchema from "https://raw.githubusercontent.com/catppuccin/catppuccin/main/resources/ports.schema.json" assert { type: "json" };
export type { Categories as PortCategories } from "https://raw.githubusercontent.com/catppuccin/catppuccin/main/resources/generate/types.d.ts";
export { Ajv, path, walkSync, portsSchema, schema };
+269
View File
@@ -0,0 +1,269 @@
#!/usr/bin/env -S deno run --allow-env --allow-read --allow-write --allow-net
import {
Ajv,
parseYaml,
path,
portsSchema,
schema,
PortCategories,
} from "./deps.ts";
import {
FAQ,
Userstyle,
CurrentMaintainers,
PastMaintainers,
Userstyles,
Usage,
ApplicationLink,
Name,
} from "./types.d.ts";
const ROOT = new URL(".", import.meta.url).pathname;
const REPO_ROOT = path.join(ROOT, "../..");
const ISSUE_PREFIX = "lbl:";
type Metadata = {
userstyles: Userstyles;
};
type PortMetadata = {
categories: PortCategories;
};
type CollaboratorsData = {
collaborators: CurrentMaintainers | PastMaintainers;
heading: string;
};
export type MappedPort = Userstyle & { path: string };
const ajv = new (Ajv as unknown as (typeof Ajv)["default"])();
const validate = ajv.compile<Metadata>(schema);
const validatePorts = ajv.compile<PortMetadata>(portsSchema);
const userstylesYaml = Deno.readTextFileSync(
path.join(ROOT, "../userstyles.yml")
);
const userstylesData = parseYaml(userstylesYaml);
if (!validate(userstylesData)) {
console.log(validate.errors);
Deno.exit(1);
}
const portsYaml = await fetch(
"https://raw.githubusercontent.com/catppuccin/catppuccin/main/resources/ports.yml"
);
const portsData = parseYaml(await portsYaml.text());
if (!validatePorts(portsData)) {
console.log(validate.errors);
Deno.exit(1);
}
const categorized = Object.entries(userstylesData.userstyles).reduce(
(acc, [slug, { category, ...port }]) => {
acc[category] ||= [];
acc[category].push({ path: `styles/${slug}`, category, ...port });
acc[category].sort((a, b) => {
const aName = typeof a.name === "string" ? a.name : a.name.join(", ");
const bName = typeof b.name === "string" ? b.name : b.name.join(", ");
return aName.localeCompare(bName);
});
return acc;
},
{} as Record<string, MappedPort[]>
);
const portListData = portsData.categories
.filter((category) => categorized[category.key] !== undefined)
.map((category) => {
return {
meta: category,
ports: categorized[category.key],
};
});
const portContent = portListData
.map(
(data) => `<details open>
<summary>${data.meta.emoji} ${data.meta.name}</summary>
${data.ports
.map((port) => {
const name = Array.isArray(port.name) ? port.name.join(", ") : port.name;
return `- [${name}](${port.path})`;
})
.join("\n")}
</details>`
)
.join("\n");
const updateReadme = ({
readme,
section,
newContent,
}: {
readme: string;
section: string;
newContent: string;
}): string => {
const preamble =
"<!-- the following section is auto-generated, do not edit -->";
const startMarker = `<!-- AUTOGEN:${section.toUpperCase()} START -->`;
const endMarker = `<!-- AUTOGEN:${section.toUpperCase()} END -->`;
const wrapped = `${startMarker}\n${preamble}\n${newContent}\n${endMarker}`;
if (
!(readmeContent.includes(startMarker) && readmeContent.includes(endMarker))
) {
throw new Error("Markers not found in README.md");
}
const pre = readme.split(startMarker)[0];
const end = readme.split(endMarker)[1];
return pre + wrapped + end;
};
const updateFile = (filePath: string, fileContent: string, comment = true) => {
const preamble = comment
? "# THIS FILE IS AUTOGENERATED. DO NOT EDIT IT BY HAND.\n"
: "";
Deno.writeTextFileSync(filePath, preamble + fileContent);
};
const readmePath = path.join(REPO_ROOT, "README.md");
let readmeContent = Deno.readTextFileSync(readmePath);
try {
readmeContent = updateReadme({
readme: readmeContent,
section: "userstyles",
newContent: portContent,
});
updateFile(readmePath, readmeContent, false);
} catch (e) {
console.log("Failed to update the README:", e);
}
const pullRequestLabelerPath = path.join(REPO_ROOT, ".github/pr-labeler.yml");
const pullRequestLabelerContent = Object.entries(userstylesData.userstyles)
.map(([key]) => `${key}: styles/${key}/**/*`)
.join("\n");
updateFile(pullRequestLabelerPath, pullRequestLabelerContent);
const issuesLabelerPath = path.join(REPO_ROOT, ".github/issue-labeler.yml");
const issuesLabelerContent = Object.entries(userstylesData.userstyles)
.map(([key]) => {
return `${key}:
- '(${ISSUE_PREFIX + key})'`;
})
.join("\n");
updateFile(issuesLabelerPath, issuesLabelerContent);
const ownersPath = path.join(REPO_ROOT, ".github/CODEOWNERS");
const ownersContent = Object.entries(userstylesData.userstyles)
.map(([key, style]) => {
const currentMaintainers = style.readme["current-maintainers"]
.map((maintainer) => `@${maintainer.url.split("/").pop()}`)
.join(" ");
return `/styles/${key} ${currentMaintainers}`;
})
.join("\n#\n");
updateFile(ownersPath, ownersContent);
const userstyleIssuePath = path.join(ROOT, "templates/userstyle-issue.yml");
const userstyleIssueContent = Deno.readTextFileSync(userstyleIssuePath);
const replacedUserstyleIssueContent = userstyleIssueContent.replace(
"$PORTS",
`${Object.entries(userstylesData.userstyles)
.map(([key]) => `- ${ISSUE_PREFIX + key}`)
.join("\n ")}`
);
Deno.writeTextFileSync(
path.join(REPO_ROOT, ".github/ISSUE_TEMPLATE/userstyle.yml"),
replacedUserstyleIssueContent
);
const heading = (name: Name, link: ApplicationLink) => {
const nameArray = Array.isArray(name) ? name : [name];
const linkArray = Array.isArray(link) ? link : [link];
if (nameArray.length !== linkArray.length) {
throw new Error(
'The "name" and "app-link" arrays must have the same length'
);
}
return `Catppuccin for ${nameArray
.map((name, index) => `<a href="${linkArray[index]}">${name}</a>`)
.join(", ")}`;
};
const usageContent = (usage?: Usage) => {
return !usage ? "" : `## Usage \n${usage}`;
};
const faqContent = (faq?: FAQ) => {
if (!faq) {
return "";
}
return `## 🙋 FAQ
${faq
.map(({ question, answer }) => `- Q: ${question} \n\tA: ${answer}`)
.join("\n")}`;
};
const collaboratorsContent = (allCollaborators: CollaboratorsData[]) => {
return allCollaborators
.filter(({ collaborators }) => collaborators !== undefined)
.map(({ collaborators, heading }) => {
const collaboratorBody = collaborators
.map(({ name, url }) => `- [${name ?? url.split("/").pop()}](${url})`)
.join("\n");
return `${heading}\n${collaboratorBody}`;
})
.join("\n\n");
};
const updateStylesReadmeContent = (
readme: string,
key: string,
userstyle: Userstyle
) => {
return readme
.replace("$TITLE", heading(userstyle.name, userstyle.readme["app-link"]))
.replaceAll("$LOWERCASE-PORT", key)
.replace("$USAGE", usageContent(userstyle.readme.usage))
.replace("$FAQ", faqContent(userstyle.readme.faq))
.replace(
"$COLLABORATORS",
collaboratorsContent([
{
collaborators: userstyle.readme["current-maintainers"],
heading: "## 💝 Current Maintainer(s)",
},
{
collaborators: userstyle.readme["past-maintainers"],
heading: "## 💖 Past Maintainer(s)",
},
])
);
};
const stylesReadmePath = path.join(ROOT, "templates/userstyle.md");
const stylesReadmeContent = Deno.readTextFileSync(stylesReadmePath);
for (const [key, userstyle] of Object.entries(userstylesData.userstyles)) {
try {
console.log(`Generating README for ${key}`);
readmeContent = updateStylesReadmeContent(
stylesReadmeContent,
key,
userstyle
);
Deno.writeTextFileSync(
path.join(REPO_ROOT, "styles", key, "README.md"),
readmeContent
);
} catch (e) {
console.log(`Failed to update ${userstyle} README:`, e);
}
}
@@ -0,0 +1,42 @@
# THIS FILE IS AUTOGENERATED. DO NOT EDIT IT BY HAND.
name: Userstyle Issue
description: Report your problems with any of the userstyles here!
body:
- type: checkboxes
attributes:
label: Is there an existing issue outlining your problem?
description: Please search to see if an issue already exists for your problem.
options:
- label: I have searched the existing issues and they do not solve my problem.
required: true
- type: dropdown
attributes:
label: What userstyles are you seeing the problem on?
description: "Don't worry about the `lbl:` prefix, it allows issues to be automatically labelled!"
multiple: true
options:
$PORTS
validations:
required: true
- type: textarea
attributes:
label: Describe your problem.
description: Also tell us, what do you expect to see?
placeholder: The navigation bar on the website is highlighted incorrectly...
validations:
required: true
- type: textarea
attributes:
label: Attach screenshots.
description: If applicable, attach screenshots which clearly highlight the issue.
- type: input
attributes:
label: What browser(s) are you seeing the problem on?
description: "The browser version is also important, you can find out how to get that info [here](https://github.com/catppuccin/userstyles/blob/main/docs/browsers.md)."
placeholder: Firefox v112.0.2
validations:
required: true
- type: textarea
attributes:
label: Any additional comments?
description: Add any information that hasn't been covered in the previous sections!
+55
View File
@@ -0,0 +1,55 @@
<!-- AUTOGEN:README START -->
<!-- THIS FILE IS AUTOGENERATED. DO NOT EDIT IT BY HAND -->
<h3 align="center">
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/logos/exports/1544x1544_circle.png" width="100" alt="Logo"/><br/>
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
$TITLE
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
</h3>
<p align="center">
<a href="https://github.com/catppuccin/userstyles/issues?q=is%3Aissue+is+label%3A$LOWERCASE-PORT"><img src="https://img.shields.io/github/issues/catppuccin/userstyles?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
<a href="https://raw.githubusercontent.com/catppuccin/userstyles/main/styles/$LOWERCASE-PORT/catppuccin.user.css"><img src="https://img.shields.io/badge/stylus-install-cba6f7?colorA=363a4f&style=for-the-badge"></a>
</p>
<p align="center">
<img src="assets/catwalk.webp"/>
</p>
## Previews
<details>
<summary>🌻 Latte</summary>
<img src="assets/latte.webp"/>
</details>
<details>
<summary>🪴 Frappé</summary>
<img src="assets/frappe.webp"/>
</details>
<details>
<summary>🌺 Macchiato</summary>
<img src="assets/macchiato.webp"/>
</details>
<details>
<summary>🌿 Mocha</summary>
<img src="assets/mocha.webp"/>
</details>
$USAGE
$FAQ
$COLLABORATORS
&nbsp;
<p align="center">
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true" />
</p>
<p align="center">
Copyright &copy; 2021-present <a href="https://github.com/catppuccin" target="_blank">Catppuccin Org</a>
</p>
<!-- AUTOGEN:README END -->
+180
View File
@@ -0,0 +1,180 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* The name of the userstyle(s).
*/
export type Name = [string, string, ...string[]] | string;
/**
* The category that fits the port the most.
*/
export type Category =
| "browser"
| "browser_extension"
| "cli"
| "code_editor"
| "development"
| "game"
| "leisure"
| "library"
| "messaging"
| "note_taking"
| "productivity"
| "search_engine"
| "social"
| "system"
| "terminal";
/**
* The fill color for the icon on the Catppuccin website.
*/
export type Color =
| "rosewater"
| "flamingo"
| "pink"
| "mauve"
| "red"
| "maroon"
| "peach"
| "yellow"
| "green"
| "teal"
| "sky"
| "sapphire"
| "blue"
| "lavender"
| "text";
/**
* The icon to use on the website. This should be the same name as the SVG file on https://simpleicons.org/. If a `.svg` suffix is present, it's taken from the local website repository resources.
*/
export type Icon = string;
/**
* The hyperlink of the app that is being themed.
*/
export type ApplicationLink = [string, string, ...string[]] | string;
/**
* The Usage section of the userstyle README.
*/
export type Usage = string;
/**
* The FAQ section of the userstyle README.
*
* @minItems 1
*/
export type FAQ = [
{
question: Question;
answer: Answer;
[k: string]: unknown;
},
...{
question: Question;
answer: Answer;
[k: string]: unknown;
}[]
];
/**
* A question that a user may have about the userstyle.
*/
export type Question = string;
/**
* An answer to the question about the userstyle.
*/
export type Answer = string;
/**
* List of all active maintainers for this userstyle.
*
* @minItems 1
*/
export type CurrentMaintainers = [
{
name?: DisplayName;
url: GitHubProfile;
[k: string]: unknown;
},
...{
name?: DisplayName;
url: GitHubProfile;
[k: string]: unknown;
}[]
];
/**
* The display name of the collaborator to show in the userstyle README.
*/
export type DisplayName = string;
/**
* The GitHub profile link of the collaborator to show in the userstyle README.
*/
export type GitHubProfile = string;
/**
* List of all maintainers that have maintained on this userstyle in the past.
*
* @minItems 1
*/
export type PastMaintainers = [
{
name?: DisplayName;
url: GitHubProfile;
[k: string]: unknown;
},
...{
name?: DisplayName;
url: GitHubProfile;
[k: string]: unknown;
}[]
];
/**
* Represents all maintainers and contributors to all userstyles.
*
* @minItems 1
*/
export type AllCollaborators = [
{
name?: DisplayName;
url: GitHubProfile;
[k: string]: unknown;
},
...{
name?: DisplayName;
url: GitHubProfile;
[k: string]: unknown;
}[]
];
export interface UserstylesSchema {
userstyles?: Userstyles;
collaborators?: AllCollaborators;
}
/**
* All userstyles in the Catppuccin org.
*/
export interface Userstyles {
[k: string]: Userstyle;
}
/**
* The directory of the userstyle.
*
* This interface was referenced by `Userstyles`'s JSON-Schema definition
* via the `patternProperty` "[A-Za-z0-9_\-]".
*/
export interface Userstyle {
name: Name;
category: Category;
color?: Color;
icon?: Icon;
readme: README;
}
/**
* Options to help in the auto-generation of the userstyle README.
*/
export interface README {
"app-link": ApplicationLink;
usage?: Usage;
faq?: FAQ;
"current-maintainers": CurrentMaintainers;
"past-maintainers"?: PastMaintainers;
[k: string]: unknown;
}
+203
View File
@@ -0,0 +1,203 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"properties": {
"userstyles": {
"$id": "#userstyles",
"title": "Userstyles",
"type": "object",
"description": "All userstyles in the Catppuccin org.",
"patternProperties": {
"[A-Za-z0-9_\\-]": {
"$id": "#userstyles/userstyle",
"title": "Userstyle",
"type": "object",
"description": "The directory of the userstyle.",
"examples": ["youtube"],
"required": ["name", "category", "readme"],
"additionalProperties": false,
"properties": {
"name": {
"$id": "#userstyles/userstyle/name",
"title": "Name",
"description": "The name of the userstyle(s).",
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 2,
"examples": [["AniList", "AniChart"]]
},
{
"type": "string",
"examples": ["YouTube"]
}
]
},
"category": {
"$id": "#userstyles/userstyle/category",
"title": "Category",
"description": "The category that fits the port the most.",
"$ref": "#/$defs/category"
},
"color": {
"$id": "#userstyles/userstyle/color",
"title": "Color",
"description": "The fill color for the icon on the Catppuccin website.",
"type": "string",
"enum": [
"rosewater",
"flamingo",
"pink",
"mauve",
"red",
"maroon",
"peach",
"yellow",
"green",
"teal",
"sky",
"sapphire",
"blue",
"lavender",
"text"
],
"examples": ["pink"]
},
"icon": {
"$id": "#userstyles/userstyle/icon",
"title": "Icon",
"description": "The icon to use on the website. This should be the same name as the SVG file on https://simpleicons.org/. If a `.svg` suffix is present, it's taken from the local website repository resources.",
"type": "string",
"examples": ["twitch", "twitch.svg"]
},
"readme": {
"$id": "#userstyles/userstyle/readme",
"title": "README",
"description": "Options to help in the auto-generation of the userstyle README.",
"type": "object",
"required": ["app-link", "current-maintainers"],
"properties": {
"app-link": {
"$id": "#userstyles/userstyle/readme/app-link",
"title": "Application Link",
"description": "The hyperlink of the app that is being themed.",
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 2,
"examples": [
["https://anilist.co", "https://anichart.net"]
]
},
{
"type": "string",
"examples": ["https://github.com"]
}
]
},
"usage": {
"$id": "#userstyles/userstyle/readme/usage",
"title": "Usage",
"description": "The Usage section of the userstyle README.",
"type": "string"
},
"faq": {
"$id": "#userstyles/userstyle/readme/faq",
"title": "FAQ",
"description": "The FAQ section of the userstyle README.",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"question": {
"type": "string",
"title": "Question",
"description": "A question that a user may have about the userstyle."
},
"answer": {
"type": "string",
"title": "Answer",
"description": "An answer to the question about the userstyle."
}
},
"required": ["question", "answer"]
}
},
"current-maintainers": {
"$id": "#userstyles/userstyle/readme/current-maintainers",
"title": "Current Maintainers",
"description": "List of all active maintainers for this userstyle.",
"$ref": "#/$defs/collaborators"
},
"past-maintainers": {
"$id": "#userstyles/userstyle/readme/past-maintainers",
"title": "Past Maintainers",
"description": "List of all maintainers that have maintained on this userstyle in the past.",
"$ref": "#/$defs/collaborators"
}
}
}
}
}
}
},
"collaborators": {
"$id": "#all-collaborators",
"title": "All Collaborators",
"description": "Represents all maintainers and contributors to all userstyles.",
"$ref": "#/$defs/collaborators"
}
},
"$defs": {
"collaborators": {
"$id": "#collaborators",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Display Name",
"description": "The display name of the collaborator to show in the userstyle README."
},
"url": {
"type": "string",
"title": "GitHub Profile",
"description": "The GitHub profile link of the collaborator to show in the userstyle README."
}
},
"required": ["url"]
}
},
"category": {
"$id": "#category",
"type": "string",
"enum": [
"browser",
"browser_extension",
"cli",
"code_editor",
"development",
"game",
"leisure",
"library",
"messaging",
"note_taking",
"productivity",
"search_engine",
"social",
"system",
"terminal"
]
}
}
}
+261
View File
@@ -0,0 +1,261 @@
collaborators:
- &anubisnekhet
url: https://github.com/AnubisNekhet
- &ndsboy
url: https://github.com/ndsboy
- &jn-sena
name: jan Sena
url: https://github.com/jn-sena
- &watatomo
name: Ren
url: https://github.com/watatomo
- &ryanccn
name: Ryan Cao
url: https://github.com/ryanccn
- &pocco81
url: https://github.com/Pocco81
- &glowingumbreon
name: Umbreon
url: https://github.com/GlowingUmbreon
- &justtobbi
url: https://github.com/justTOBBI
- &andreasgrafen
name: Andreas Grafen
url: https://github.com/andreasgrafen
- &lucasmelin
name: Lucas Melin
url: https://github.com/lucasmelin
- &gingeh
url: https://github.com/Gingeh
- &isabelroses
name: Isabel
url: https://github.com/isabelroses
- &thismoon
url: https://github.com/thismoon
- &alaidriel
url: https://github.com/alaidriel
- &soya-daizu
name: soya_daizu
url: https://github.com/soya-daizu
- &jayylmao
url: https://github.com/jayylmao
- &sekki21956
name: Sekki
url: https://github.com/Sekki21956
- &winston
name: winston
url: https://github.com/nekowinston
- &gitmuslim
url: https://github.com/GitMuslim
- &tnixc
name: Tnixc
url: https://github.com/tnixc
- &elkrien
name: Elkrien
url: https://github.com/elkrien
userstyles:
anilist:
name: ["AniList", "AniChart"]
category: leisure
color: blue
readme:
app-link: ["https://anilist.co", "https://anichart.net"]
usage: |+
> **Note** <br>
> This theme applies to [AniChart](https://anichart.net/) as well, which is an extension of AniList.
current-maintainers: [*anubisnekhet]
brave-search:
name: Brave Search
category: search_engine
icon: brave
color: peach
readme:
app-link: "https://search.brave.com"
usage: "Set theme to dark or light in Brave Search settings, the automatic setting will not work"
current-maintainers: [*ndsboy]
cinny:
name: Cinny
category: messaging
readme:
app-link: "https://github.com/cinnyapo/cinny"
current-maintainers: [*jn-sena]
codeberg:
name: Codeberg
category: productivity
readme:
app-link: "https://codeberg.org"
faq:
- question: "How do I change the accent color?"
answer: "Changing `--color-primary` to any other color should change the accent color in most places"
current-maintainers: [*justtobbi]
deepl:
name: DeepL
category: productivity
readme:
app-link: "https://deepl.com"
current-maintainers: [*watatomo]
elk:
name: Elk
category: social
readme:
app-link: "https://elk.zone"
current-maintainers: [*ryanccn]
github:
name: GitHub
category: productivity
color: text
readme:
app-link: "https://github.com"
current-maintainers: [*pocco81, *glowingumbreon]
past-maintainers: [*andreasgrafen]
hacker-news:
name: Hacker News
category: social
icon: ycombinator
readme:
app-link: "https://news.ycombinator.com/"
current-maintainers: [*lucasmelin]
ichi.moe:
name: ichi.moe
category: productivity
readme:
app-link: "https://ichi.moe"
current-maintainers: [*watatomo]
invidious:
name: Invidious
category: social
icon: youtube
color: red
readme:
app-link: "https://invidious.io"
current-maintainers: [*winston]
past-maintainers: [*andreasgrafen]
lastfm:
name: Last.fm
category: leisure
icon: lastdotfm
color: red
readme:
app-link: "https://last.fm"
current-maintainers: [*anubisnekhet]
past-maintainers: [*gingeh]
libreddit:
name: Libreddit
category: social
icon: reddit
color: peach
readme:
app-link: "https://github.com/libreddit/libreddit"
current-maintainers: [*isabelroses]
past-maintainers: [*andreasgrafen]
mastodon:
name: Mastodon
category: social
readme:
app-link: "https://github.com/mastodon/mastodon"
usage: |+
Add urls to `@-moz-document domain("url")` with url being the chosen server
faq:
- question: "**The theme does not look the same as the preview?**"
answer: "Your Mastodon instance may be using its own custom CSS, which is changing the look of the theme"
- question: "**Theme is not working?**"
answer: |
One solution might be changing the theme from the `preferences > application > theme` to light or dark.
current-maintainers: [*isabelroses]
past-maintainers: [*andreasgrafen]
modrinth:
name: Modrinth
category: game
color: green
readme:
app-link: "https://modrinth.com"
current-maintainers: [*thismoon]
nitter:
name: Nitter
category: social
icon: twitter
color: blue
readme:
app-link: "https://nitter.net"
current-maintainers: [*anubisnekhet]
nixos-search:
name: NixOS Search
category: search_engine
icon: nixos
color: blue
readme:
app-link: "https://search.nixos.org"
current-maintainers: [*alaidriel]
proton:
name: Proton
category: productivity
icon: protonmail
color: lavender
readme:
app-link: "https://proton.me/"
usage: "Open Proton Mail and click the settings in the top right, then set the base theme to `Proton` if you are using the Latte flavor, otherwise set it to `Carbon`"
current-maintainers: [*soya-daizu]
reddit:
name: Reddit
category: social
color: red
icon: reddit
readme:
app-link: "https://reddit.com"
current-maintainers: [*jayylmao]
searxng:
name: SearXNG
category: search_engine
readme:
app-link: "https://github.com/searxng/searxng"
current-maintainers: [*sekki21956, *ryanccn]
tutanota:
name: Tutanota
category: productivity
color: red
readme:
app-link: "https://tutanota.com/"
usage: |+
> **Note** <br>
> Set Tutanota's built-in theme to either **light** if you're using Latte or **dark** if you're using the others.
current-maintainers: [*ryanccn]
twitch:
name: Twitch
category: social
icon: twitch
color: mauve
readme:
app-link: "https://twitch.tv"
usage: |+
> **Note** <br>
> Set Twitch's built-in theme to either **light** if you're using Latte or **dark** if you're using the others.
current-maintainers: [*gitmuslim, *isabelroses]
vercel:
name: Vercel
category: development
readme:
app-link: "https://vercel.com"
current-maintainers: [*ryanccn]
wikiwand:
name: WikiWand
category: productivity
icon: wikipedia
readme:
app-link: "https://www.wikiwand.com"
current-maintainers: [*tnixc]
youtube:
name: YouTube
category: social
color: red
readme:
app-link: "https://youtube.com"
usage: |+
> **Note** <br>
> Make sure your base YouTube theme is set to **light** mode!
faq:
- question: "**What does the 'Enable for black bars' option mean?**"
answer: "It is there in-case you have an OLED display. If you have one, you might want to enable this."
current-maintainers: [*isabelroses]
past-maintainers: [*elkrien]
# yaml-language-server: $schema=userstyles.schema.json