[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Repository of Org files with important dates?
From: |
Eric S Fraga |
Subject: |
Re: Repository of Org files with important dates? |
Date: |
Fri, 16 Apr 2021 16:55:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
If you want solar based information (equinox, solstice, etc.), which is
not quite what you mentioned, I used this script to generate org file
headings:
#+begin_src shell :results output raw
tmpfile=$(mktemp /tmp/date.XXXXXX)
for year in $(seq 2018 2068)
do
links http://aa.usno.navy.mil/seasons?year=${year} -dump | \
grep -E 'helion|quinox|olstice' > ${tmpfile}
while read -r line
do
item=$(echo $line | awk '{print $1}')
date="$(echo $line | awk '{print $5 " " $4 " " $3}') ${year}"
isodate=$(date --date="${date}" +"%Y-%m-%d %H:%M")
echo "** <${isodate}> $item"
done < ${tmpfile}
done
rm ${tmpfile}
#+end_src
This script assumes "links" is available but is otherwise sort of
portable for any bash like shell.
But I haven't used it since 2018 when I generated the data for the next
50 years so cannot guarantee the website is still there! :-)
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-254-g37749c