Write a script to convert all events and news items to mdx files #1

Open
opened 2021-05-18 19:46:48 -04:00 by n3parikh · 49 comments
n3parikh commented 2021-05-18 19:46:48 -04:00 (Migrated from git.uwaterloo.ca)
No description provided.
j285he commented 2021-05-24 16:07:09 -04:00 (Migrated from git.uwaterloo.ca)

assigned to @j285he

assigned to @j285he
j285he commented 2021-06-14 17:20:35 -04:00 (Migrated from git.uwaterloo.ca)

mentioned in merge request !1

mentioned in merge request !1
j285he commented 2021-06-14 17:22:46 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>842a4255 - Delete afterhours.event.mdx</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=59935&start_sha=0962424152f4b5e51b42186131b4ba1460e32880)
j285he commented 2021-06-14 17:22:54 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>1800a22f - Delete parseTime.js</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=59936&start_sha=842a425533188eeac8bd53a7f4a63459044f4efa)
n3parikh commented 2021-06-15 19:29:41 -04:00 (Migrated from git.uwaterloo.ca)

Instead of making a new copy of events.xml, make the required changes to the string read from file.

Instead of making a new copy of `events.xml`, make the required changes to the string read from file.
n3parikh commented 2021-06-15 19:29:41 -04:00 (Migrated from git.uwaterloo.ca)

Instead of making a new copy of news.xml, make the required changes to the string read from file.

Instead of making a new copy of `news.xml`, make the required changes to the string read from file.
n3parikh commented 2021-06-15 19:29:41 -04:00 (Migrated from git.uwaterloo.ca)

Skip over comment nodes completely

Skip over comment nodes completely
n3parikh commented 2021-06-15 19:29:41 -04:00 (Migrated from git.uwaterloo.ca)

Determine the current term from the month

Determine the current term from the month
n3parikh commented 2021-06-15 19:29:42 -04:00 (Migrated from git.uwaterloo.ca)

Can replace this with a for each loop

Can replace this with a for each loop
n3parikh commented 2021-06-15 19:29:42 -04:00 (Migrated from git.uwaterloo.ca)

Can delete this.

Can delete this.
j285he commented 2021-06-19 21:00:29 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/csc/old-website/-/merge_requests/1/diffs?diff_id=61066&start_sha=1800a22fb494970d438cda320d8f8139f8daeac9#0ac873ce3fff361ce0348204e1f4d5a59e251feb_10_11)
j285he commented 2021-06-19 21:00:29 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/csc/old-website/-/merge_requests/1/diffs?diff_id=61066&start_sha=1800a22fb494970d438cda320d8f8139f8daeac9#37a39205e08e4ef64107890028cee8a513378943_10_11)
j285he commented 2021-06-19 21:00:29 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/csc/old-website/-/merge_requests/1/diffs?diff_id=61066&start_sha=1800a22fb494970d438cda320d8f8139f8daeac9#0ac873ce3fff361ce0348204e1f4d5a59e251feb_63_65)
j285he commented 2021-06-19 21:00:29 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/csc/old-website/-/merge_requests/1/diffs?diff_id=61066&start_sha=1800a22fb494970d438cda320d8f8139f8daeac9#0ac873ce3fff361ce0348204e1f4d5a59e251feb_59_63)
j285he commented 2021-06-19 21:00:29 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/csc/old-website/-/merge_requests/1/diffs?diff_id=61066&start_sha=1800a22fb494970d438cda320d8f8139f8daeac9#0ac873ce3fff361ce0348204e1f4d5a59e251feb_60_63)
j285he commented 2021-06-19 21:00:29 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/csc/old-website/-/merge_requests/1/diffs?diff_id=61066&start_sha=1800a22fb494970d438cda320d8f8139f8daeac9#0ac873ce3fff361ce0348204e1f4d5a59e251feb_93_87)
j285he commented 2021-06-19 21:00:29 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>8d6da95e - Misc. fixes</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=61066&start_sha=1800a22fb494970d438cda320d8f8139f8daeac9)
j285he commented 2021-06-19 21:03:25 -04:00 (Migrated from git.uwaterloo.ca)

added 2 commits

  • 0d09f9e0 - Misc. fixes
  • 93766ce8 - Merge branch 'mdx-conversion' of git.uwaterloo.ca:csc/old-website into mdx-conversion

Compare with previous version

added 2 commits <ul><li>0d09f9e0 - Misc. fixes</li><li>93766ce8 - Merge branch &#39;mdx-conversion&#39; of git.uwaterloo.ca:csc/old-website into mdx-conversion</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=61070&start_sha=8d6da95e272ae243841e152f424edf221d354248)
j285he commented 2021-06-19 21:07:34 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>3c902505 - Formatting</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=61072&start_sha=93766ce8ac89181624249e5a80b3e04891bfeaaf)
j285he commented 2021-06-19 21:09:45 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>cb4a447a - Delete events.xml</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=61074&start_sha=3c9025053ccbbee4bb291f54cb29fe144096c663)
j285he commented 2021-06-19 21:09:51 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>cb62b1d9 - Delete news.xml</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=61075&start_sha=cb4a447ae5ec0211453ad52d4532073768519c7e)
j285he commented 2021-06-19 21:10:31 -04:00 (Migrated from git.uwaterloo.ca)

resolved all threads

resolved all threads
j285he commented 2021-06-19 21:10:42 -04:00 (Migrated from git.uwaterloo.ca)

requested review from @n3parikh and removed review request for @a3thakra

requested review from @n3parikh and removed review request for @a3thakra
j285he commented 2021-06-19 21:15:34 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>e8fc8407 - Minor date fixes</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=61078&start_sha=cb62b1d9701809a0a78c0f7123eab05cde17d3d1)
j285he commented 2021-06-19 21:15:49 -04:00 (Migrated from git.uwaterloo.ca)

changed the description

changed the description
n3parikh commented 2021-06-21 01:14:29 -04:00 (Migrated from git.uwaterloo.ca)

What is this for?

What is this for?
n3parikh commented 2021-06-21 01:14:29 -04:00 (Migrated from git.uwaterloo.ca)

Does this comment apply to this code, or is it for the deleted code?

Does this comment apply to this code, or is it for the deleted code?
n3parikh commented 2021-06-21 01:14:29 -04:00 (Migrated from git.uwaterloo.ca)

I have 2 questions, but otherwise, this looks to me. Great work!

I have 2 questions, but otherwise, this looks to me. Great work!
j285he commented 2021-06-21 11:31:37 -04:00 (Migrated from git.uwaterloo.ca)

Sometimes in events.mdx the time attribute contains times like "7pm" or "7 PM". These time formats can't be converted to date objects by simply writing new Date(`${dateStr} ${timeStr}`) so had to convert them all to a proper time format. Is there an easier way to do this?

Sometimes in `events.mdx` the time attribute contains times like "7pm" or "7 PM". These time formats can't be converted to date objects by simply writing ``new Date(`${dateStr} ${timeStr}`)`` so had to convert them all to a proper time format. Is there an easier way to do this?
j285he commented 2021-06-21 11:33:15 -04:00 (Migrated from git.uwaterloo.ca)

Yeah you're right, it's more for the deleted code. I guess it still applies but I think the code has been simplified enough that it's pretty intuitive. I'll fix this.

Yeah you're right, it's more for the deleted code. I guess it still applies but I think the code has been simplified enough that it's pretty intuitive. I'll fix this.
j285he commented 2021-06-21 11:33:52 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 10 of the diff

changed this line in [version 10 of the diff](/csc/old-website/-/merge_requests/1/diffs?diff_id=61219&start_sha=e8fc840733685d09b5ec75ae7002b5705b295d5f#0ac873ce3fff361ce0348204e1f4d5a59e251feb_62_61)
j285he commented 2021-06-21 11:33:53 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>199adf6d - Remove comment</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=61219&start_sha=e8fc840733685d09b5ec75ae7002b5705b295d5f)
j285he commented 2021-07-12 20:53:02 -04:00 (Migrated from git.uwaterloo.ca)

resolved all threads

resolved all threads
j285he commented 2021-07-12 20:55:44 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

  • 82561cb1 - Change .mdx files to .md files

Compare with previous version

added 1 commit <ul><li>82561cb1 - Change .mdx files to .md files</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=64775&start_sha=199adf6d55f3ad576dbc34cc9f251035384aceda)
j285he commented 2021-07-13 12:53:40 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>8f7cd053 - Remove commas</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=64829&start_sha=82561cb1a6c5bc3f42efc6143718cf64d4e81eb7)
j285he commented 2021-07-26 19:01:21 -04:00 (Migrated from git.uwaterloo.ca)

changed the description

changed the description
j285he commented 2021-07-26 19:07:24 -04:00 (Migrated from git.uwaterloo.ca)

added 15 commits

  • 8f7cd053...c056c04d - 13 commits from branch master
  • cd40e3af - Merge branch 'master' into mdx-conversion
  • f323bb34 - Change metadata format

Compare with previous version

added 15 commits <ul><li>8f7cd053...c056c04d - 13 commits from branch <code>master</code></li><li>cd40e3af - Merge branch &#39;master&#39; into mdx-conversion</li><li>f323bb34 - Change metadata format</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=67542&start_sha=8f7cd053aaf7ad57470c927ebd17a9d99b630f20)
j285he commented 2021-07-26 20:32:20 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

  • ad00cb81 - Add years to event/news file structure result

Compare with previous version

added 1 commit <ul><li>ad00cb81 - Add years to event/news file structure result</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=67549&start_sha=f323bb3433b56ebe861680c08220e7b277d6fda8)
j285he commented 2021-08-17 17:10:10 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>86440c96 - Various fixes</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=71749&start_sha=ad00cb81159aa99aa245ef4c35ff44a61a8d710e)
a3thakra commented 2021-08-24 16:23:50 -04:00 (Migrated from git.uwaterloo.ca)

added 2 commits

  • 4b11379d - Replace <tt> with <code>
  • 5a04c39d - Merge branch 'mdx-conversion' of git.uwaterloo.ca:csc/old-website into mdx-conversion

Compare with previous version

added 2 commits <ul><li>4b11379d - Replace &lt;tt&gt; with &lt;code&gt;</li><li>5a04c39d - Merge branch &#39;mdx-conversion&#39; of git.uwaterloo.ca:csc/old-website into mdx-conversion</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=72124&start_sha=86440c96355fbbd18efd436a78afe25fda43432b)
a3thakra commented 2021-08-24 17:11:43 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

  • 11f588e1 - Use full date strings in news

Compare with previous version

added 1 commit <ul><li>11f588e1 - Use full date strings in news</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=72135&start_sha=5a04c39de8621e6d9c3df567270eb8e23d87be0f)
j285he commented 2021-08-24 20:16:41 -04:00 (Migrated from git.uwaterloo.ca)

Could we touch the events.xml file and delete <redacted&gt ? It creates an md event file that does not work.

Could we touch the `events.xml` file and delete &lt;redacted&gt ? It creates an md event file that does not work.
a3thakra commented 2021-08-25 10:10:42 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

  • 1d2e9122 - Add script to convert tech talks

Compare with previous version

added 1 commit <ul><li>1d2e9122 - Add script to convert tech talks</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=72150&start_sha=11f588e1be95f7f79495cd0abf8dcdc47f6c3cce)
a3thakra commented 2021-08-25 14:40:06 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

  • 0a771f56 - Only output large thumbnail if it's available

Compare with previous version

added 1 commit <ul><li>0a771f56 - Only output large thumbnail if it&#39;s available</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=72157&start_sha=1d2e9122690dc6a57d989d0243428382cf6e8418)
a3thakra commented 2021-08-25 14:41:20 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>8d970014 - Add missing quotes</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=72158&start_sha=0a771f56d0bdb868d4be27a20282c6d65f5ecaf7)
a3thakra commented 2021-09-02 12:29:10 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>289e0f8c - Fix presentors array</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=72502&start_sha=8d970014606692f4b508fbf0e9d9713ba280f26e)
a3thakra commented 2021-09-03 16:06:04 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

  • 3c2b8e00 - Add retries if resource doesn't exist

Compare with previous version

added 1 commit <ul><li>3c2b8e00 - Add retries if resource doesn&#39;t exist</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=72543&start_sha=289e0f8c678bf626709db1d620f85f5b2b51128d)
a3thakra commented 2021-09-03 16:06:53 -04:00 (Migrated from git.uwaterloo.ca)

added 4 commits

  • 3c2b8e00...493c8f57 - 3 commits from branch master
  • 6b301acc - Merge remote-tracking branch 'origin/master' into mdx-conversion

Compare with previous version

added 4 commits <ul><li>3c2b8e00...493c8f57 - 3 commits from branch <code>master</code></li><li>6b301acc - Merge remote-tracking branch &#39;origin/master&#39; into mdx-conversion</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=72544&start_sha=3c2b8e0096f9a7e506a8fe8b34909a60c541341f)
a3thakra commented 2021-09-03 16:38:20 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

  • 78b1134a - Make sure that news entries are not overwritten

Compare with previous version

added 1 commit <ul><li>78b1134a - Make sure that news entries are not overwritten</li></ul> [Compare with previous version](/csc/old-website/-/merge_requests/1/diffs?diff_id=72545&start_sha=6b301accc12efc4b8e45db79941f898d00e0ad90)
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: old/old-website#1
No description provided.