diff --git a/scripts/mdx-scripts/afterhours.event.mdx b/scripts/mdx-scripts/afterhours.event.mdx new file mode 100644 index 0000000..7d227d6 --- /dev/null +++ b/scripts/mdx-scripts/afterhours.event.mdx @@ -0,0 +1,21 @@ +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! diff --git a/scripts/mdx-scripts/event-test.xml b/scripts/mdx-scripts/event-test.xml new file mode 100644 index 0000000..86b422e --- /dev/null +++ b/scripts/mdx-scripts/event-test.xml @@ -0,0 +1,36 @@ + + +

CSC and SE Soc are hosting an Interview Prep Workshop next week! Join Kristy Gao and Bimesh De Silva as they review the interview process, from behavioural to technical interviews. They'll finish off with live mock interviews, and the event will be held on Twitch (https://www.twitch.tv/uwcsclub).

+
+ +

Browsing through your unsolved Leetcode problems? Flipping open CTCI for the first time? Have no clue what to expect from a technical interview or just need an interview refresher?

+

We've got you covered at our CSC x SE Soc Interview Prep Workshop this Monday, May 24th from 7:00-8:30pm ET! Live-streamed on Twitch, Kristy Gao and Bimesh De Silva will be walking through important aspects of the interview process from coding challenges to behavioural interviews to algorithmic interviews, go through some live mock interviews, and share their tips and techniques along the way!

+

Registration isn't required, we'll just be sending you an email reminder, as well as inviting you to our calendar event!

+

The event will be hosted on Twitch at https://www.twitch.tv/uwcsclub

+

Register at http://bit.ly/csc-sesoc-interview-prep-signup!

+
+
+ + +

+ Learn about our plans for the term and play some games with us. +

+
+ +

Kick off your Spring term with CSC! Come join us on Discord to learn more about what we'll be up to this term and how you can participate!

+

Afterwards, stick around for a relaxing and fun game night. See you there!

+

Here, I am also testing with

+

Many headings, as well as bold text and italics.

+

More headings

+ +
    +
  1. One
  2. +
  3. Ordered
  4. +
  5. List
  6. +
+
+
\ No newline at end of file diff --git a/scripts/mdx-scripts/news-conversion.js b/scripts/mdx-scripts/news-conversion.js new file mode 100644 index 0000000..904d966 --- /dev/null +++ b/scripts/mdx-scripts/news-conversion.js @@ -0,0 +1,27 @@ +const converter = new showdown.Converter(); + +fetch("./event-test.xml") + .then((response) => response.text()) + .then((jsonResponse) => parseXML(jsonResponse)) + .catch((error) => console.error(error)); + +const parseXML = (XML) => { + const eventItemRegex = /(.|\n)*?<\/eventitem>/g; + const shortRegex = /(?<=)(.|\n)*?(?=<\/short>)/g; + const abstractRegex = /(?<=)(.|\n)*?(?=<\/abstract>)/g; + + let eventItems = []; + + // Find how many eventItems there are here + while ((eventItems = eventItemRegex.exec(XML)) !== null) { + shortRegex.lastIndex = 0 + abstractRegex.lastIndex = 0 + + const eventItem = eventItems[0]; + console.log(eventItem); + let short = shortRegex.exec(eventItem); + console.log(converter.makeMarkdown(short[0])); + let abstract = abstractRegex.exec(eventItem); + console.log(converter.makeMarkdown(abstract[0])); + } +}; diff --git a/scripts/mdx-scripts/test.html b/scripts/mdx-scripts/test.html new file mode 100644 index 0000000..7348ca8 --- /dev/null +++ b/scripts/mdx-scripts/test.html @@ -0,0 +1,14 @@ + + + + + + + + + Document + + + + + \ No newline at end of file