Add segments
This commit is contained in:
rodič
038452f9cb
revize
d9e4ed8525
|
@ -5,7 +5,6 @@ name = "Example Event 2023"
|
|||
shortname = "Example"
|
||||
|
||||
# type of the event
|
||||
#
|
||||
# available types (you can choose more):
|
||||
# * meetup
|
||||
# * conference
|
||||
|
@ -16,7 +15,6 @@ shortname = "Example"
|
|||
types = ["meetup"]
|
||||
|
||||
# status of the event
|
||||
#
|
||||
# available types:
|
||||
# * idea
|
||||
# * planning
|
||||
|
@ -42,6 +40,9 @@ days = 3
|
|||
# the event times (shows up in the event card)
|
||||
times = "09:00 - 20:00"
|
||||
|
||||
# Link to venues from the Places table - use this OR enter venueName, venueUrl and venueAddress
|
||||
# venues = ["gabriel-loci"]
|
||||
|
||||
# the event venue name
|
||||
venueName = "Example venue"
|
||||
|
||||
|
@ -74,7 +75,6 @@ description = """
|
|||
|
||||
[registration]
|
||||
# type of registration
|
||||
#
|
||||
# Possible values:
|
||||
# * tickets
|
||||
# * invites
|
||||
|
@ -91,7 +91,6 @@ link = "https://example.org/tickets"
|
|||
#button = "Buy tickets!"
|
||||
|
||||
# status of registrations
|
||||
#
|
||||
# Possible values:
|
||||
# * available
|
||||
# * sold-out
|
||||
|
|
|
@ -7,12 +7,13 @@ org = ""
|
|||
dri = ""
|
||||
poc = "[Radek Švarz](https://t.me/r4deks)"
|
||||
date = "2023-06-02"
|
||||
times = "14:00-17:00"
|
||||
days = 1
|
||||
venueName = "TBA"
|
||||
#venueAddress = ""
|
||||
#venueUrl = ""
|
||||
languages = ["czech", "slovak"]
|
||||
#attendees = 100
|
||||
attendees = 30
|
||||
tags = ["DeFi", "lending"]
|
||||
description = '''
|
||||
'''
|
||||
|
|
|
@ -7,7 +7,7 @@ dri = ""
|
|||
poc = "Kristian Csepcsar"
|
||||
date = "2023-06-07"
|
||||
days = 1
|
||||
times = ""
|
||||
#times = ""
|
||||
venueName = "TBA"
|
||||
#venueUrl = ""
|
||||
#venueAddress = ""
|
||||
|
|
|
@ -25,4 +25,20 @@ status = "available"
|
|||
|
||||
[links]
|
||||
web = "https://www.btcprague.com/"
|
||||
twitter = "https://twitter.com/BtcPrague"
|
||||
twitter = "https://twitter.com/BtcPrague"
|
||||
|
||||
[[segments]]
|
||||
date = "2023-06-08"
|
||||
times = "09:00-20:00"
|
||||
ecap = 500
|
||||
title = "Industry Day"
|
||||
|
||||
[[segments]]
|
||||
date = "2023-06-09"
|
||||
times = "09:00-19:00"
|
||||
ecap = 10000
|
||||
|
||||
[[segments]]
|
||||
date = "2023-06-10"
|
||||
times = "09:00-19:00"
|
||||
ecap = 10000
|
|
@ -7,7 +7,6 @@ dri = ""
|
|||
poc = "JosefJ, Vojta"
|
||||
date = "2023-06-09"
|
||||
days = 3
|
||||
times = "09:00 - 20:00"
|
||||
venues = ["paralelni-polis", "la-fabrika"]
|
||||
languages = ["english"]
|
||||
attendees = 600
|
||||
|
@ -25,3 +24,32 @@ type = "invites"
|
|||
web = "https://ethprague.com/"
|
||||
twitter = "https://twitter.com/EthPrague"
|
||||
telegram = "https://t.me/ethprague"
|
||||
|
||||
[[segments]]
|
||||
date = "2023-06-09"
|
||||
times = "09:00-19:00"
|
||||
ecap = 600
|
||||
|
||||
[[segments]]
|
||||
date = "2023-06-09"
|
||||
times = "19:00-09:00"
|
||||
ecap = 100
|
||||
title = "Night hacking"
|
||||
venues = ["paralelni-polis"]
|
||||
|
||||
[[segments]]
|
||||
date = "2023-06-10"
|
||||
times = "09:00-19:00"
|
||||
ecap = 600
|
||||
|
||||
[[segments]]
|
||||
date = "2023-06-10"
|
||||
times = "19:00-09:00"
|
||||
ecap = 100
|
||||
title = "Night hacking"
|
||||
venues = ["paralelni-polis"]
|
||||
|
||||
[[segments]]
|
||||
date = "2023-06-11"
|
||||
times = "09:00-18:00"
|
||||
ecap = 600
|
|
@ -0,0 +1,28 @@
|
|||
name = "#Lunarpunk Party"
|
||||
shortname = ""
|
||||
types = ["party"]
|
||||
status = "planning"
|
||||
#chains = ["ethereum"]
|
||||
org = ""
|
||||
dri = ""
|
||||
poc = ""
|
||||
date = "2023-06-05"
|
||||
times = "20:00-04:00"
|
||||
days = 1
|
||||
venues = ["x10"]
|
||||
languages = ["english"]
|
||||
attendees = 300
|
||||
#tags = ["DeFi"]
|
||||
description = '''
|
||||
'''
|
||||
#logo = "logo.jpg"
|
||||
|
||||
[links]
|
||||
#web = ""
|
||||
#twitter = ""
|
||||
|
||||
[registration]
|
||||
type = "tickets"
|
||||
#price = ""
|
||||
#link = ""
|
||||
#status = "available"
|
|
@ -7,7 +7,7 @@ dri = ""
|
|||
poc = "Steve Fau, Dan"
|
||||
date = "2023-06-06"
|
||||
days = 3
|
||||
times = ""
|
||||
#times = ""
|
||||
venues = ["paralelni-polis", "la-fabrika"]
|
||||
languages = ["english"]
|
||||
attendees = 1000
|
||||
|
|
|
@ -22,4 +22,8 @@ type = "tickets"
|
|||
|
||||
[links]
|
||||
#web = ""
|
||||
twitter = "https://twitter.com/PrivacyETHconf"
|
||||
twitter = "https://twitter.com/PrivacyETHconf"
|
||||
|
||||
[[segments]]
|
||||
date = "2023-06-05"
|
||||
times = "09:00-20:00"
|
|
@ -7,7 +7,6 @@ dri = "burningtree"
|
|||
poc = "[Tereza Starostová](https://t.me/Terezastarostova)"
|
||||
date = "2023-06-02"
|
||||
days = 3
|
||||
times = "10:00 - 19:00"
|
||||
venues = ["gabriel-loci"]
|
||||
languages = ["czech", "slovak"]
|
||||
attendees = 1200
|
||||
|
@ -29,3 +28,18 @@ docs = "https://docs.utxo.cz/udalosti/23"
|
|||
twitter = "https://twitter.com/utxoprague"
|
||||
telegram = "https://t.me/utxoprague"
|
||||
youtube = "https://www.youtube.com/c/UTXOPrague"
|
||||
|
||||
[[segments]]
|
||||
date = "2023-06-02"
|
||||
times = "18:00-02:00"
|
||||
title = "Day 0 - Opening Party"
|
||||
|
||||
[[segments]]
|
||||
date = "2023-06-03"
|
||||
times = "10:00-19:00"
|
||||
title = "Day 1"
|
||||
|
||||
[[segments]]
|
||||
date = "2023-06-04"
|
||||
times = "10:00-18:00"
|
||||
title = "Day 2"
|
|
@ -8,6 +8,8 @@ import { parse as tomlParse } from "https://deno.land/std@0.173.0/encoding/toml.
|
|||
import { load as yamlLoad } from "https://deno.land/x/js_yaml_port@3.14.0/js-yaml.js";
|
||||
import { posix } from "https://deno.land/std@0.173.0/path/mod.ts";
|
||||
import * as syncTools from "./syncTools.js";
|
||||
import format from "https://deno.land/x/date_fns@v2.22.1/format/index.js";
|
||||
import addDays from "https://deno.land/x/date_fns@v2.22.1/addDays/index.ts";
|
||||
|
||||
let _silentMode = false;
|
||||
|
||||
|
@ -190,6 +192,26 @@ class DeConf_Collection {
|
|||
const data = {
|
||||
index: { id: this.id, hash, ...efIndex },
|
||||
};
|
||||
if (this.type === "events") {
|
||||
// add Event Segments
|
||||
if (!data.index.segments) {
|
||||
data.index.segments = [];
|
||||
for (let i = 0; i < data.index.days; i++) {
|
||||
data.index.segments.push({
|
||||
date: format(addDays(new Date(data.index.date), i), "yyyy-MM-dd"),
|
||||
times: data.index.times || "09:00-18:00",
|
||||
});
|
||||
}
|
||||
}
|
||||
for (const sg of data.index.segments) {
|
||||
const [sstart, send] = sg.times.split("-");
|
||||
sg.startTime = (new Date(`${sg.date}T${sstart}`)).toISOString();
|
||||
const endDate = send <= sstart
|
||||
? format(addDays(new Date(sg.date), 1), "yyyy-MM-dd")
|
||||
: sg.date;
|
||||
sg.endTime = (new Date(`${endDate}T${send}`)).toISOString();
|
||||
}
|
||||
}
|
||||
if (this.dir) {
|
||||
const syncDataFn = [this.dir, "data.json"].join("/");
|
||||
if (await exists(syncDataFn)) {
|
||||
|
|
|
@ -60,6 +60,7 @@ properties:
|
|||
times:
|
||||
type: string
|
||||
title: Event times
|
||||
pattern: "^\\d{2}:\\d{2}-\\d{2}:\\d{2}$"
|
||||
venues:
|
||||
type: array
|
||||
items:
|
||||
|
@ -109,6 +110,7 @@ properties:
|
|||
description:
|
||||
type: string
|
||||
__markdown: true
|
||||
|
||||
registration:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
@ -139,3 +141,32 @@ properties:
|
|||
additionalProperties:
|
||||
type: string
|
||||
format: uri
|
||||
|
||||
segments:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- date
|
||||
- times
|
||||
properties:
|
||||
date:
|
||||
type: string
|
||||
pattern: "^\\d{4}-\\d{2}-\\d{2}$"
|
||||
times:
|
||||
type: string
|
||||
pattern: "^\\d{2}:\\d{2}-\\d{2}:\\d{2}$"
|
||||
ecap:
|
||||
type: number
|
||||
title:
|
||||
type: string
|
||||
venues:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
pattern: "^[a-z0-9-]+$"
|
||||
startTime:
|
||||
type: string
|
||||
endTime:
|
||||
type: string
|
Načítá se…
Odkázat v novém úkolu