dot

packages and services management
Log | Files | Refs | README

commit 20376f2385e11940ae332b3f61c61f80d2e7e36d
parent 1f111ab8ee1d02b711f8a9bfabb02b79bfa91a08
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri, 22 Dec 2017 13:50:40 +0100

also add end date

Diffstat:
Mbin/calendar | 9+++++----
Abin/calendar-update | 7+++++++
2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/bin/calendar b/bin/calendar @@ -139,15 +139,16 @@ BEGIN { } /^:$/ { - beg = to_date("%04d/%02d/%02d %02d:%02d", line["B"] + 0); - end = to_date("%04d/%02d/%02d %02d:%02d", line["E"] + 0); + beg = to_date("%04d/%02d/%02d %02d:%02d", line["B"] + OFF * 3600); + end = to_date("%04d/%02d/%02d %02d:%02d", line["E"] + OFF * 3600); beg_mth = substr(beg, 1, 7); beg_day = substr(beg, 9, 2); beg_h_m = substr(beg, 12); - printf("%s\n%2s %s %s\n [%s] %s\n", + end_h_m = substr(end, 12); + printf("%s\n%2s %s %s\n %2s [%s] %s\n", (beg_mth != last_mth) ? ("\n\n[" beg_mth "]\n") : "", (beg_day != last_day) ? (beg_day) : (""), - beg_h_m, line["S"], line["C"], line["L"]); + beg_h_m, line["S"], end_h_m, line["C"], line["L"]); fold(line["D"]); last_mth = beg_mth; last_day = beg_day; diff --git a/bin/calendar-update b/bin/calendar-update @@ -0,0 +1,7 @@ +#!/bin/sh + +url='https://intra.epitech.eu/auth-251e3d0bfcea8ed69a5581361a6a5b8b7ac3cfd5/planning/load?format=ical&location=FR/REN&onlymypromo=true&onlymymodule=true&semester=0,3' +curl -#L "$url" | calendar import - epitech +01 + +url='https://fosdem.org/2018/schedule/ical' +curl -#L "$url" | calendar import - fosdem +01