add people
|
@ -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"
|
||||
$ref: "#/$defs/event"
|
||||
|
||||
people:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/$defs/person"
|
|
@ -19,4 +19,8 @@ core-team:
|
|||
projects:
|
||||
$load: projects
|
||||
events:
|
||||
$load: events
|
||||
$load: events
|
||||
people:
|
||||
$load: people
|
||||
$opts:
|
||||
loader: person
|
BIN
src/people/_images/alex-kampa.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
src/people/_images/alona-shevchenko.jpg
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
src/people/_images/althea.jpeg
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
src/people/_images/ameen-soleimani.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
src/people/_images/antoni-zolciak.jpg
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
src/people/_images/costanza-gallo.jpeg
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
src/people/_images/dcbuilder.jpg
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
src/people/_images/guy-zyskind.jpg
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
src/people/_images/juraj-bednar.jpg
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
src/people/_images/manu-alzuru.jpg
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
src/people/_images/mario-havel.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
src/people/_images/max-hampshire.jpg
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
src/people/_images/merula.jpeg
Normal file
After Width: | Height: | Size: 109 KiB |
BIN
src/people/_images/mykola.png
Normal file
After Width: | Height: | Size: 132 KiB |
BIN
src/people/_images/nick-almond.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/people/_images/oliver-gale.jpeg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/people/_images/pg.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/people/_images/rachel-rose-oleary.jpg
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
src/people/_images/serinko.jpeg
Normal file
After Width: | Height: | Size: 129 KiB |
BIN
src/people/_images/steffen.jpeg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
src/people/_images/tibor-csoka.jpg
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
src/people/_images/tree.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
src/people/_images/wslyvh.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
5
src/people/alex-kampa.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
name: Alex Kampa
|
||||
caption: Director at [Aragon ZK Research](https://research.aragon.org/)
|
||||
country: lu
|
||||
refs:
|
||||
linkedin: alex-kampa
|
5
src/people/alona-shevchenko.yaml
Normal file
|
@ -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
|
2
src/people/althea.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: Althea
|
||||
caption: Head of Comms, Privacy & Scaling Exploration
|
5
src/people/ameen-soleimani.yaml
Normal file
|
@ -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
|
5
src/people/antoni-zolciak.yaml
Normal file
|
@ -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
|
5
src/people/costanza-gallo.yaml
Normal file
|
@ -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
|
5
src/people/dcbuilder.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
name: dcbuilder.eth
|
||||
caption: Research engineer at [Worldcoin](https://worldcoin.org/), ZKML & Rust enthusiast
|
||||
country: cz
|
||||
refs:
|
||||
twitter: DCbuild3r
|
5
src/people/guy-zyskind.yaml
Normal file
|
@ -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
|
5
src/people/juraj-bednar.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
name: Juraj Bednar
|
||||
caption: Educator, writer, cryptoanarchist & biohacker ([blog](https://juraj.bednar.io/))
|
||||
country: sk
|
||||
refs:
|
||||
twitter: jurbed
|
5
src/people/manu-alzuru.yaml
Normal file
|
@ -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
|
5
src/people/mario-havel.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
name: Mario Havel
|
||||
caption: Hacker, Co-Founder of [Bordel Hackerspace](https://bordel.paralelnipolis.cz/#/)
|
||||
country: cz
|
||||
refs:
|
||||
twitter: TMIYChao
|
5
src/people/max-hampshire.yaml
Normal file
|
@ -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
|
2
src/people/merula.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: Merula
|
||||
caption: Software engineer and cryptographer Circles Entropy
|
5
src/people/mykola-siusko.yaml
Normal file
|
@ -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
|
5
src/people/nick-almond.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
name: Nick Almond
|
||||
caption: Building next generation DAOs with [FactoryDAO](https://www.factorydao.xyz/)
|
||||
country: gb
|
||||
refs:
|
||||
twitter: DrNickA
|
4
src/people/oliver-gale.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
name: Oliver Gale
|
||||
caption: CEO of [Panther Protocol](https://www.pantherprotocol.io/)
|
||||
refs:
|
||||
twitter: OriginalOlii
|
5
src/people/pg.yaml
Normal file
|
@ -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
|
4
src/people/rachel-rose-oleary.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
name: Rachel-Rose O'Leary
|
||||
caption: "[DarkFi](https://dark.fi/) core dev, writer"
|
||||
refs:
|
||||
twitter: lunar_mining
|
2
src/people/serinko.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: Serinko
|
||||
caption: Privacy Researcher
|
4
src/people/steffen-kux.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
name: Steffen Kux
|
||||
caption: CEO dm3
|
||||
refs:
|
||||
twitter: SteffenKux
|
2
src/people/tibor-csoka.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: Tibor Csóka
|
||||
caption: Software Engineer at [HOPR](https://hoprnet.org/)
|
5
src/people/tree.yaml
Normal file
|
@ -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
|
4
src/people/wslyvh.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
name: Wesley
|
||||
caption: Events @ Ethereum 🛠️ Indie Maker
|
||||
refs:
|
||||
twitter: wslyvh
|
|
@ -5,4 +5,4 @@ await engine.init();
|
|||
|
||||
await engine.build();
|
||||
|
||||
console.log('Done')
|
||||
console.log("Done");
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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)
|
||||
checkCollection("index", engine.schemas.index, engine.rendered);
|
||||
|
|