Merge branch 'mdx-conversion' of git.uwaterloo.ca:csc/old-website into mdx-conversion
This commit is contained in:
commit
5a04c39de8
|
@ -9877,14 +9877,14 @@ Remember: Monday, January 13, 6:00 PM, MC3001/Comfy Lounge.</p>
|
||||||
<short>The teeth of Free Software</short>
|
<short>The teeth of Free Software</short>
|
||||||
<abstract>
|
<abstract>
|
||||||
|
|
||||||
<div style="font-style: italic"><blockquote>
|
<div><blockquote>
|
||||||
The licenses for most software are designed to take away your
|
The licenses for most software are designed to take away your
|
||||||
freedom to share and change it. By contrast, the GNU General
|
freedom to share and change it. By contrast, the GNU General
|
||||||
Public License is intended to guarantee your freedom to share and
|
Public License is intended to guarantee your freedom to share and
|
||||||
change free software---to make sure the software is free for all
|
change free software---to make sure the software is free for all
|
||||||
its users.
|
its users.
|
||||||
<br />
|
<br />
|
||||||
<div style="text-align:right">--- Excerpt from the GNU GPL</div>
|
<div>--- Excerpt from the GNU GPL</div>
|
||||||
</blockquote></div>
|
</blockquote></div>
|
||||||
|
|
||||||
<p> The GNU General Public License is one of the most influential
|
<p> The GNU General Public License is one of the most influential
|
||||||
|
|
|
@ -59,15 +59,12 @@ const parseXML = (XML) => {
|
||||||
const xmlDoc = libxmljs.parseHtml(XML);
|
const xmlDoc = libxmljs.parseHtml(XML);
|
||||||
let eventdefsChildren = xmlDoc.get("//eventdefs").childNodes();
|
let eventdefsChildren = xmlDoc.get("//eventdefs").childNodes();
|
||||||
eventdefsChildren.forEach((eventItem) => {
|
eventdefsChildren.forEach((eventItem) => {
|
||||||
``;
|
|
||||||
if (eventItem.type() === "element") {
|
if (eventItem.type() === "element") {
|
||||||
const title = eventItem.attr("title").value();
|
const title = eventItem.attr("title").value();
|
||||||
const shortNodes = eventItem.get(".//short").childNodes();
|
const shortNodes = eventItem.get(".//short").childNodes();
|
||||||
let short = converterShowdown.makeMarkdown(
|
let short = converterShowdown.makeMarkdown(
|
||||||
nodeChildrenToString(shortNodes)
|
nodeChildrenToString(shortNodes)
|
||||||
);
|
);
|
||||||
// remove newlines from short
|
|
||||||
short = short.replace(/\n/g, "");
|
|
||||||
const dateStr = eventItem.attr("date").value();
|
const dateStr = eventItem.attr("date").value();
|
||||||
const timeStr = eventItem.attr("time").value();
|
const timeStr = eventItem.attr("time").value();
|
||||||
const date = parseTime(dateStr, timeStr);
|
const date = parseTime(dateStr, timeStr);
|
||||||
|
@ -80,21 +77,19 @@ const parseXML = (XML) => {
|
||||||
abstract = converterShowdown.makeMarkdown(
|
abstract = converterShowdown.makeMarkdown(
|
||||||
nodeChildrenToString(abstractNodes)
|
nodeChildrenToString(abstractNodes)
|
||||||
);
|
);
|
||||||
abstract = abstract.replace(/<br>/g, "\n");
|
|
||||||
}
|
}
|
||||||
const md = `---
|
const md = `---
|
||||||
name: "${title.replace(/"/g, '\\"')}"
|
name: '${title.replace(/'/g, "''")}'
|
||||||
short: "${short.replace(/"/g, '\\"')}"
|
short: '${short.replace(/\n/g, "").replace(/'/g, "''")}'
|
||||||
date: "${date.toString().replace(/"/g, '\\"')}"
|
date: '${date.toString().replace(/'/g, "''")}'
|
||||||
online: ${online}
|
online: ${online}
|
||||||
location: "${location.replace(/"/g, '\\"')}"
|
location: '${location.replace(/'/g, "''")}'
|
||||||
---
|
---
|
||||||
|
|
||||||
${abstract}`;
|
${abstract.replace(/<br>/g, "\n")}`;
|
||||||
|
|
||||||
// remove invalid characters from filenames
|
// remove invalid characters from filenames
|
||||||
let mdTitle = title.replace(/[\\\\/:*?\"<>|]/g, "");
|
let mdTitle = title.replace(/[\\\\/:*?\"<>|]/g, "").replace(/(\s+)/g, "-");
|
||||||
mdTitle = mdTitle.replace(/(\s+)/g, "-");
|
|
||||||
fs.mkdirSync(
|
fs.mkdirSync(
|
||||||
`./markdown-events/${currentTerm.year}/${currentTerm.term}`,
|
`./markdown-events/${currentTerm.year}/${currentTerm.term}`,
|
||||||
{ recursive: true },
|
{ recursive: true },
|
||||||
|
@ -103,7 +98,7 @@ ${abstract}`;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
`./markdown-events/${currentTerm.year}/${currentTerm.term}/${mdTitle}.event.md`,
|
`./markdown-events/${currentTerm.year}/${currentTerm.term}/${mdTitle}.md`,
|
||||||
md,
|
md,
|
||||||
(err) => {
|
(err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
export const metadata = {
|
|
||||||
name: "Afterhours: Personal Relationships",
|
|
||||||
short: "Learn how React works and make your own version!",
|
|
||||||
date: new Date("2021-03-02 2:00 PM"),
|
|
||||||
online: false,
|
|
||||||
location: "MC",
|
|
||||||
registerLink: "http://csclub.uwaterloo.ca/",
|
|
||||||
};
|
|
||||||
|
|
||||||
The past year has been tough for all of us, having to deal with the pandemic
|
|
||||||
while studying or working remotely. If you've felt that meeting new people and
|
|
||||||
sustaining relationships with others has never been more challenging, we feel
|
|
||||||
that too, and we want to talk about it.
|
|
||||||
|
|
||||||
CSC brings you the third chapter of Afterhours, and this time we're discussing
|
|
||||||
Personal Relationships. Join us for a chat about how our relationships
|
|
||||||
(platonic and romantic) have been affected, whether that be due to co-op,
|
|
||||||
sequence changes, or COVID. We'll be sharing our own personal stories and we'd
|
|
||||||
love for you all to join in on the discussion.
|
|
||||||
|
|
||||||
Registration is required for attendance, so don't miss out!
|
|
|
@ -1,14 +0,0 @@
|
||||||
export const metadata = {
|
|
||||||
author: "merenber",
|
|
||||||
date: new Date("2021-03-19"),
|
|
||||||
}
|
|
||||||
|
|
||||||
Computer Science Club systems and services will be unavailable on Saturday, Mar. 20
|
|
||||||
due to a planned power outage in the Mathematics and Computer Building (MC) from 7am to 5pm.
|
|
||||||
|
|
||||||
The CSC will begin shutting down machines at 6am in preparation of the outage.
|
|
||||||
Please prepare for the outage by:
|
|
||||||
|
|
||||||
- Ensuring all running processes have their state saved (configuration, data, etc.)
|
|
||||||
- Any important files are backed up off-site from the CSC
|
|
||||||
- If you have any questions/concerns, please email the Systems Committee.
|
|
|
@ -52,8 +52,8 @@ const parseXML = (XML) => {
|
||||||
).trim();
|
).trim();
|
||||||
|
|
||||||
const md = `---
|
const md = `---
|
||||||
author: "${author.replace(/"/g, '\\"')}"
|
author: '${author.replace(/'/g, "''")}'
|
||||||
date: "${date.replace(/"/g, '\\"')}"
|
date: '${date.replace(/'/g, "''")}'
|
||||||
---
|
---
|
||||||
|
|
||||||
${content}`;
|
${content}`;
|
||||||
|
@ -66,7 +66,7 @@ ${content}`;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
`./markdown-news/${currentTerm.year}/${currentTerm.term}/${mdTitle}.news.md`,
|
`./markdown-news/${currentTerm.year}/${currentTerm.term}/${mdTitle}.md`,
|
||||||
md,
|
md,
|
||||||
(err) => {
|
(err) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
|
|
Loading…
Reference in New Issue