From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Solar orbit statistics and your agenda Date: Wed, 07 Nov 2018 13:58:05 +0000 Message-ID: <8736sdkn0y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKOLU-0002Rg-Tr for emacs-orgmode@gnu.org; Wed, 07 Nov 2018 08:58:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKOLQ-0001LJ-SA for emacs-orgmode@gnu.org; Wed, 07 Nov 2018 08:58:12 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:38776) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gKOLQ-0001Ky-La for emacs-orgmode@gnu.org; Wed, 07 Nov 2018 08:58:08 -0500 Received: by mail-wr1-x42e.google.com with SMTP id d10-v6so17514114wrs.5 for ; Wed, 07 Nov 2018 05:58:08 -0800 (PST) Received: from pinto (pinto.chemeng.ucl.ac.uk. [128.40.74.171]) by smtp.gmail.com with ESMTPSA id l42-v6sm1118146wre.37.2018.11.07.05.58.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Nov 2018 05:58:06 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Time for a very geeky post... Recently, on the remind (diary tool I used to use) mailing list, somebody posted a script for converting solar data (perihelion, equinox, ...) to remind input. I've done the same for org so if you're interested in that kind of information and want your agenda to show this, here is the script: #+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 Notes: 1. this is for Linux and assumes bash as the shell. 2. the default is UTC (and this is where I wish org supported time zones...). 3. I believe the URL for the US Naval Observatory in the code above accepts "?tz=N?dst=M" for different time zones (some index N) and daylight savings options (M set to 0 or 1 maybe?) but I haven't played with these options. 4. you will need to install "links". Enjoy but use at own risk etc. ;-) -- Eric S Fraga via Emacs 27.0.50, Org release_9.1.11-620-ga548e4