Get everything in place

This commit is contained in:
MeowcaTheoRange 2024-05-28 22:33:37 -05:00
parent 8879f91f54
commit 0e375aaee0
10 changed files with 10642 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
node_modules

0
assets/scripts/script.js Normal file
View file

0
assets/styles/styles.css Normal file
View file

9534
modules/extern/ical_moz.js vendored Normal file

File diff suppressed because it is too large Load diff

21
modules/index.js Normal file
View file

@ -0,0 +1,21 @@
// Placeholder code from Anime Detour testing
import { ICAL } from '/assets/modules/ical_moz.js';
async function getWebDAV() {
const calrequest = await fetch("https://next.abtmtr.link/remote.php/dav/public-calendars/83tEFQ3myCro3WBL?export");
const calendar = await calrequest.text();
const jcal = ICAL.parse(calendar);
const comp = new ICAL.Component(jcal);
const events = comp.getAllSubcomponents("vevent").map(x => new ICAL.Event(x));
const elt = events.map(x => ({
summary: x.summary,
startDate: x.startDate.toJSDate(),
endDate: x.endDate.toJSDate(),
description: x.description,
location: x.location
}));
console.log(events, elt);
}
getWebDAV();

3
nodemon.json Normal file
View file

@ -0,0 +1,3 @@
{
"ignore": [".gitignore", ".git/**"]
}

1040
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

17
package.json Normal file
View file

@ -0,0 +1,17 @@
{
"name": "eventmapper",
"version": "1.0.0",
"description": "TODO: Readme",
"main": "index.js",
"scripts": {
"dev": "nodemon ./scripts/server.js"
},
"author": "MeowcaTheoRange",
"license": "MIT",
"dependencies": {
"express": "^4.19.2"
},
"devDependencies": {
"nodemon": "^3.1.1"
}
}

26
pages/index.html Normal file
View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title></title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""
/>
</head>
<body>
<div id="leaflet-map"></div>
<script
src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""
></script>
<script src="" type="module"></script>
</body>
</html>

0
scripts/server.js Normal file
View file