rewrite calcurse imports
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
---
|
||||
title: calcurse
|
||||
tags:
|
||||
- data
|
||||
- calendar
|
||||
- daylight savings
|
||||
---
|
||||
|
||||
## Setup
|
||||
|
||||
The UK government keeps an `ics` file with clock.
|
||||
|
||||
```sh
|
||||
wget https://www.gov.uk/when-do-the-clocks-change/united-kingdom.ics
|
||||
calcurse -i united-kingdom.ics
|
||||
```
|
||||
|
||||
34
data/calcurse_import.sh
Normal file
34
data/calcurse_import.sh
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: Import an ICS file into calcurse
|
||||
tags:
|
||||
- data
|
||||
- calendar
|
||||
- daylight savings
|
||||
requires:
|
||||
- calcurse
|
||||
---
|
||||
|
||||
## Setup
|
||||
|
||||
The UK government keeps an `ics` file with clock.
|
||||
|
||||
```sh
|
||||
wget https://www.gov.uk/when-do-the-clocks-change/united-kingdom.ics
|
||||
calcurse -i united-kingdom.ics
|
||||
```
|
||||
|
||||
If you already have some of these events, and don't want duplicates, import the events into a temporary file.
|
||||
|
||||
|
||||
```sh
|
||||
TMP=$(mktemp)
|
||||
curl -s "$1" | calcurse -q -i - -c "$TMP"
|
||||
```
|
||||
|
||||
Then search for new lines in the new calendar file to put into your appointments file.
|
||||
|
||||
```sh
|
||||
CALDATA=~/.local/share/calcurse/apts
|
||||
grep -vf "$CALDATA" "$TMP" >> "$CALDATA"
|
||||
rm $TMP
|
||||
```
|
||||
Reference in New Issue
Block a user