Compare commits
1 commit
master
...
thubrecht/
Author | SHA1 | Date | |
---|---|---|---|
eb7ab07888 |
8 changed files with 47 additions and 135 deletions
|
@ -1,18 +1,8 @@
|
|||
{
|
||||
"tree": {
|
||||
"Rentrée": {
|
||||
"Évènements pour les masteriens": {},
|
||||
"Exchange and international students": {},
|
||||
"Départements": {},
|
||||
"Amphis de rentrée": {},
|
||||
"Divers rentrée": {},
|
||||
"Associatif divers": {},
|
||||
"Visites": {}
|
||||
},
|
||||
"Délégation Générale Numérique": {},
|
||||
"COF": {
|
||||
"Évènements (COF)": {},
|
||||
"Rentrée du COF": {},
|
||||
"Évènements (COF)": {},
|
||||
"Assemblées Générales (COF)": {},
|
||||
"BdA": {
|
||||
"Évènements (BdA)": {},
|
||||
|
@ -40,7 +30,6 @@
|
|||
"Rentrée du BDS": {}
|
||||
},
|
||||
"Clubs BDS": {
|
||||
"Valse": {},
|
||||
"Créneaux encadrés": {},
|
||||
"ENSelle": {}
|
||||
},
|
||||
|
@ -48,20 +37,10 @@
|
|||
"Délégation Générale": {},
|
||||
"K-Fêt": {},
|
||||
"Écocampus": {},
|
||||
"La Psychédéliste": {},
|
||||
"Ambassadeur·rice·s santé": {}
|
||||
},
|
||||
|
||||
"sources": {
|
||||
"dgnum-nc": {
|
||||
"dmo7DgdmTnsMd8zo": {
|
||||
"name": "Valse"
|
||||
},
|
||||
"eEPk6miCzozgPb42": {
|
||||
"name": "Délégation Générale Numérique",
|
||||
"short_name": "DGNum",
|
||||
"color": "#27327a"
|
||||
}
|
||||
},
|
||||
"eleves-ens": {
|
||||
"qG6jpJPfK37Nw8ZC": {
|
||||
"name": "PLS"
|
||||
|
@ -81,7 +60,7 @@
|
|||
"w442JdS5AaQ6czrP": {
|
||||
"name": "Écriv'ENS"
|
||||
},
|
||||
"aoazRGFcjHSe4LxG": {
|
||||
"QXGnDTA8GS6r876F": {
|
||||
"name": "K-Fêt",
|
||||
"color": "#c63b52",
|
||||
"default_location": "K-Fêt"
|
||||
|
@ -124,10 +103,6 @@
|
|||
"short_name": "Jeux",
|
||||
"color": "#5f9ae0"
|
||||
},
|
||||
"22rQF3gjjz8LifZC": {
|
||||
"name": "La Psychédéliste",
|
||||
"short_name": "Psychédéliste"
|
||||
},
|
||||
"AfHYkm3gqQ4fRRj5": {
|
||||
"name": "HackENS",
|
||||
"default_location": "Cave d'hackENS"
|
||||
|
@ -138,8 +113,7 @@
|
|||
"name": "ENSelle"
|
||||
},
|
||||
"K6iGBG47WXaKWs3Q": {
|
||||
"name": "Créneaux encadrés",
|
||||
"initial": false
|
||||
"name": "Créneaux encadrés"
|
||||
},
|
||||
"TFjE83ASCMK9rfRi": {
|
||||
"name": "BandarrêtdurgENS",
|
||||
|
@ -168,46 +142,20 @@
|
|||
"AYNpoC674yAjEmRy": {
|
||||
"name": "L'Hômonerie"
|
||||
},
|
||||
"MJf2wnQafbLc2arS": {
|
||||
"name": "Arts pla'",
|
||||
"color": "#ffb969"
|
||||
"TcwNdrs6iyBRxFzk": {
|
||||
"name": "Divers"
|
||||
},
|
||||
"qS7WJwyBaGRQFyX3": {
|
||||
"name": "Exchange and international students",
|
||||
"short_name": "Exchange"
|
||||
},
|
||||
"fGmpGCNZrHQkNt7L": {
|
||||
"name": "Départements",
|
||||
"short_name": "Dpt",
|
||||
"initial": false
|
||||
},
|
||||
"W6qjeqEzEekNieWk": {
|
||||
"name": "Évènements pour les masteriens",
|
||||
"short_name": "Master"
|
||||
},
|
||||
"oDPMTBSma2bfo6WS": {
|
||||
"name": "Amphis de rentrée",
|
||||
"short_name": "Amphis",
|
||||
"initial": false
|
||||
},
|
||||
"aPXtDmXDxmLxkERg": {
|
||||
"name": "Divers rentrée",
|
||||
"short_name": "Rentrée"
|
||||
},
|
||||
"fqK3nqqPtXLyo4Y4": {
|
||||
"name": "Rentrée du COF",
|
||||
"short_name": "COF"
|
||||
},
|
||||
"YQnfcozPDoRgNSBb": {
|
||||
"dJofECeczaGgNiKs": {
|
||||
"name": "Rentrée du BDS",
|
||||
"short_name": "BDS"
|
||||
},
|
||||
"tfA32kgc3GM2fH2C": {
|
||||
"name": "Visites"
|
||||
"7Rwd8JERwBsso7XG": {
|
||||
"name": "Rentrée du COF",
|
||||
"short_name": "COF"
|
||||
},
|
||||
"KDNA4GrFMkkJrwNd": {
|
||||
"name": "Associatif divers",
|
||||
"short_name": "Asso"
|
||||
"MJf2wnQafbLc2arS": {
|
||||
"name": "Arts pla'",
|
||||
"color": "#ffb969"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,15 +6,7 @@
|
|||
"Salle Jean Ibanes (Jourdan, R1-07)": "Salle Jean Ibanes (R1-07)",
|
||||
"Salle Madeleine Rebérioux (Jourdan, R2-02)": "Salle Madeleine Rebérioux (R2-02)",
|
||||
"Salle Marcel Roncayolo (Jourdan, R2-05)": "Salle Marcel Roncayolo (R2-05)",
|
||||
"Cour des bibliothèques": "Cour du NIR",
|
||||
"Salle Jaurès": "Amphithéâtre Jaurès",
|
||||
"Jaurès": "Amphithéâtre Jaurès",
|
||||
"Dussane": "Salle Dussane",
|
||||
"Cour aux Ernest": "Cour aux Ernests",
|
||||
"Restaurant": "Pôt",
|
||||
"29 rue d'Ulm": "Bâtiment du 29",
|
||||
"Gymnase": "Gymnase Jean Prévost",
|
||||
"Pôt (Restaurant)": "Pôt"
|
||||
"Cour des bibliothèques": "Cour du NIR"
|
||||
},
|
||||
|
||||
"rooms": {
|
||||
|
@ -31,10 +23,6 @@
|
|||
"Salle Cartan",
|
||||
"Salle Noether",
|
||||
"Salle Bourbaki",
|
||||
"Petite salle ECLA",
|
||||
"Salle Reig ECLA",
|
||||
"Salle Césaire ECLA",
|
||||
"Salle Beckett",
|
||||
"Cour aux Ernests",
|
||||
"Cour du NIR",
|
||||
"Cour Pasteur",
|
||||
|
@ -43,17 +31,11 @@
|
|||
"Canopée",
|
||||
"K-Fêt",
|
||||
"Cave d'hackENS",
|
||||
"Gymnase Jean Prévost",
|
||||
"Salle d'expression artistique (SEA)",
|
||||
"Locaux des départements lettres et sciences humaines et sociales"
|
||||
"Gymnase"
|
||||
],
|
||||
"24 rue Lhomond": ["Salle CONF IV"],
|
||||
"29 rue d'Ulm": [
|
||||
"Bâtiment du 29",
|
||||
"Bibliothèque des sciences expérimentales",
|
||||
"Amphithéâtre Jaurès"],
|
||||
"29 rue d'Ulm": ["Bibliothèque des sciences expérimentales", "Salle Jaurès"],
|
||||
"Jourdan": [
|
||||
"Campus de Jourdan",
|
||||
"Bibliothèque de Jourdan",
|
||||
"Salle Marcel Roncayolo (R2-05)",
|
||||
"Salle Madeleine Rebérioux (R2-02)",
|
||||
|
|
41
default.nix
41
default.nix
|
@ -1,44 +1,13 @@
|
|||
{ pkgs ? import (import ./npins).nixpkgs {} }:
|
||||
{
|
||||
sources ? import ./npins,
|
||||
pkgs ? import sources.nixpkgs { },
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (pkgs.lib.fileset)
|
||||
fileFilter
|
||||
gitTrackedWith
|
||||
intersection
|
||||
toSource
|
||||
;
|
||||
in
|
||||
|
||||
{
|
||||
package = pkgs.buildNpmPackage {
|
||||
production = pkgs.buildNpmPackage {
|
||||
name = "metis";
|
||||
|
||||
src = toSource {
|
||||
root = ./.;
|
||||
fileset = intersection (gitTrackedWith { } ./.) (
|
||||
fileFilter ({ name, hasExt, ... }: !(hasExt "nix") && name != "npins") ./.
|
||||
);
|
||||
};
|
||||
|
||||
src = ./.;
|
||||
npmDepsHash = "sha256-RbjWNVY8KlPP9ajQRnrsWhOZiiyyMGQSY39lmZnTC1I=";
|
||||
|
||||
installPhase = ''
|
||||
cp -r public $out
|
||||
'';
|
||||
};
|
||||
|
||||
devShell = pkgs.mkShell {
|
||||
name = "metis.dev";
|
||||
|
||||
packages = [ pkgs.nodejs ];
|
||||
};
|
||||
|
||||
providers = {
|
||||
eleves-ens = "cloud.eleves.ens.fr";
|
||||
frama-agenda = "framagenda.org";
|
||||
dgnum-nc = "cloud.dgnum.eu";
|
||||
};
|
||||
shell = import ./shell.nix { inherit pkgs; };
|
||||
providers = import ./providers.nix;
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"nixpkgs": {
|
||||
"type": "Channel",
|
||||
"name": "nixpkgs-unstable",
|
||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre696114.dfffb2e7a52d/nixexprs.tar.xz",
|
||||
"hash": "15dj4hcx5wqcnxwfhh1gx2rpcwyip794bkmv0vpz4f01hibr7wd2"
|
||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-23.11pre506449.f465da16626/nixexprs.tar.xz",
|
||||
"hash": "14jsw1gv83qjz82384gfhn78sv9m14i1bs5l97xrab26vyi9b5ay"
|
||||
}
|
||||
},
|
||||
"version": 3
|
||||
|
|
7
providers.nix
Normal file
7
providers.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
let
|
||||
providers = {
|
||||
eleves-ens = "cloud.eleves.ens.fr";
|
||||
frama-agenda = "framagenda.org";
|
||||
};
|
||||
in
|
||||
builtins.mapAttrs (name: value: "https://${value}/remote.php/dav/public-calendars/") providers
|
|
@ -1 +1,4 @@
|
|||
(import ./. { }).devShell
|
||||
{ pkgs ? import (import ./npins).nixpkgs {} }:
|
||||
pkgs.mkShell {
|
||||
packages = [ pkgs.nodejs ];
|
||||
}
|
||||
|
|
|
@ -102,7 +102,6 @@
|
|||
title: room
|
||||
}))
|
||||
),
|
||||
filterResourcesWithEvents: true,
|
||||
height: '100%',
|
||||
schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
|
||||
nowIndicator: true,
|
||||
|
@ -206,11 +205,7 @@
|
|||
|
||||
<EventModal event={$event} open={openModal} {toggle} />
|
||||
|
||||
<script
|
||||
defer
|
||||
data-domain="calendrier.dgnum.eu"
|
||||
src="https://analytics.dgnum.eu/js/script.js"
|
||||
></script>
|
||||
<script defer data-domain="calendrier.dgnum.eu" src="https://analytics.dgnum.eu/js/script.js"></script>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -190,6 +190,14 @@ function fcEventFromjCalEvent(cal) {
|
|||
}
|
||||
}
|
||||
|
||||
function mkEventsFromCalendar(id, cal) {
|
||||
return fetchCalendar(id, cal).then(calendar => {
|
||||
if (calendar[0] !== 'vcalendar') return
|
||||
const cal = new Calendar(id, calendar)
|
||||
return cal.events.map(fcEventFromjCalEvent(cal))
|
||||
})
|
||||
}
|
||||
|
||||
export function mkSource(name) {
|
||||
const calendarId = calendarsByName[name]
|
||||
if (!calendarId) return null
|
||||
|
|
Loading…
Reference in a new issue