Add script for updating the schedule database
This commit is contained in:
parent
5a4b79868e
commit
723a5b1b68
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env -S julia --color=yes --startup-file=no
|
||||
using WeatherNews
|
||||
using SQLite
|
||||
|
||||
function get_db()
|
||||
return SQLite.DB("sql/wn.db")
|
||||
end
|
||||
|
||||
function main()
|
||||
db = get_db()
|
||||
s = WeatherNews.get_schedule()
|
||||
for row in s
|
||||
DB.insert_schedule(db, row)
|
||||
end
|
||||
end
|
||||
|
||||
if abspath(PROGRAM_FILE) == @__FILE__
|
||||
main()
|
||||
end
|
Loading…
Reference in New Issue