Skip to content

Instantly share code, notes, and snippets.

@margnus1
Created September 7, 2013 17:24
Show Gist options
  • Select an option

  • Save margnus1/6477450 to your computer and use it in GitHub Desktop.

Select an option

Save margnus1/6477450 to your computer and use it in GitHub Desktop.
PowerShell script to download and present a TimeEdit timetable.
$wc = new-object System.Net.WebClient
# Note: Change the extension of the subscription link to csv
$link = "https://se.timeedit.net/web/uu/db1/schema/ri63061Y655010QQ65ZY653909550863X06Y09X6055X57660609Y07Q7ZyQ8.csv"
[System.Text.Encoding]::UTF8.GetString($wc.DownloadData($link)).Split("`n") | `
select -skip 3 | ConvertFrom-Csv | `
Sort-Object startdatum,starttid | `
where {$_.Startdatum -ge [System.DateTime]::Now.ToShortDateString()} | `
select startdatum,starttid,kurs,moment,lokal,lärare -First 10 | `
Format-Table -AutoSize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment