Skip to content

Commit f3b63e3

Browse files
committed
init commit w/ class data and parser
1 parent a8d5459 commit f3b63e3

15 files changed

+2189
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local

.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["johnsoncodehk.volar"]
3+
}

Readme.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# MVHS Club Website
2+
## About
3+
This website scrapes data from [here](https://docs.google.com/spreadsheets/d/1qi6KNjkR5NHE6uauEtOWDnILqzJF5raC0ST38Au1s9s/edit#gid=503978023) and displays it in a readable format, sorted by the club meeting time. It does not scrape data in real time, but does so periodically because otherwise we would need to require students to log in in order to work.
4+
## Stack
5+
This website uses vue 3 with vite and a static JSON file to store the class data.
6+
# Vue 3 + Vite
7+
8+
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
9+
10+
## Recommended IDE Setup
11+
12+
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
13+
## To develop:
14+
1. npm install
15+
2. npm run dev
16+
3. open http://localhost:3000
17+
## License
18+
This website is licensed under the GPLv3 license.

data/Current 2021-2022 Club List - Club List 2021-2022.csv

+104
Large diffs are not rendered by default.

data/clubs.json

+1,538
Large diffs are not rendered by default.

data/parse.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const parse = require('csv-parse/lib/sync')
2+
const assert = require('assert')
3+
const fs = require('fs')
4+
const input = fs.readFileSync('./Current 2021-2022 Club List - Club List 2021-2022.csv', 'utf8');
5+
const records = parse(input, {
6+
columns: ["registration",
7+
"approval",
8+
"printedReg",
9+
"name",
10+
"category",
11+
"missionStatement",
12+
"advisorName",
13+
"presidentNames",
14+
"presidentEmails",
15+
"meetingTimeAndLocation",
16+
"registrationLink",
17+
"advisorIsMediaMod",
18+
"",
19+
"",
20+
"yearbookMod"
21+
],
22+
skip_empty_lines: true
23+
});
24+
records.shift();
25+
console.log(records);
26+
fs.writeFileSync('./clubs.json', JSON.stringify(records, null, 2));

index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite App</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.js"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)