diff --git a/schema/index.yaml b/schema/index.yaml index 6bcd443..1543981 100644 --- a/schema/index.yaml +++ b/schema/index.yaml @@ -75,6 +75,32 @@ $defs: "^[\\w]+": type: string format: uri + person: + type: object + additionalProperties: false + required: + - name + properties: + name: + type: string + caption: + type: string + country: + type: string + pattern: '^[a-z]{2}$' + refs: + type: object + additionalProperties: false + properties: + twitter: + type: string + linkedin: + type: string + bsky: + type: string + imageUrl: + type: string + format: uri type: object additionalProperties: false @@ -94,4 +120,9 @@ properties: events: type: array items: - $ref: "#/$defs/event" \ No newline at end of file + $ref: "#/$defs/event" + + people: + type: array + items: + $ref: "#/$defs/person" \ No newline at end of file diff --git a/src/index.yaml b/src/index.yaml index b6389af..100bec2 100644 --- a/src/index.yaml +++ b/src/index.yaml @@ -19,4 +19,8 @@ core-team: projects: $load: projects events: - $load: events \ No newline at end of file + $load: events +people: + $load: people + $opts: + loader: person \ No newline at end of file diff --git a/src/people/_images/alex-kampa.jpg b/src/people/_images/alex-kampa.jpg new file mode 100644 index 0000000..4d3e1e1 Binary files /dev/null and b/src/people/_images/alex-kampa.jpg differ diff --git a/src/people/_images/alona-shevchenko.jpg b/src/people/_images/alona-shevchenko.jpg new file mode 100644 index 0000000..b9e3bbc Binary files /dev/null and b/src/people/_images/alona-shevchenko.jpg differ diff --git a/src/people/_images/althea.jpeg b/src/people/_images/althea.jpeg new file mode 100644 index 0000000..d3f1f7c Binary files /dev/null and b/src/people/_images/althea.jpeg differ diff --git a/src/people/_images/ameen-soleimani.jpg b/src/people/_images/ameen-soleimani.jpg new file mode 100644 index 0000000..ab88eb5 Binary files /dev/null and b/src/people/_images/ameen-soleimani.jpg differ diff --git a/src/people/_images/antoni-zolciak.jpg b/src/people/_images/antoni-zolciak.jpg new file mode 100644 index 0000000..e994fec Binary files /dev/null and b/src/people/_images/antoni-zolciak.jpg differ diff --git a/src/people/_images/costanza-gallo.jpeg b/src/people/_images/costanza-gallo.jpeg new file mode 100644 index 0000000..6b03382 Binary files /dev/null and b/src/people/_images/costanza-gallo.jpeg differ diff --git a/src/people/_images/dcbuilder.jpg b/src/people/_images/dcbuilder.jpg new file mode 100644 index 0000000..0351a67 Binary files /dev/null and b/src/people/_images/dcbuilder.jpg differ diff --git a/src/people/_images/guy-zyskind.jpg b/src/people/_images/guy-zyskind.jpg new file mode 100644 index 0000000..2b5b698 Binary files /dev/null and b/src/people/_images/guy-zyskind.jpg differ diff --git a/src/people/_images/juraj-bednar.jpg b/src/people/_images/juraj-bednar.jpg new file mode 100644 index 0000000..1b6ce9f Binary files /dev/null and b/src/people/_images/juraj-bednar.jpg differ diff --git a/src/people/_images/manu-alzuru.jpg b/src/people/_images/manu-alzuru.jpg new file mode 100644 index 0000000..7904693 Binary files /dev/null and b/src/people/_images/manu-alzuru.jpg differ diff --git a/src/people/_images/mario-havel.jpg b/src/people/_images/mario-havel.jpg new file mode 100644 index 0000000..bd3991f Binary files /dev/null and b/src/people/_images/mario-havel.jpg differ diff --git a/src/people/_images/max-hampshire.jpg b/src/people/_images/max-hampshire.jpg new file mode 100644 index 0000000..204b2df Binary files /dev/null and b/src/people/_images/max-hampshire.jpg differ diff --git a/src/people/_images/merula.jpeg b/src/people/_images/merula.jpeg new file mode 100644 index 0000000..a61aa8d Binary files /dev/null and b/src/people/_images/merula.jpeg differ diff --git a/src/people/_images/mykola.png b/src/people/_images/mykola.png new file mode 100644 index 0000000..5be4666 Binary files /dev/null and b/src/people/_images/mykola.png differ diff --git a/src/people/_images/nick-almond.jpg b/src/people/_images/nick-almond.jpg new file mode 100644 index 0000000..d2a1f06 Binary files /dev/null and b/src/people/_images/nick-almond.jpg differ diff --git a/src/people/_images/oliver-gale.jpeg b/src/people/_images/oliver-gale.jpeg new file mode 100644 index 0000000..35521d1 Binary files /dev/null and b/src/people/_images/oliver-gale.jpeg differ diff --git a/src/people/_images/pg.jpg b/src/people/_images/pg.jpg new file mode 100644 index 0000000..e4d31e6 Binary files /dev/null and b/src/people/_images/pg.jpg differ diff --git a/src/people/_images/rachel-rose-oleary.jpg b/src/people/_images/rachel-rose-oleary.jpg new file mode 100644 index 0000000..987ee37 Binary files /dev/null and b/src/people/_images/rachel-rose-oleary.jpg differ diff --git a/src/people/_images/serinko.jpeg b/src/people/_images/serinko.jpeg new file mode 100644 index 0000000..f72510e Binary files /dev/null and b/src/people/_images/serinko.jpeg differ diff --git a/src/people/_images/steffen.jpeg b/src/people/_images/steffen.jpeg new file mode 100644 index 0000000..4833886 Binary files /dev/null and b/src/people/_images/steffen.jpeg differ diff --git a/src/people/_images/tibor-csoka.jpg b/src/people/_images/tibor-csoka.jpg new file mode 100644 index 0000000..ef9f4bb Binary files /dev/null and b/src/people/_images/tibor-csoka.jpg differ diff --git a/src/people/_images/tree.jpg b/src/people/_images/tree.jpg new file mode 100644 index 0000000..a561694 Binary files /dev/null and b/src/people/_images/tree.jpg differ diff --git a/src/people/_images/wslyvh.png b/src/people/_images/wslyvh.png new file mode 100644 index 0000000..3d09003 Binary files /dev/null and b/src/people/_images/wslyvh.png differ diff --git a/src/people/alex-kampa.yaml b/src/people/alex-kampa.yaml new file mode 100644 index 0000000..8951343 --- /dev/null +++ b/src/people/alex-kampa.yaml @@ -0,0 +1,5 @@ +name: Alex Kampa +caption: Director at [Aragon ZK Research](https://research.aragon.org/) +country: lu +refs: + linkedin: alex-kampa \ No newline at end of file diff --git a/src/people/alona-shevchenko.yaml b/src/people/alona-shevchenko.yaml new file mode 100644 index 0000000..6dff20e --- /dev/null +++ b/src/people/alona-shevchenko.yaml @@ -0,0 +1,5 @@ +name: Alona Shevchenko +caption: Unapologetic Ukrainian behind [Ukraine DAO](https://ukrainedao.love/) & [Kyiv Tech Summit](https://www.kyivtechsummit.com/) +country: ua +refs: + twitter: cryptodrftng \ No newline at end of file diff --git a/src/people/althea.yaml b/src/people/althea.yaml new file mode 100644 index 0000000..bb3be75 --- /dev/null +++ b/src/people/althea.yaml @@ -0,0 +1,2 @@ +name: Althea +caption: Head of Comms, Privacy & Scaling Exploration \ No newline at end of file diff --git a/src/people/ameen-soleimani.yaml b/src/people/ameen-soleimani.yaml new file mode 100644 index 0000000..5da7a3d --- /dev/null +++ b/src/people/ameen-soleimani.yaml @@ -0,0 +1,5 @@ +name: Ameen Soleimani +caption: Summoner of [IranUnchained](https://www.iranunchained.com/), [Privacy Pools](https://www.privacypools.com/), [MolochDAO](https://molochdao.com/) +country: us +refs: + twitter: ameensol \ No newline at end of file diff --git a/src/people/antoni-zolciak.yaml b/src/people/antoni-zolciak.yaml new file mode 100644 index 0000000..ecf549c --- /dev/null +++ b/src/people/antoni-zolciak.yaml @@ -0,0 +1,5 @@ +name: Antoni Zolciak +caption: Co-founder of [Aleph Zero](https://alephzero.org/) & [Cardinal](https://cardinal.co/) +country: pl +refs: + twitter: AntoniZolciak \ No newline at end of file diff --git a/src/people/costanza-gallo.yaml b/src/people/costanza-gallo.yaml new file mode 100644 index 0000000..982d2e7 --- /dev/null +++ b/src/people/costanza-gallo.yaml @@ -0,0 +1,5 @@ +name: Costanza Gallo +caption: Head of partnerships at the [The Swarm Foundation](https://www.ethswarm.org/foundation) +country: it +refs: + twitter: costgallo \ No newline at end of file diff --git a/src/people/dcbuilder.yaml b/src/people/dcbuilder.yaml new file mode 100644 index 0000000..1674e91 --- /dev/null +++ b/src/people/dcbuilder.yaml @@ -0,0 +1,5 @@ +name: dcbuilder.eth +caption: Research engineer at [Worldcoin](https://worldcoin.org/), ZKML & Rust enthusiast +country: cz +refs: + twitter: DCbuild3r \ No newline at end of file diff --git a/src/people/guy-zyskind.yaml b/src/people/guy-zyskind.yaml new file mode 100644 index 0000000..15e5910 --- /dev/null +++ b/src/people/guy-zyskind.yaml @@ -0,0 +1,5 @@ +name: Guy Zyskind +caption: Founder of [Secret Network](https://scrt.network/), CEO [SCRT Labs](https://www.scrtlabs.com/) +country: is +refs: + twitter: GuyZys \ No newline at end of file diff --git a/src/people/juraj-bednar.yaml b/src/people/juraj-bednar.yaml new file mode 100644 index 0000000..85ee985 --- /dev/null +++ b/src/people/juraj-bednar.yaml @@ -0,0 +1,5 @@ +name: Juraj Bednar +caption: Educator, writer, cryptoanarchist & biohacker ([blog](https://juraj.bednar.io/)) +country: sk +refs: + twitter: jurbed \ No newline at end of file diff --git a/src/people/manu-alzuru.yaml b/src/people/manu-alzuru.yaml new file mode 100644 index 0000000..a303133 --- /dev/null +++ b/src/people/manu-alzuru.yaml @@ -0,0 +1,5 @@ +name: Manu Alzuru +caption: Humanist, solarpunk, Founder of [DoinGud](https://doingud.com/) & [ETH Barcelona](https://ethbarcelona.com/) +country: es +refs: + twitter: ManuAlzuru \ No newline at end of file diff --git a/src/people/mario-havel.yaml b/src/people/mario-havel.yaml new file mode 100644 index 0000000..923f4b4 --- /dev/null +++ b/src/people/mario-havel.yaml @@ -0,0 +1,5 @@ +name: Mario Havel +caption: Hacker, Co-Founder of [Bordel Hackerspace](https://bordel.paralelnipolis.cz/#/) +country: cz +refs: + twitter: TMIYChao \ No newline at end of file diff --git a/src/people/max-hampshire.yaml b/src/people/max-hampshire.yaml new file mode 100644 index 0000000..41e584c --- /dev/null +++ b/src/people/max-hampshire.yaml @@ -0,0 +1,5 @@ +name: Max Hampshire +caption: Senior devrel of [Nym](https://nymtech.net/), Co-founder of [terra0](https://terra0.org/) +country: at +refs: + twitter: _wjth \ No newline at end of file diff --git a/src/people/merula.yaml b/src/people/merula.yaml new file mode 100644 index 0000000..cceec08 --- /dev/null +++ b/src/people/merula.yaml @@ -0,0 +1,2 @@ +name: Merula +caption: Software engineer and cryptographer Circles Entropy \ No newline at end of file diff --git a/src/people/mykola-siusko.yaml b/src/people/mykola-siusko.yaml new file mode 100644 index 0000000..d464624 --- /dev/null +++ b/src/people/mykola-siusko.yaml @@ -0,0 +1,5 @@ +name: Mykola Siusko +caption: Web3 privacy advocate behind [Web3Privacy Now](https://web3privacy.info/), [NYM](https://nymtech.net/) ambassador +country: es +refs: + twitter: nicksvyaznoy \ No newline at end of file diff --git a/src/people/nick-almond.yaml b/src/people/nick-almond.yaml new file mode 100644 index 0000000..bc04013 --- /dev/null +++ b/src/people/nick-almond.yaml @@ -0,0 +1,5 @@ +name: Nick Almond +caption: Building next generation DAOs with [FactoryDAO](https://www.factorydao.xyz/) +country: gb +refs: + twitter: DrNickA \ No newline at end of file diff --git a/src/people/oliver-gale.yaml b/src/people/oliver-gale.yaml new file mode 100644 index 0000000..aebdc38 --- /dev/null +++ b/src/people/oliver-gale.yaml @@ -0,0 +1,4 @@ +name: Oliver Gale +caption: CEO of [Panther Protocol](https://www.pantherprotocol.io/) +refs: + twitter: OriginalOlii \ No newline at end of file diff --git a/src/people/pg.yaml b/src/people/pg.yaml new file mode 100644 index 0000000..8b08f92 --- /dev/null +++ b/src/people/pg.yaml @@ -0,0 +1,5 @@ +name: PG +caption: Organizing [ETHRome](https://ethrome.org) w/ [urbe.eth](https://linktr.ee/urbe.eth), making sauce w/ [SpaghettETH](https://linktr.ee/spaghetteth) +country: it +refs: + twitter: PG_CDG \ No newline at end of file diff --git a/src/people/rachel-rose-oleary.yaml b/src/people/rachel-rose-oleary.yaml new file mode 100644 index 0000000..a48a08a --- /dev/null +++ b/src/people/rachel-rose-oleary.yaml @@ -0,0 +1,4 @@ +name: Rachel-Rose O'Leary +caption: "[DarkFi](https://dark.fi/) core dev, writer" +refs: + twitter: lunar_mining \ No newline at end of file diff --git a/src/people/serinko.yaml b/src/people/serinko.yaml new file mode 100644 index 0000000..acc9c52 --- /dev/null +++ b/src/people/serinko.yaml @@ -0,0 +1,2 @@ +name: Serinko +caption: Privacy Researcher \ No newline at end of file diff --git a/src/people/steffen-kux.yaml b/src/people/steffen-kux.yaml new file mode 100644 index 0000000..b09e909 --- /dev/null +++ b/src/people/steffen-kux.yaml @@ -0,0 +1,4 @@ +name: Steffen Kux +caption: CEO dm3 +refs: + twitter: SteffenKux \ No newline at end of file diff --git a/src/people/tibor-csoka.yaml b/src/people/tibor-csoka.yaml new file mode 100644 index 0000000..70830b7 --- /dev/null +++ b/src/people/tibor-csoka.yaml @@ -0,0 +1,2 @@ +name: Tibor Csóka +caption: Software Engineer at [HOPR](https://hoprnet.org/) \ No newline at end of file diff --git a/src/people/tree.yaml b/src/people/tree.yaml new file mode 100644 index 0000000..d8d0100 --- /dev/null +++ b/src/people/tree.yaml @@ -0,0 +1,5 @@ +name: Tree +caption: Orchestrating lunarpunk events [ETHBrno](https://ethbrno.cz) & [w3ps](https://github.com/web3privacy/w3ps) w/ [gwei.cz](https://gwei.cz) +country: cz +refs: + bsky: tree.fail \ No newline at end of file diff --git a/src/people/wslyvh.yaml b/src/people/wslyvh.yaml new file mode 100644 index 0000000..3655de6 --- /dev/null +++ b/src/people/wslyvh.yaml @@ -0,0 +1,4 @@ +name: Wesley +caption: Events @ Ethereum 🛠️ Indie Maker +refs: + twitter: wslyvh \ No newline at end of file diff --git a/utils/build.js b/utils/build.js index ca14d7a..a67bcae 100644 --- a/utils/build.js +++ b/utils/build.js @@ -5,4 +5,4 @@ await engine.init(); await engine.build(); -console.log('Done') \ No newline at end of file +console.log("Done"); diff --git a/utils/engine.js b/utils/engine.js index bfd37fa..5f43fef 100644 --- a/utils/engine.js +++ b/utils/engine.js @@ -2,6 +2,7 @@ import { join } from "https://deno.land/std@0.208.0/path/mod.ts"; import { emptyDir } from "https://deno.land/std@0.196.0/fs/empty_dir.ts"; import { parse, stringify } from "npm:yaml"; import { exists } from "https://deno.land/std@0.213.0/fs/exists.ts"; +import { copy } from "https://deno.land/std@0.214.0/fs/copy.ts"; const SRC_DIR = "./src"; const DEST_DIR = "./dist"; @@ -17,57 +18,82 @@ export class Engine { async init() { // load schemas for await (const dirEntry of Deno.readDir(SCHEMA_DIR)) { - const [fn, _] = dirEntry.name.split("."); - this.schemas[fn] = await readYamlFile(join(SCHEMA_DIR, dirEntry.name)); + const [fn, _] = dirEntry.name.split("."); + this.schemas[fn] = await readYamlFile(join(SCHEMA_DIR, dirEntry.name)); } // load this.index = await readYamlFile(join(SRC_DIR, "index.yaml")); this.rendered = await this.render(this.index); - } - async loadDir(src) { - const out = {} - const dir = join(SRC_DIR, src) - console.log(`reading dir=${dir}`) - + async loadDir(src, opts = {}) { + const out = {}; + const dir = join(SRC_DIR, src); + console.log(`reading dir=${dir}`); + if (await exists(join(dir, "index.yaml"))) { const out = readYamlFile(join(dir, "index.yaml")); - return out + return out; } + let images = []; + if (await exists(join(dir, "_images"))) { + for await (const ie of Deno.readDir(join(dir, "_images"))) { + const [id, ext] = ie.name.split("."); + images.push({ id, ext }); + } + } const arr = []; for await (const dirEntry of Deno.readDir(dir)) { const [fn, ext] = dirEntry.name.split("."); - if (!ext) { - const obj = Object.assign({ id: fn }, await this.loadDir(join(src, fn))) - arr.push(obj) + if (!ext && !fn.startsWith("_")) { + const obj = Object.assign( + { id: fn }, + await this.loadDir(join(src, fn)), + ); + arr.push(obj); + } + if (ext === "yaml" && fn !== "index") { + const item = await readYamlFile(join(dir, dirEntry.name)); + if (opts.loader === "person") { + // load image + const img = images.find((i) => i.id === fn); + if (img) { + item.imageUrl = + `https://data.web3privacy.info/img/people/${img.id}.${img.ext}`; + } + } + arr.push(item); } - /*if (ext === "yaml" && fn !== "index") { - out[fn] = await readYamlFile(join(dir, dirEntry.name)); - }*/ } - return arr + return arr; } async render(src) { - const out = {} + const out = {}; for (const key of Object.keys(src)) { const val = src[key]; if (typeof val === "object" && val.$load) { - out[key] = await this.loadDir(val.$load); + out[key] = await this.loadDir(val.$load, val.$opts); continue; } - out[key] = val + out[key] = val; } - return out + return out; } async build() { await emptyDir(DEST_DIR); //await writeJSONFile(join(DEST_DIR, "index.json"), this.index); + // copy images + await emptyDir(join(DEST_DIR, "img")); + await copy( + join(SRC_DIR, "people", "_images"), + join(DEST_DIR, "img", "people"), + ); + await writeJSONFile( join(DEST_DIR, "index.json"), Object.assign({}, this.rendered), diff --git a/utils/test.js b/utils/test.js index 78db186..1ce5baf 100644 --- a/utils/test.js +++ b/utils/test.js @@ -9,17 +9,17 @@ await engine.init(); const ajv = new Ajv({ strict: false }); addFormats(ajv); -function checkCollection (name, schema, data) { - Deno.test(name, () => { - if (!schema) { - return - } - const validator = ajv.compile(schema); - if (!validator(data)) { - throw validator.errors; - } - }) +function checkCollection(name, schema, data) { + Deno.test(name, () => { + if (!schema) { + return; + } + const validator = ajv.compile(schema); + if (!validator(data)) { + throw validator.errors; + } + }); } // check index -checkCollection("index", engine.schemas.index, engine.rendered) \ No newline at end of file +checkCollection("index", engine.schemas.index, engine.rendered);