From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alan E. Davis" Subject: Re: Solar orbit statistics and your agenda Date: Tue, 20 Nov 2018 11:12:21 -0800 Message-ID: References: <8736sdkn0y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f193dd057b1d6b72" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPBSW-0000ba-UT for emacs-orgmode@gnu.org; Tue, 20 Nov 2018 14:13:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPBSU-0007Wc-Ju for emacs-orgmode@gnu.org; Tue, 20 Nov 2018 14:13:16 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:33583) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gPBSQ-0007QE-R3 for emacs-orgmode@gnu.org; Tue, 20 Nov 2018 14:13:12 -0500 Received: by mail-pl1-x62d.google.com with SMTP id z23so1709713plo.0 for ; Tue, 20 Nov 2018 11:13:00 -0800 (PST) In-Reply-To: <8736sdkn0y.fsf@gmail.com> 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: org-mode --000000000000f193dd057b1d6b72 Content-Type: text/plain; charset="UTF-8" Eric: This is extremely useful. I found some documentation on the site, re the API. I am way over my head here, but I need (for one) data on Lunar Declination over, say, a year, but really month-by-month. Is there a "for Dummies" to get this data off of this server? A cookbook? Can I do something like this? grep -E 'oon&&eclin' >${tmpfile} ? Thank you again. On Wed, Nov 7, 2018 at 5:59 AM Eric S Fraga wrote: > 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 > > -- [Fill in the blanks] The use of corrupt manipulations and blatant rhetorical ploys ...--- outright lying, flagwaving, personal attacks, setting up phony alternatives, misdirection, jargon-mongering, evading key issues, feigning disinterested objectivity, willful misunderstanding of other points of view---suggests that ... lacks both credibility and evidence. ---- Edward Tufte (in context of making presentations) --000000000000f193dd057b1d6b72 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Eric:

This is extremely usef= ul.=C2=A0=C2=A0 I found some documentation on the site, re the API.=C2=A0 I= am way over my head here, but I need (for one) data on Lunar Declination o= ver, say, a year, but really month-by-month.=C2=A0 Is there a "for Dum= mies" to get this data off of this server?=C2=A0 A cookbook?=C2=A0 Can= I do something like this?

grep -E 'oon&&eclin' >${tmpfile}

?

Thank you again= .=C2=A0

=C2=A0

=


= On Wed, Nov 7, 2018 at 5:59 AM Eric S Fraga <esflists@gmail.com> wrote:
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.=C2=A0 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
=C2=A0 tmpfile=3D$(mktemp /tmp/date.XXXXXX)
=C2=A0 for year in $(seq 2018 2068)
=C2=A0 do
=C2=A0 =C2=A0 =C2=A0 links http://aa.usno.navy.mi= l/seasons?year=3D${year} -dump | \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 grep -E 'helion|quinox|olstice' = > ${tmpfile}
=C2=A0 =C2=A0 =C2=A0 while read -r line
=C2=A0 =C2=A0 =C2=A0 do
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 item=3D$(echo $line | awk '{print $1= }')
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 date=3D"$(echo $line | awk '{pr= int $5 " " $4 " " $3}') ${year}"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 isodate=3D$(date --date=3D"${date}&= quot; +"%Y-%m-%d %H:%M")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 echo "** <${isodate}> $item&q= uot;
=C2=A0 =C2=A0 =C2=A0 done < ${tmpfile}
=C2=A0 done
=C2=A0 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
=C2=A0 =C2=A0zones...).
3. I believe the URL for the US Naval Observatory in the code above
=C2=A0 =C2=A0accepts "?tz=3DN?dst=3DM" for different time zones (= some index N) and
=C2=A0 =C2=A0daylight savings options (M set to 0 or 1 maybe?) but I haven&= #39;t
=C2=A0 =C2=A0played 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



--
[Fill in the blanks]

The use of = corrupt manipulations and blatant rhetorical ploys ...---=20 outright lying, flagwaving, personal attacks, setting up phony=20 alternatives, misdirection, jargon-mongering, evading key issues,=20 feigning disinterested objectivity, willful misunderstanding of other=20 points of view---suggests that ... lacks both credibility and evidence.

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ---- Edward Tufte (in context of making p= resentations)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0
--000000000000f193dd057b1d6b72--