mirror of
https://github.com/web3privacy/events.git
synced 2024-10-15 12:06:27 +02:00
update
This commit is contained in:
parent
78f4787f98
commit
f6457de2e3
4 changed files with 18 additions and 13 deletions
|
@ -45,7 +45,7 @@ research and community of [Web3Privacy Now](https://web3privacy.info).
|
|||
| meetup | `por1`* | 2024/May | 🇵🇹 Porto | 3 | [ETHPorto](https://ethporto.org/) | - | |
|
||||
| meetup | `ber1` | 2024/May | 🇩🇪 Berlin | 3 | ETHBerlin 4 | Tree | |
|
||||
| summit | `s3` | 2024/Jun | 🇨🇿 Prague | 16 | ETHPrague 2024 | Tree (+3) | |
|
||||
| hackathon | `h1` | 2024/Jun | 🇸🇮 Bled | 10 | | Tree (+3) | |
|
||||
| hackathon | `h1` | **2024-06-19** - 2024-06-26 (7) | 🇸🇮 Bled | 10 | | Tree (+3) | |
|
||||
| meetup | `lju1` | 2024/Jun | 🇸🇮 Ljubljana | 5 | W3PN Hackathon | Tree (+3) | |
|
||||
| meetup | `bcn2`* | 2024/Jul | 🇪🇸 Barcelona | 3 | ETHBarcelona (?) | - | |
|
||||
| meetup | `bru1` | 2024/Jul | 🇧🇪 Brussels | 3 | [EthCC 7](https://www.ethcc.io/) | Mykola (+1) | |
|
||||
|
|
|
@ -27,7 +27,7 @@ research and community of [Web3Privacy Now](https://web3privacy.info).
|
|||
| type | # id | date | location | 🎰 | coincidence | dri | links |
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
<% it.events.forEach(function(event, i){ %>
|
||||
| <%= event.type %> | `<%= event.id.replace("w3pm-", "").replace(/^w3p/, '') %>`<% if (event.optional) { %>*<% } %> | <%= event.date.match(/^\d{4}-\d{2}-\d{2}$/) ? `**${event.date}**` : event.date %> | <%= it.getFlagEmoji(event.country) %> <%= event.city %> | <%= event.slots || '-' %> | <%= event.coincidence %> | <%= event.lead || "-" %><% if (event.helpers && event.helpers.length > 0) { %> (+<%= event.helpers.length%>)<% } %> | <%= (event.links && Object.keys(event.links).map(k => `[${k}](${event.links[k]})`).join(", ")) || "" %> |
|
||||
| <%= event.type %> | `<%= event.id.replace("w3pm-", "").replace(/^w3p/, '') %>`<% if (event.optional) { %>*<% } %> | <%= event.date.match(/^\d{4}-\d{2}-\d{2}$/) ? `**${event.date}**` : event.date %><% if (event.days && event.days > 1) { %> - <%= it.dateFns.format(it.dateFns.addDays(new Date(event.date), event.days), 'yyyy-MM-dd') %> (<%= event.days %>)<% } %> | <%= it.getFlagEmoji(event.country) %> <%= event.city %> | <%= event.slots || '-' %> | <%= event.coincidence %> | <%= event.lead || "-" %><% if (event.helpers && event.helpers.length > 0) { %> (+<%= event.helpers.length%>)<% } %> | <%= (event.links && Object.keys(event.links).map(k => `[${k}](${event.links[k]})`).join(", ")) || "" %> |
|
||||
<% }) %>
|
||||
|
||||
`*` - Optional event (can be cancelled due to lack of interest)
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
|
||||
- id: w3ph1
|
||||
type: hackathon
|
||||
date: "2024/Jun"
|
||||
date: "2024-06-19"
|
||||
days: 7
|
||||
city: Bled
|
||||
country: si
|
||||
|
|
25
index.js
25
index.js
|
@ -2,18 +2,19 @@ import Ajv from "npm:ajv@8.8.2";
|
|||
import addFormats from "npm:ajv-formats@2.1.1";
|
||||
import { load as yamlLoad } from "https://deno.land/x/js_yaml_port@3.14.0/js-yaml.js";
|
||||
import { emptyDir } from "https://deno.land/std@0.173.0/fs/mod.ts";
|
||||
import { Eta } from "https://deno.land/x/eta@v3.0.3/src/index.ts"
|
||||
import { Eta } from "https://deno.land/x/eta@v3.0.3/src/index.ts";
|
||||
import * as dateFns from "npm:date-fns";
|
||||
|
||||
async function _loadYaml(fn) {
|
||||
return yamlLoad(await Deno.readTextFile(fn));
|
||||
}
|
||||
|
||||
function getFlagEmoji(countryCode) {
|
||||
if (countryCode === 'xx') return "🏴☠️";
|
||||
if (countryCode === "xx") return "🏴☠️";
|
||||
const codePoints = countryCode
|
||||
.toUpperCase()
|
||||
.split('')
|
||||
.map(char => 127397 + char.charCodeAt());
|
||||
.split("")
|
||||
.map((char) => 127397 + char.charCodeAt());
|
||||
return String.fromCodePoint(...codePoints);
|
||||
}
|
||||
|
||||
|
@ -32,10 +33,10 @@ async function test() {
|
|||
throw validator.errors;
|
||||
}
|
||||
if (ids.includes(item.id)) {
|
||||
throw `ID exists: ${item.id}`
|
||||
throw `ID exists: ${item.id}`;
|
||||
}
|
||||
|
||||
ids.push(item.id)
|
||||
ids.push(item.id);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -47,17 +48,21 @@ async function build() {
|
|||
await Deno.writeTextFile(fn, JSON.stringify(list, null, 2));
|
||||
console.log(`File saved: `, fn);
|
||||
|
||||
const readmeFn = "./README.md"
|
||||
const eta = new Eta({ views: "./" })
|
||||
const readmeFn = "./README.md";
|
||||
const eta = new Eta({ views: "./" });
|
||||
//console.log(output)
|
||||
const warning = `<!--
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
DO NOT EDIT THIS FILE DIRECLY
|
||||
EDIT "./README.tpl.eta" INSTEAD
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
-->`
|
||||
-->`;
|
||||
|
||||
await Deno.writeTextFile(readmeFn, warning + "\n\n" + eta.render("./README.tpl.eta", { events: list, getFlagEmoji }))
|
||||
await Deno.writeTextFile(
|
||||
readmeFn,
|
||||
warning + "\n\n" +
|
||||
eta.render("./README.tpl.eta", { events: list, getFlagEmoji, dateFns }),
|
||||
);
|
||||
console.log(`File saved: `, readmeFn);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue