Upcoming Events Report: Difference between revisions
Jump to navigation
Jump to search
Peterstevens (talk | contribs) m Changed redundant "regex expression" to "regular expression". |
Peterstevens (talk | contribs) m Fixed inconsistent full stops. |
||
Line 1: | Line 1: | ||
# Navigate to <code><nowiki>https://ces.fas.harvard.edu/api/events/between/YYYY-MM-DD/YYYY-MM-DD</nowiki></code> | # Navigate to <code><nowiki>https://ces.fas.harvard.edu/api/events/between/YYYY-MM-DD/YYYY-MM-DD</nowiki></code>. | ||
# Copy and paste the data into http://www.jsonquerytool.com/. Make sure query type is JSONPath | # Copy and paste the data into http://www.jsonquerytool.com/. Make sure query type is JSONPath. | ||
# Run this expression: <code>$.items[?(@.calendar=='public')].['title','location','startDateTime','endDateTime']</code> | # Run this expression: <code>$.items[?(@.calendar=='public')].['title','location','startDateTime','endDateTime']</code>. | ||
# Copy output to Sublimetext. | # Copy output to Sublimetext. | ||
# Run this regular expression: <code>[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}-[0-9]{2}-[0-9]{2}</code> | # Run this regular expression: <code>[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}-[0-9]{2}-[0-9]{2}</code>. | ||
# Edit all lines to match this format: 12:34 | # Edit all lines to match this format: 12:34. | ||
# Remove commas, quotation marks, tabs, and square brackets from beginnings and ends of lines. Leave a line break at the end. | # Remove commas, quotation marks, tabs, and square brackets from beginnings and ends of lines. Leave a line break at the end. | ||
# Run this regular expression: <code>(?:[^\n]*\n){4}</code> | # Run this regular expression: <code>(?:[^\n]*\n){4}</code>. | ||
# Change every first and second line break into a tab. | # Change every first and second line break into a tab. | ||
# Copy and paste the whole thing into Excel. | # Copy and paste the whole thing into Excel. | ||
# Format dates with the following expression: <code>mmmm d, yyyy, h:mmAM/PM</code> | # Format dates with the following expression: <code>mmmm d, yyyy, h:mmAM/PM</code>. |
Latest revision as of 18:42, 17 September 2018
- Navigate to
https://ces.fas.harvard.edu/api/events/between/YYYY-MM-DD/YYYY-MM-DD
. - Copy and paste the data into http://www.jsonquerytool.com/. Make sure query type is JSONPath.
- Run this expression:
$.items[?(@.calendar=='public')].['title','location','startDateTime','endDateTime']
. - Copy output to Sublimetext.
- Run this regular expression:
[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}-[0-9]{2}-[0-9]{2}
. - Edit all lines to match this format: 12:34.
- Remove commas, quotation marks, tabs, and square brackets from beginnings and ends of lines. Leave a line break at the end.
- Run this regular expression:
(?:[^\n]*\n){4}
. - Change every first and second line break into a tab.
- Copy and paste the whole thing into Excel.
- Format dates with the following expression:
mmmm d, yyyy, h:mmAM/PM
.