Upcoming Events Report: Difference between revisions

From CES IT Wiki
Jump to navigation Jump to search
Added date format expression.
Added location.
Line 2: Line 2:
# 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:
# Run this expression:
     $.items[?(@.calendar=='public')].['title','startDateTime','endDateTime']
     $.items[?(@.calendar=='public')].['title','location','startDateTime','endDateTime']
# Copy output to Sublimetext.
# Copy output to Sublimetext.
# Run this Regex expression:
# Run this Regex expression:
Line 9: Line 9:
# 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 regex expression:
# Run this regex expression:
     (?:[^\n]*\n){3}
     (?:[^\n]*\n){4}
# 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:
# Format dates with the following expression:
   mmmm d, yyyy, h:mmAM/PM
   mmmm d, yyyy, h:mmAM/PM

Revision as of 15:41, 17 September 2018

  1. Navigate to https://ces.fas.harvard.edu/api/events/between/YYYY-MM-DD/YYYY-MM-DD
  2. Copy and paste the data into http://www.jsonquerytool.com/. Make sure query type is JSONPath
  3. Run this expression:
   $.items[?(@.calendar=='public')].['title','location','startDateTime','endDateTime']
  1. Copy output to Sublimetext.
  2. Run this Regex expression:
   [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}-[0-9]{2}-[0-9]{2}
  1. Edit all lines to match this format: 12:34:56
  2. Remove commas, quotation marks, tabs, and square brackets from beginnings and ends of lines. Leave a line break at the end.
  3. Run this regex expression:
   (?:[^\n]*\n){4}
  1. Change every first and second line break into a tab.
  2. Copy and paste the whole thing into Excel.
  3. Format dates with the following expression:
  mmmm d, yyyy, h:mmAM/PM