Compare commits
2 Commits
db23336fb4
...
62acd1209e
Author | SHA1 | Date |
---|---|---|
gg | 62acd1209e | |
gg | 226cedb7f8 |
|
@ -2,8 +2,15 @@
|
|||
|
||||
Play with data for weather waifus.
|
||||
|
||||
## Learning Julia
|
||||
|
||||
I've admired Julia from afar for too long. I want to learn how to use this language, so I started
|
||||
this little project to feel the language out.
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
julia --project -O0 --compile=min bin/weathernews.jl
|
||||
```
|
||||
|
||||
https://rentry.org/faaag
|
||||
|
|
|
@ -2,8 +2,10 @@ module WeatherNews
|
|||
|
||||
using JSON3, HTTP, Dates, TimeZones, DataStructures
|
||||
|
||||
"URL for JSON timetable"
|
||||
SCHEDULE_URL = "https://smtgvs.weathernews.jp/a/solive_timetable/timetable.json"
|
||||
|
||||
"Translate Japanese segment titles to short English words."
|
||||
TITLES = Dict(
|
||||
"ウェザーニュースLiVE・モーニング" => "Morning",
|
||||
"ウェザーニュースLiVE・サンシャイン" => "Sunshine",
|
||||
|
@ -14,6 +16,7 @@ TITLES = Dict(
|
|||
"ウェザーニュースLiVE" => "_",
|
||||
)
|
||||
|
||||
"Send a GET Request for `url` and parse the response body as JSON."
|
||||
function dl(url)
|
||||
res = HTTP.get(url)
|
||||
return JSON3.read(res.body)
|
||||
|
|
Loading…
Reference in New Issue