Created
November 18, 2019 01:57
-
-
Save jffry/58e7d974212936f76c85f7b8c00ab39d to your computer and use it in GitHub Desktop.
Clojure/conj 2019 Schedule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Run me with: | |
;; clojure -Sdeps '{:deps {org.jsoup/jsoup {:mvn/version "1.12.1"}}}' gen.clj | |
(require '[clojure.string :as str]) | |
(import (java.time.format DateTimeFormatter) | |
(java.time LocalDate LocalTime ZoneId ZonedDateTime) | |
(java.util UUID) | |
(org.jsoup Jsoup) | |
(org.jsoup.nodes Document)) | |
(defonce doc ^Document (Jsoup/parse (slurp "http://2019.clojure-conj.org/schedule/"))) | |
(def tables (.select doc ".ptsTableFrontedShell .ptsColsWrapper")) | |
(defn parse-date | |
[date-str] | |
(case (str/upper-case (str/trim date-str)) | |
"WEDNESDAY NOV 20TH" (LocalDate/of 2019 11 20) | |
"THURSDAY NOV 21ST" (LocalDate/of 2019 11 21) | |
"FRIDAY NOV 22ND" (LocalDate/of 2019 11 22) | |
"SATURDAY NOV 23RD" (LocalDate/of 2019 11 23))) | |
(defn parse-interval | |
[tz local-date element] | |
(let [pattern (DateTimeFormatter/ofPattern "h:mma") | |
text (str/trim (.text element)) | |
parts (str/split text #"\s*-\s*")] | |
(mapv #(.toInstant (ZonedDateTime/of local-date (LocalTime/parse % pattern) tz)) parts))) | |
(defn parse-event | |
[room times element] | |
(let [[start end] times ;;we mutate to remove the author | |
link (some-> element (.selectFirst "a[href]") (.attr "href")) | |
;;clone element, mutate to delete author, then get text | |
clone (.clone element) | |
author-elt (some-> clone (.selectFirst "em")) | |
author (some-> author-elt .text str/trim) | |
_ (some-> author-elt .empty) | |
desc (some-> clone (.wholeText) str/trim (str/replace #"\s+" " ")) | |
desc (when-not (str/blank? desc) desc)] | |
(when (or author desc link) | |
{:location room | |
:start start | |
:end end | |
:author author | |
:desc (or desc author) | |
:link link}))) | |
(defn parse-events-col | |
[room times column-element] | |
(mapv (partial parse-event room) | |
times | |
(.select column-element ".ptsRows > .ptsCell"))) | |
(defn parse-events-table | |
[table] | |
(let [cols (some-> table (.select ".ptsCol")) | |
local-date (some-> cols (.get 0) (.selectFirst ".ptsColDesc") (.text) parse-date) | |
tz (ZoneId/of "America/New_York") | |
times (some-> cols (.get 0) (.select ".ptsRows > .ptsCell") (->> (mapv (partial parse-interval tz local-date))))] | |
(into [] | |
(filter some?) | |
(concat (parse-events-col "Room 1" times (.get cols 1)) | |
(parse-events-col "Room 2" times (.get cols 2)))))) | |
(def vcard-endl "\n") | |
(defn vcard-line | |
"Folds to max length per vcard format" | |
[prop value] | |
(let [s (str prop ":" value)] | |
(str (str/join (str vcard-endl " ") | |
(mapv #(apply str %) (partition-all 75 s))) | |
vcard-endl))) | |
(defn format-vevent | |
[event] | |
(let [time-fmt (DateTimeFormatter/ofPattern "yyyyMMdd'T'HHmmss'Z'") | |
{:keys [location start end author desc link]} event | |
body (str/join " - " (filter some? [desc author link]))] | |
(str (vcard-line "BEGIN" "VEVENT") | |
(vcard-line "UID" (str (UUID/randomUUID))) | |
(vcard-line "DTSTART" (.format time-fmt (ZonedDateTime/ofInstant start (ZoneId/of "UTC")))) | |
(vcard-line "DTEND" (.format time-fmt (ZonedDateTime/ofInstant end (ZoneId/of "UTC")))) | |
(vcard-line "SUMMARY" (or desc author)) | |
(vcard-line "DESCRIPTION" body) | |
(vcard-line "LOCATION" location) | |
(vcard-line "END" "VEVENT")))) | |
(defn format-ical | |
[events] | |
(str (vcard-line "BEGIN" "VCALENDAR") | |
(str/join (map format-vevent events)) | |
(vcard-line "END" "VCALENDAR"))) | |
(def events (sort-by (juxt :start :location) (mapcat parse-events-table tables))) | |
(println (format-ical events)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN:VCALENDAR | |
BEGIN:VEVENT | |
UID:be9fc7cf-cdbd-40ac-a52d-6f8b90ba0eac | |
DTSTART:20191121T000000Z | |
DTEND:20191121T030000Z | |
SUMMARY:GAME NIGHT | |
DESCRIPTION:GAME NIGHT - GAME NIGHT - https://github.com/clojureconj/clojur | |
econj2019/wiki/Board-Game-Night | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:95de6584-1831-4463-8e7d-eba7330e5430 | |
DTSTART:20191121T140000Z | |
DTEND:20191121T141000Z | |
SUMMARY:WELCOME | |
DESCRIPTION:WELCOME - WELCOME | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:142ad353-d427-4aa1-9224-6c09b818896b | |
DTSTART:20191121T141000Z | |
DTEND:20191121T145000Z | |
SUMMARY:Follow the Data: Product Development in Clojure | |
DESCRIPTION:Follow the Data: Product Development in Clojure - Derek Troy-We | |
st - http://2019.clojure-conj.org/speaker-derek-troy-west/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:5e1a5f74-754f-4b15-87c6-c10ab3935520 | |
DTSTART:20191121T150000Z | |
DTEND:20191121T154000Z | |
SUMMARY:The Hitchhikers Guide to Multiparadigm Programming | |
DESCRIPTION:The Hitchhikers Guide to Multiparadigm Programming - Ariel Orti | |
z - http://2019.clojure-conj.org/speaker-ariel-ortiz/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:e3e5129a-43ea-4967-ab07-1944dff20f98 | |
DTSTART:20191121T155000Z | |
DTEND:20191121T163000Z | |
SUMMARY: Complex Made Bearable | |
DESCRIPTION: Complex Made Bearable - Lucas Cavalcanti - http://2019.clojure | |
-conj.org/speaker-lucas-cavalcanti/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:510865f0-e4fc-432b-b000-42189c446351 | |
DTSTART:20191121T163000Z | |
DTEND:20191121T180000Z | |
SUMMARY:FOOD TRUCKS ON CONVENTION CENTER PLAZA | |
DESCRIPTION:FOOD TRUCKS ON CONVENTION CENTER PLAZA - LUNCH | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:4c0462ee-f094-4fe5-81ca-d0a359a62bf8 | |
DTSTART:20191121T163000Z | |
DTEND:20191121T180000Z | |
SUMMARY:LUNCH | |
DESCRIPTION:LUNCH - LUNCH | |
LOCATION:Room 2 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:1d788b09-64f9-45d1-97be-e8e6b8a9b9a9 | |
DTSTART:20191121T180000Z | |
DTEND:20191121T184000Z | |
SUMMARY:piggy: Specs for Breaking Changes | |
DESCRIPTION:piggy: Specs for Breaking Changes - Santiago Gepigon III - http | |
://2019.clojure-conj.org/speaker-santiago-gepigon-iii/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:e3bdeefd-5a65-4730-b8a4-79d2076b2eda | |
DTSTART:20191121T180000Z | |
DTEND:20191121T184000Z | |
SUMMARY:From Lazy Lisper to Confident Clojurist | |
DESCRIPTION:From Lazy Lisper to Confident Clojurist - Alexander Oloo - htt | |
p://2019.clojure-conj.org/alexander-oloo/ | |
LOCATION:Room 2 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:7aaf9b42-97d8-4b63-bf85-3b24eff43fe1 | |
DTSTART:20191121T185000Z | |
DTEND:20191121T193000Z | |
SUMMARY:Defeating the Four Horsemen of the Coding Apocalypse | |
DESCRIPTION:Defeating the Four Horsemen of the Coding Apocalypse - Mark Ba | |
stian - http://2019.clojure-conj.org/speaker-mark-bastian | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:16b57591-6df7-454a-8913-eed781ddabd5 | |
DTSTART:20191121T185000Z | |
DTEND:20191121T193000Z | |
SUMMARY:Datomic with Terraform | |
DESCRIPTION:Datomic with Terraform - J.D. Hollis - http://2019.clojure-conj | |
.org/speaker-j-d-hollis/ | |
LOCATION:Room 2 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:6d9979b1-5e64-4c25-a9cd-b03f489dc426 | |
DTSTART:20191121T194000Z | |
DTEND:20191121T202000Z | |
SUMMARY:Fixing Airplanes with Clojure | |
DESCRIPTION:Fixing Airplanes with Clojure - Dom Kiva-Meyer - http://2019.cl | |
ojure-conj.org/dom-kiva-meyer/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:1551a659-8574-461c-9d48-8de08d23781e | |
DTSTART:20191121T194000Z | |
DTEND:20191121T202000Z | |
SUMMARY:Clojure for Robotics | |
DESCRIPTION:Clojure for Robotics - John Collins - http://2019.clojure-conj. | |
org/speaker-john-collins/ | |
LOCATION:Room 2 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:b0817ac1-8cd4-4a8d-b667-fd347ecc62ed | |
DTSTART:20191121T202000Z | |
DTEND:20191121T205000Z | |
SUMMARY:BREAK | |
DESCRIPTION:BREAK - BREAK | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:fce0605a-dfc3-45a0-af44-42eebb5a737a | |
DTSTART:20191121T202000Z | |
DTEND:20191121T205000Z | |
SUMMARY:BREAK | |
DESCRIPTION:BREAK - BREAK | |
LOCATION:Room 2 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:d6859717-7d0e-4491-8d4d-0fd965700aca | |
DTSTART:20191121T205000Z | |
DTEND:20191121T213000Z | |
SUMMARY:Interactive Programming for Artificial Intelligence | |
DESCRIPTION:Interactive Programming for Artificial Intelligence - Dragan Dj | |
uric - http://2019.clojure-conj.org/speaker-dragan-djuric/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:d3f9b0bc-a6b7-4c46-86cb-f9fa84c38f11 | |
DTSTART:20191121T214000Z | |
DTEND:20191121T223000Z | |
SUMMARY:Sherlock Holmes, Consulting Developer | |
DESCRIPTION:Sherlock Holmes, Consulting Developer - Stuart Halloway - http | |
://2019.clojure-conj.org/speaker-stuart-halloway | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:7664ef57-c974-437e-a156-9c563f98e513 | |
DTSTART:20191122T000000Z | |
DTEND:20191122T030000Z | |
SUMMARY:Durham Convention Center | |
DESCRIPTION:Durham Convention Center - UNSESSIONS/LIGHTNING TALKS - https:/ | |
/github.com/clojureconj/clojureconj2019/wiki/Unsessions | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:453cf1f2-c47b-48ea-ba3a-5a3fabada314 | |
DTSTART:20191122T140000Z | |
DTEND:20191122T141000Z | |
SUMMARY:WELCOME | |
DESCRIPTION:WELCOME - WELCOME | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:6dcc54aa-324a-4280-85b0-aa9bdd34ce03 | |
DTSTART:20191122T141000Z | |
DTEND:20191122T145000Z | |
SUMMARY:Composable Tools | |
DESCRIPTION:Composable Tools - Alex Miller | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:f4795116-1e07-4f83-bf76-5db4f0577f3c | |
DTSTART:20191122T150000Z | |
DTEND:20191122T154000Z | |
SUMMARY:A random walk through libpython-clj | |
DESCRIPTION:A random walk through libpython-clj - Chris Nuernberger - http: | |
//2019.clojure-conj.org/chris-nuernberger/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:ef287ba9-9655-4b19-91e8-f70b96f40565 | |
DTSTART:20191122T150000Z | |
DTEND:20191122T154000Z | |
SUMMARY:From Data Driven Diamgramming to (Architecture) Diagrams as Data | |
DESCRIPTION:From Data Driven Diamgramming to (Architecture) Diagrams as Dat | |
a - Avi Flax - http://2019.clojure-conj.org/speaker-avi-flax/ | |
LOCATION:Room 2 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:887f523d-c57c-4bf6-ba66-1a3b6b2f95ec | |
DTSTART:20191122T155000Z | |
DTEND:20191122T163000Z | |
SUMMARY:A New Age of JVM Garbage Collectors | |
DESCRIPTION:A New Age of JVM Garbage Collectors - Alexander Yakushev - http | |
://2019.clojure-conj.org/speaker-alexander-yakushev/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:2fa59970-588c-407c-bcdd-8f35f82691bc | |
DTSTART:20191122T155000Z | |
DTEND:20191122T163000Z | |
SUMMARY:Probabilistic Record Linkage of Hospital Patients | |
DESCRIPTION:Probabilistic Record Linkage of Hospital Patients - Chris Oakma | |
n - http://2019.clojure-conj.org/speaker-chris-oakman/ | |
LOCATION:Room 2 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:64391bd1-ab2d-46ab-abda-997d2e4fc612 | |
DTSTART:20191122T163000Z | |
DTEND:20191122T180000Z | |
SUMMARY:LUNCH | |
DESCRIPTION:LUNCH - LUNCH | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:fb97dc4c-1382-4cea-a3f9-0c08d39584a0 | |
DTSTART:20191122T163000Z | |
DTEND:20191122T180000Z | |
SUMMARY:LUNCH | |
DESCRIPTION:LUNCH - LUNCH | |
LOCATION:Room 2 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:449139a1-886b-493f-9262-4e1cae15252d | |
DTSTART:20191122T180000Z | |
DTEND:20191122T184000Z | |
SUMMARY:Clojure Where it Counts: Tidying Data Science Workflows | |
DESCRIPTION:Clojure Where it Counts: Tidying Data Science Workflows - Pier | |
Federico Gherardini & Ben Kamphaus - http://2019.clojure-conj.org/speaker-p | |
ier-federico-gherardini/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:ee26c788-111c-42d7-9c3b-6ecc3deb8418 | |
DTSTART:20191122T180000Z | |
DTEND:20191122T184000Z | |
SUMMARY:The Maximal Graph | |
DESCRIPTION:The Maximal Graph - Wilker Silva - http://2019.clojure-conj.or | |
g/speaker-wilker-silva/ | |
LOCATION:Room 2 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:93f96479-92fe-4588-97a2-cc961349edc0 | |
DTSTART:20191122T185000Z | |
DTEND:20191122T193000Z | |
SUMMARY:The Embodied Runtime | |
DESCRIPTION:The Embodied Runtime - Dennis Heihoff - http://2019.clojure-co | |
nj.org/speaker-dennis-heihoff/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:557959b6-29ea-4802-b871-f886140c2614 | |
DTSTART:20191122T185000Z | |
DTEND:20191122T193000Z | |
SUMMARY:Goodbye YAML: Infrastructure as Code in Clojure | |
DESCRIPTION:Goodbye YAML: Infrastructure as Code in Clojure - Eno Compton & | |
Tyler van Hensbergen - http://2019.clojure-conj.org/speaker-eno-compton/ | |
LOCATION:Room 2 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:f2b40d77-3b54-408b-9524-ddb931128453 | |
DTSTART:20191122T194000Z | |
DTEND:20191122T202000Z | |
SUMMARY:Why Build Solutions with Fulcro | |
DESCRIPTION:Why Build Solutions with Fulcro - Tom Toor - http://2019.clojur | |
e-conj.org/speaker-tom-toor | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:2332756f-3d78-4583-8bd3-79055e044b91 | |
DTSTART:20191122T194000Z | |
DTEND:20191122T202000Z | |
SUMMARY:Ghost in the Generative Shell | |
DESCRIPTION:Ghost in the Generative Shell - Scarlet Spectacular - http://20 | |
19.clojure-conj.org/speaker-scarlet-spectacular | |
LOCATION:Room 2 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:c1ee0fd6-b08b-4bc3-bd6b-9a922b9c9bb5 | |
DTSTART:20191122T202000Z | |
DTEND:20191122T205000Z | |
SUMMARY:BREAK | |
DESCRIPTION:BREAK - BREAK | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:f2e49f07-7e64-4bd8-91d8-8cdfdd3e657a | |
DTSTART:20191122T202000Z | |
DTEND:20191122T205000Z | |
SUMMARY:BREAK | |
DESCRIPTION:BREAK - BREAK | |
LOCATION:Room 2 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:f3419676-ce9f-4af2-9d04-89e3827564dd | |
DTSTART:20191122T205000Z | |
DTEND:20191122T213000Z | |
SUMMARY:Distributed Hash Tables, Video, and Fun! | |
DESCRIPTION:Distributed Hash Tables, Video, and Fun! - Thomas Gebert & Nick | |
Misturak - http://2019.clojure-conj.org/speaker-thomas-gebert/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:61dae2fd-6dcd-4366-8bac-73c592c1c779 | |
DTSTART:20191122T214000Z | |
DTEND:20191122T223000Z | |
SUMMARY:A Racket Perspective on Research, Education, and Production | |
DESCRIPTION:A Racket Perspective on Research, Education, and Production - M | |
atthew Flatt - http://2019.clojure-conj.org/keynote-speaker-matthew-flatt/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:3d9c9a37-058d-4319-8d7c-35af1ce9b9a6 | |
DTSTART:20191123T000000Z | |
DTEND:20191123T030000Z | |
SUMMARY:Boxcar Arcade | |
DESCRIPTION:Boxcar Arcade - PARTY | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:ee179f0e-e69f-4a27-bde0-8bb1dab1487d | |
DTSTART:20191123T140000Z | |
DTEND:20191123T141000Z | |
SUMMARY:WELCOME | |
DESCRIPTION:WELCOME - WELCOME | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:4bb48807-d4a5-4c4b-bd58-6cc0729afe2c | |
DTSTART:20191123T141000Z | |
DTEND:20191123T145000Z | |
SUMMARY:A magic trashcan - microprocessors for full stack developers | |
DESCRIPTION:A magic trashcan - microprocessors for full stack developers - | |
Philipp Meier - http://2019.clojure-conj.org/speaker-philipp-meier/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:a493b4c0-658d-4355-bc70-9f4955496b84 | |
DTSTART:20191123T150000Z | |
DTEND:20191123T154000Z | |
SUMMARY:Rapid Prototyping for Software Development | |
DESCRIPTION:Rapid Prototyping for Software Development - Sara Kimmich - htt | |
p://2019.clojure-conj.org/speaker-sara-kimmich/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:85ef5450-8c91-4be6-9ab2-b67f1a0ef33e | |
DTSTART:20191123T155000Z | |
DTEND:20191123T163000Z | |
SUMMARY:Inference QL: Al for data engineers in Clojure | |
DESCRIPTION:Inference QL: Al for data engineers in Clojure - Ulrich Schaec | |
htle - http://2019.clojure-conj.org/speaker-ulrich-schaechtle/ | |
LOCATION:Room 1 | |
END:VEVENT | |
BEGIN:VEVENT | |
UID:0bf1f399-5ffe-400a-942f-c271b2bb96ba | |
DTSTART:20191123T164000Z | |
DTEND:20191123T171000Z | |
SUMMARY:TBD | |
DESCRIPTION:TBD - Gene Kim - http://2019.clojure-conj.org/speaker-gene-kim/ | |
LOCATION:Room 1 | |
END:VEVENT | |
END:VCALENDAR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment